generated-configure.sh revision 2295:f5994f5d5041
1#!/bin/bash
2#
3# ##########################################################
4# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
5# ##########################################################
6#
7#! /bin/sh
8# Guess values for system-dependent variables and create Makefiles.
9# Generated by GNU Autoconf 2.69 for OpenJDK jdk9.
10#
11# Report bugs to <build-dev@openjdk.java.net>.
12#
13#
14# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
15#
16#
17# This configure script is free software; the Free Software Foundation
18# gives unlimited permission to copy, distribute and modify it.
19## -------------------- ##
20## M4sh Initialization. ##
21## -------------------- ##
22
23# Be more Bourne compatible
24DUALCASE=1; export DUALCASE # for MKS sh
25if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
26  emulate sh
27  NULLCMD=:
28  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
29  # is contrary to our usage.  Disable this feature.
30  alias -g '${1+"$@"}'='"$@"'
31  setopt NO_GLOB_SUBST
32else
33  case `(set -o) 2>/dev/null` in #(
34  *posix*) :
35    set -o posix ;; #(
36  *) :
37     ;;
38esac
39fi
40
41
42as_nl='
43'
44export as_nl
45# Printing a long string crashes Solaris 7 /usr/bin/printf.
46as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
47as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
48as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
49# Prefer a ksh shell builtin over an external printf program on Solaris,
50# but without wasting forks for bash or zsh.
51if test -z "$BASH_VERSION$ZSH_VERSION" \
52    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
53  as_echo='print -r --'
54  as_echo_n='print -rn --'
55elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
56  as_echo='printf %s\n'
57  as_echo_n='printf %s'
58else
59  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
60    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
61    as_echo_n='/usr/ucb/echo -n'
62  else
63    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
64    as_echo_n_body='eval
65      arg=$1;
66      case $arg in #(
67      *"$as_nl"*)
68	expr "X$arg" : "X\\(.*\\)$as_nl";
69	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
70      esac;
71      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
72    '
73    export as_echo_n_body
74    as_echo_n='sh -c $as_echo_n_body as_echo'
75  fi
76  export as_echo_body
77  as_echo='sh -c $as_echo_body as_echo'
78fi
79
80# The user is always right.
81if test "${PATH_SEPARATOR+set}" != set; then
82  PATH_SEPARATOR=:
83  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
84    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
85      PATH_SEPARATOR=';'
86  }
87fi
88
89
90# IFS
91# We need space, tab and new line, in precisely that order.  Quoting is
92# there to prevent editors from complaining about space-tab.
93# (If _AS_PATH_WALK were called with IFS unset, it would disable word
94# splitting by setting IFS to empty value.)
95IFS=" ""	$as_nl"
96
97# Find who we are.  Look in the path if we contain no directory separator.
98as_myself=
99case $0 in #((
100  *[\\/]* ) as_myself=$0 ;;
101  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
102for as_dir in $PATH
103do
104  IFS=$as_save_IFS
105  test -z "$as_dir" && as_dir=.
106    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
107  done
108IFS=$as_save_IFS
109
110     ;;
111esac
112# We did not find ourselves, most probably we were run as `sh COMMAND'
113# in which case we are not to be found in the path.
114if test "x$as_myself" = x; then
115  as_myself=$0
116fi
117if test ! -f "$as_myself"; then
118  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
119  exit 1
120fi
121
122# Unset variables that we do not need and which cause bugs (e.g. in
123# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
124# suppresses any "Segmentation fault" message there.  '((' could
125# trigger a bug in pdksh 5.2.14.
126for as_var in BASH_ENV ENV MAIL MAILPATH
127do eval test x\${$as_var+set} = xset \
128  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
129done
130PS1='$ '
131PS2='> '
132PS4='+ '
133
134# NLS nuisances.
135LC_ALL=C
136export LC_ALL
137LANGUAGE=C
138export LANGUAGE
139
140# CDPATH.
141(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
142
143# Use a proper internal environment variable to ensure we don't fall
144  # into an infinite loop, continuously re-executing ourselves.
145  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
146    _as_can_reexec=no; export _as_can_reexec;
147    # We cannot yet assume a decent shell, so we have to provide a
148# neutralization value for shells without unset; and this also
149# works around shells that cannot unset nonexistent variables.
150# Preserve -v and -x to the replacement shell.
151BASH_ENV=/dev/null
152ENV=/dev/null
153(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
154case $- in # ((((
155  *v*x* | *x*v* ) as_opts=-vx ;;
156  *v* ) as_opts=-v ;;
157  *x* ) as_opts=-x ;;
158  * ) as_opts= ;;
159esac
160exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
161# Admittedly, this is quite paranoid, since all the known shells bail
162# out after a failed `exec'.
163$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
164as_fn_exit 255
165  fi
166  # We don't want this to propagate to other subprocesses.
167          { _as_can_reexec=; unset _as_can_reexec;}
168if test "x$CONFIG_SHELL" = x; then
169  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
170  emulate sh
171  NULLCMD=:
172  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
173  # is contrary to our usage.  Disable this feature.
174  alias -g '\${1+\"\$@\"}'='\"\$@\"'
175  setopt NO_GLOB_SUBST
176else
177  case \`(set -o) 2>/dev/null\` in #(
178  *posix*) :
179    set -o posix ;; #(
180  *) :
181     ;;
182esac
183fi
184"
185  as_required="as_fn_return () { (exit \$1); }
186as_fn_success () { as_fn_return 0; }
187as_fn_failure () { as_fn_return 1; }
188as_fn_ret_success () { return 0; }
189as_fn_ret_failure () { return 1; }
190
191exitcode=0
192as_fn_success || { exitcode=1; echo as_fn_success failed.; }
193as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
194as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
195as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
196if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
197
198else
199  exitcode=1; echo positional parameters were not saved.
200fi
201test x\$exitcode = x0 || exit 1
202test -x / || exit 1"
203  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
204  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
205  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
206  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
207test \$(( 1 + 1 )) = 2 || exit 1"
208  if (eval "$as_required") 2>/dev/null; then :
209  as_have_required=yes
210else
211  as_have_required=no
212fi
213  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
214
215else
216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
217as_found=false
218for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
219do
220  IFS=$as_save_IFS
221  test -z "$as_dir" && as_dir=.
222  as_found=:
223  case $as_dir in #(
224	 /*)
225	   for as_base in sh bash ksh sh5; do
226	     # Try only shells that exist, to save several forks.
227	     as_shell=$as_dir/$as_base
228	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
229		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
230  CONFIG_SHELL=$as_shell as_have_required=yes
231		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
232  break 2
233fi
234fi
235	   done;;
236       esac
237  as_found=false
238done
239$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
240	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
241  CONFIG_SHELL=$SHELL as_have_required=yes
242fi; }
243IFS=$as_save_IFS
244
245
246      if test "x$CONFIG_SHELL" != x; then :
247  export CONFIG_SHELL
248             # We cannot yet assume a decent shell, so we have to provide a
249# neutralization value for shells without unset; and this also
250# works around shells that cannot unset nonexistent variables.
251# Preserve -v and -x to the replacement shell.
252BASH_ENV=/dev/null
253ENV=/dev/null
254(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
255case $- in # ((((
256  *v*x* | *x*v* ) as_opts=-vx ;;
257  *v* ) as_opts=-v ;;
258  *x* ) as_opts=-x ;;
259  * ) as_opts= ;;
260esac
261exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
262# Admittedly, this is quite paranoid, since all the known shells bail
263# out after a failed `exec'.
264$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
265exit 255
266fi
267
268    if test x$as_have_required = xno; then :
269  $as_echo "$0: This script requires a shell more modern than all"
270  $as_echo "$0: the shells that I found on your system."
271  if test x${ZSH_VERSION+set} = xset ; then
272    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
273    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
274  else
275    $as_echo "$0: Please tell bug-autoconf@gnu.org and
276$0: build-dev@openjdk.java.net about your system, including
277$0: any error possibly output before this message. Then
278$0: install a modern shell, or manually run the script
279$0: under such a shell if you do have one."
280  fi
281  exit 1
282fi
283fi
284fi
285SHELL=${CONFIG_SHELL-/bin/sh}
286export SHELL
287# Unset more variables known to interfere with behavior of common tools.
288CLICOLOR_FORCE= GREP_OPTIONS=
289unset CLICOLOR_FORCE GREP_OPTIONS
290
291## --------------------- ##
292## M4sh Shell Functions. ##
293## --------------------- ##
294# as_fn_unset VAR
295# ---------------
296# Portably unset VAR.
297as_fn_unset ()
298{
299  { eval $1=; unset $1;}
300}
301as_unset=as_fn_unset
302
303# as_fn_set_status STATUS
304# -----------------------
305# Set $? to STATUS, without forking.
306as_fn_set_status ()
307{
308  return $1
309} # as_fn_set_status
310
311# as_fn_exit STATUS
312# -----------------
313# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
314as_fn_exit ()
315{
316  set +e
317  as_fn_set_status $1
318  exit $1
319} # as_fn_exit
320
321# as_fn_mkdir_p
322# -------------
323# Create "$as_dir" as a directory, including parents if necessary.
324as_fn_mkdir_p ()
325{
326
327  case $as_dir in #(
328  -*) as_dir=./$as_dir;;
329  esac
330  test -d "$as_dir" || eval $as_mkdir_p || {
331    as_dirs=
332    while :; do
333      case $as_dir in #(
334      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
335      *) as_qdir=$as_dir;;
336      esac
337      as_dirs="'$as_qdir' $as_dirs"
338      as_dir=`$as_dirname -- "$as_dir" ||
339$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
340	 X"$as_dir" : 'X\(//\)[^/]' \| \
341	 X"$as_dir" : 'X\(//\)$' \| \
342	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
343$as_echo X"$as_dir" |
344    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
345	    s//\1/
346	    q
347	  }
348	  /^X\(\/\/\)[^/].*/{
349	    s//\1/
350	    q
351	  }
352	  /^X\(\/\/\)$/{
353	    s//\1/
354	    q
355	  }
356	  /^X\(\/\).*/{
357	    s//\1/
358	    q
359	  }
360	  s/.*/./; q'`
361      test -d "$as_dir" && break
362    done
363    test -z "$as_dirs" || eval "mkdir $as_dirs"
364  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
365
366
367} # as_fn_mkdir_p
368
369# as_fn_executable_p FILE
370# -----------------------
371# Test if FILE is an executable regular file.
372as_fn_executable_p ()
373{
374  test -f "$1" && test -x "$1"
375} # as_fn_executable_p
376# as_fn_append VAR VALUE
377# ----------------------
378# Append the text in VALUE to the end of the definition contained in VAR. Take
379# advantage of any shell optimizations that allow amortized linear growth over
380# repeated appends, instead of the typical quadratic growth present in naive
381# implementations.
382if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
383  eval 'as_fn_append ()
384  {
385    eval $1+=\$2
386  }'
387else
388  as_fn_append ()
389  {
390    eval $1=\$$1\$2
391  }
392fi # as_fn_append
393
394# as_fn_arith ARG...
395# ------------------
396# Perform arithmetic evaluation on the ARGs, and store the result in the
397# global $as_val. Take advantage of shells that can avoid forks. The arguments
398# must be portable across $(()) and expr.
399if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
400  eval 'as_fn_arith ()
401  {
402    as_val=$(( $* ))
403  }'
404else
405  as_fn_arith ()
406  {
407    as_val=`expr "$@" || test $? -eq 1`
408  }
409fi # as_fn_arith
410
411
412# as_fn_error STATUS ERROR [LINENO LOG_FD]
413# ----------------------------------------
414# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
415# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
416# script with STATUS, using 1 if that was 0.
417as_fn_error ()
418{
419  as_status=$1; test $as_status -eq 0 && as_status=1
420  if test "$4"; then
421    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
422    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
423  fi
424  $as_echo "$as_me: error: $2" >&2
425  as_fn_exit $as_status
426} # as_fn_error
427
428if expr a : '\(a\)' >/dev/null 2>&1 &&
429   test "X`expr 00001 : '.*\(...\)'`" = X001; then
430  as_expr=expr
431else
432  as_expr=false
433fi
434
435if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
436  as_basename=basename
437else
438  as_basename=false
439fi
440
441if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
442  as_dirname=dirname
443else
444  as_dirname=false
445fi
446
447as_me=`$as_basename -- "$0" ||
448$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
449	 X"$0" : 'X\(//\)$' \| \
450	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
451$as_echo X/"$0" |
452    sed '/^.*\/\([^/][^/]*\)\/*$/{
453	    s//\1/
454	    q
455	  }
456	  /^X\/\(\/\/\)$/{
457	    s//\1/
458	    q
459	  }
460	  /^X\/\(\/\).*/{
461	    s//\1/
462	    q
463	  }
464	  s/.*/./; q'`
465
466# Avoid depending upon Character Ranges.
467as_cr_letters='abcdefghijklmnopqrstuvwxyz'
468as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
469as_cr_Letters=$as_cr_letters$as_cr_LETTERS
470as_cr_digits='0123456789'
471as_cr_alnum=$as_cr_Letters$as_cr_digits
472
473
474  as_lineno_1=$LINENO as_lineno_1a=$LINENO
475  as_lineno_2=$LINENO as_lineno_2a=$LINENO
476  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
477  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
478  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
479  sed -n '
480    p
481    /[$]LINENO/=
482  ' <$as_myself |
483    sed '
484      s/[$]LINENO.*/&-/
485      t lineno
486      b
487      :lineno
488      N
489      :loop
490      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
491      t loop
492      s/-\n.*//
493    ' >$as_me.lineno &&
494  chmod +x "$as_me.lineno" ||
495    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
496
497  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
498  # already done that, so ensure we don't try to do so again and fall
499  # in an infinite loop.  This has already happened in practice.
500  _as_can_reexec=no; export _as_can_reexec
501  # Don't try to exec as it changes $[0], causing all sort of problems
502  # (the dirname of $[0] is not the place where we might find the
503  # original and so on.  Autoconf is especially sensitive to this).
504  . "./$as_me.lineno"
505  # Exit status is that of the last command.
506  exit
507}
508
509ECHO_C= ECHO_N= ECHO_T=
510case `echo -n x` in #(((((
511-n*)
512  case `echo 'xy\c'` in
513  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
514  xy)  ECHO_C='\c';;
515  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
516       ECHO_T='	';;
517  esac;;
518*)
519  ECHO_N='-n';;
520esac
521
522rm -f conf$$ conf$$.exe conf$$.file
523if test -d conf$$.dir; then
524  rm -f conf$$.dir/conf$$.file
525else
526  rm -f conf$$.dir
527  mkdir conf$$.dir 2>/dev/null
528fi
529if (echo >conf$$.file) 2>/dev/null; then
530  if ln -s conf$$.file conf$$ 2>/dev/null; then
531    as_ln_s='ln -s'
532    # ... but there are two gotchas:
533    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
534    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
535    # In both cases, we have to default to `cp -pR'.
536    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
537      as_ln_s='cp -pR'
538  elif ln conf$$.file conf$$ 2>/dev/null; then
539    as_ln_s=ln
540  else
541    as_ln_s='cp -pR'
542  fi
543else
544  as_ln_s='cp -pR'
545fi
546rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
547rmdir conf$$.dir 2>/dev/null
548
549if mkdir -p . 2>/dev/null; then
550  as_mkdir_p='mkdir -p "$as_dir"'
551else
552  test -d ./-p && rmdir ./-p
553  as_mkdir_p=false
554fi
555
556as_test_x='test -x'
557as_executable_p=as_fn_executable_p
558
559# Sed expression to map a string onto a valid CPP name.
560as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
561
562# Sed expression to map a string onto a valid variable name.
563as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
564
565
566test -n "$DJDIR" || exec 7<&0 </dev/null
567exec 6>&1
568
569# Name of the host.
570# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
571# so uname gets run too.
572ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
573
574#
575# Initializations.
576#
577ac_default_prefix=/usr/local
578ac_clean_files=
579ac_config_libobj_dir=.
580LIBOBJS=
581cross_compiling=no
582subdirs=
583MFLAGS=
584MAKEFLAGS=
585
586# Identity of this package.
587PACKAGE_NAME='OpenJDK'
588PACKAGE_TARNAME='openjdk'
589PACKAGE_VERSION='jdk9'
590PACKAGE_STRING='OpenJDK jdk9'
591PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
592PACKAGE_URL='http://openjdk.java.net'
593
594# Factoring default headers for most tests.
595ac_includes_default="\
596#include <stdio.h>
597#ifdef HAVE_SYS_TYPES_H
598# include <sys/types.h>
599#endif
600#ifdef HAVE_SYS_STAT_H
601# include <sys/stat.h>
602#endif
603#ifdef STDC_HEADERS
604# include <stdlib.h>
605# include <stddef.h>
606#else
607# ifdef HAVE_STDLIB_H
608#  include <stdlib.h>
609# endif
610#endif
611#ifdef HAVE_STRING_H
612# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
613#  include <memory.h>
614# endif
615# include <string.h>
616#endif
617#ifdef HAVE_STRINGS_H
618# include <strings.h>
619#endif
620#ifdef HAVE_INTTYPES_H
621# include <inttypes.h>
622#endif
623#ifdef HAVE_STDINT_H
624# include <stdint.h>
625#endif
626#ifdef HAVE_UNISTD_H
627# include <unistd.h>
628#endif"
629
630ac_subst_vars='LTLIBOBJS
631LIBOBJS
632CFLAGS_CCACHE
633CCACHE
634USE_PRECOMPILED_HEADER
635BUILD_ICECC
636ICECC
637ICECC_WRAPPER
638ICECC_CREATE_ENV
639ICECC_CMD
640ENABLE_JAVAC_SERVER
641ENABLE_SJAVAC
642SJAVAC_SERVER_JAVA_FLAGS
643SJAVAC_SERVER_JAVA
644JAVA_TOOL_FLAGS_SMALL
645JAVA_FLAGS_SMALL
646JAVA_FLAGS_JAVAC
647BOOTCYCLE_JVM_ARGS_BIG
648JAVA_FLAGS_BIG
649JAVA_FLAGS
650TEST_JOBS
651JOBS
652MEMORY_SIZE
653NUM_CORES
654ENABLE_GENERATE_CLASSLIST
655BUILD_FAILURE_HANDLER
656ENABLE_INTREE_EC
657STLPORT_LIB
658LIBZIP_CAN_USE_MMAP
659LIBDL
660LIBM
661USE_EXTERNAL_LCMS
662LCMS_LIBS
663LCMS_CFLAGS
664USE_EXTERNAL_LIBZ
665USE_EXTERNAL_LIBPNG
666PNG_LIBS
667PNG_CFLAGS
668USE_EXTERNAL_LIBGIF
669USE_EXTERNAL_LIBJPEG
670LLVM_LIBS
671LLVM_LDFLAGS
672LLVM_CFLAGS
673LLVM_CONFIG
674LIBFFI_LIBS
675LIBFFI_CFLAGS
676ALSA_LIBS
677ALSA_CFLAGS
678FREETYPE_BUNDLE_LIB_PATH
679FREETYPE_LIBS
680FREETYPE_CFLAGS
681CUPS_CFLAGS
682X_EXTRA_LIBS
683X_LIBS
684X_PRE_LIBS
685X_CFLAGS
686XMKMF
687MSVCP_DLL
688MSVCR_DLL
689LIBCXX
690STATIC_CXX_SETTING
691FIXPATH_DETACH_FLAG
692FIXPATH
693BUILD_GTEST
694VALID_JVM_FEATURES
695JVM_FEATURES_custom
696JVM_FEATURES_zeroshark
697JVM_FEATURES_zero
698JVM_FEATURES_minimal
699JVM_FEATURES_core
700JVM_FEATURES_client
701JVM_FEATURES_server
702INCLUDE_DTRACE
703GCOV_ENABLED
704STRIP_POLICY
705DEBUG_BINARIES
706ZIP_EXTERNAL_DEBUG_SYMBOLS
707COPY_DEBUG_SYMBOLS
708COMPILE_WITH_DEBUG_SYMBOLS
709CFLAGS_WARNINGS_ARE_ERRORS
710BUILD_CC_DISABLE_WARNING_PREFIX
711DISABLE_WARNING_PREFIX
712HOTSPOT_SET_WARNINGS_AS_ERRORS
713WARNINGS_AS_ERRORS
714COMPILER_SUPPORTS_TARGET_BITS_FLAG
715ZERO_ARCHFLAG
716LDFLAGS_TESTEXE
717LDFLAGS_TESTLIB
718CXXFLAGS_TESTEXE
719CXXFLAGS_TESTLIB
720CFLAGS_TESTEXE
721CFLAGS_TESTLIB
722OPENJDK_BUILD_JVM_LIBS
723OPENJDK_BUILD_JVM_ASFLAGS
724OPENJDK_BUILD_JVM_LDFLAGS
725OPENJDK_BUILD_JVM_CFLAGS
726OPENJDK_BUILD_LDFLAGS_HASH_STYLE
727OPENJDK_BUILD_LDFLAGS_CXX_JDK
728OPENJDK_BUILD_JDKEXE_LIBS
729OPENJDK_BUILD_JDKLIB_LIBS
730OPENJDK_BUILD_LDFLAGS_JDKEXE
731OPENJDK_BUILD_LDFLAGS_JDKLIB
732OPENJDK_BUILD_CXXFLAGS_JDKEXE
733OPENJDK_BUILD_CXXFLAGS_JDKLIB
734OPENJDK_BUILD_CFLAGS_JDKEXE
735OPENJDK_BUILD_CFLAGS_JDKLIB
736OPENJDK_BUILD_CXXSTD_CXXFLAG
737JVM_LIBS
738JVM_ASFLAGS
739JVM_LDFLAGS
740JVM_CFLAGS
741LDFLAGS_HASH_STYLE
742LDFLAGS_CXX_JDK
743JDKEXE_LIBS
744JDKLIB_LIBS
745LDFLAGS_JDKEXE
746LDFLAGS_JDKLIB
747CXXFLAGS_JDKEXE
748CXXFLAGS_JDKLIB
749CFLAGS_JDKEXE
750CFLAGS_JDKLIB
751MACOSX_VERSION_MIN
752CXXSTD_CXXFLAG
753CXX_O_FLAG_SIZE
754CXX_O_FLAG_NONE
755CXX_O_FLAG_DEBUG
756CXX_O_FLAG_NORM
757CXX_O_FLAG_HI
758CXX_O_FLAG_HIGHEST
759CXX_O_FLAG_HIGHEST_JVM
760C_O_FLAG_SIZE
761C_O_FLAG_NONE
762C_O_FLAG_DEBUG
763C_O_FLAG_NORM
764C_O_FLAG_HI
765C_O_FLAG_HIGHEST
766C_O_FLAG_HIGHEST_JVM
767JVM_CFLAGS_SYMBOLS
768CXXFLAGS_DEBUG_SYMBOLS
769CFLAGS_DEBUG_SYMBOLS
770CXX_FLAG_DEPS
771C_FLAG_DEPS
772SHARED_LIBRARY_FLAGS
773SET_SHARED_LIBRARY_MAPFILE
774SET_SHARED_LIBRARY_NAME
775SET_SHARED_LIBRARY_ORIGIN
776SET_EXECUTABLE_ORIGIN
777CXX_FLAG_REORDER
778C_FLAG_REORDER
779JVM_RCFLAGS
780RC_FLAGS
781AR_OUT_OPTION
782LD_OUT_OPTION
783EXE_OUT_OPTION
784CC_OUT_OPTION
785STRIPFLAGS
786ARFLAGS
787COMPILER_BINDCMD_FILE_FLAG
788COMPILER_COMMAND_FILE_FLAG
789COMPILER_TARGET_BITS_FLAG
790JT_HOME
791JTREGEXE
792HOTSPOT_TOOLCHAIN_TYPE
793USING_BROKEN_SUSE_LD
794PACKAGE_PATH
795USE_CLANG
796HOTSPOT_LD
797HOTSPOT_CXX
798HOTSPOT_RC
799HOTSPOT_MT
800BUILD_AS
801BUILD_LDCXX
802BUILD_LD
803BUILD_STRIP
804BUILD_OBJCOPY
805BUILD_AR
806BUILD_NM
807BUILD_CXX
808BUILD_CC
809BUILD_SYSROOT_LDFLAGS
810BUILD_SYSROOT_CFLAGS
811ac_ct_OBJDUMP
812OBJDUMP
813ac_ct_OBJCOPY
814OBJCOPY
815ac_ct_NM
816ac_ct_STRIP
817GNM
818NM
819STRIP
820MSBUILD
821DUMPBIN
822RC
823MT
824LIPO
825ac_ct_AR
826AR
827AS
828LDCXX
829LD
830CXXCPP
831CPP
832CXX_VERSION_NUMBER
833CC_VERSION_NUMBER
834ac_ct_CXX
835CXXFLAGS
836CXX
837TOOLCHAIN_PATH_CXX
838POTENTIAL_CXX
839OBJEXT
840EXEEXT
841ac_ct_CC
842CPPFLAGS
843LDFLAGS
844CFLAGS
845CC
846TOOLCHAIN_PATH_CC
847POTENTIAL_CC
848TOOLCHAIN_VERSION
849VS_LIB
850VS_INCLUDE
851VS_PATH
852CYGWIN_LINK
853SYSROOT_LDFLAGS
854SYSROOT_CFLAGS
855EXTRA_LDFLAGS
856EXTRA_CXXFLAGS
857EXTRA_CFLAGS
858LEGACY_EXTRA_LDFLAGS
859LEGACY_EXTRA_CXXFLAGS
860LEGACY_EXTRA_CFLAGS
861EXE_SUFFIX
862OBJ_SUFFIX
863STATIC_LIBRARY
864SHARED_LIBRARY
865STATIC_LIBRARY_SUFFIX
866SHARED_LIBRARY_SUFFIX
867LIBRARY_PREFIX
868TOOLCHAIN_TYPE
869STATIC_BUILD
870IMPORT_MODULES_MAKE
871IMPORT_MODULES_SRC
872IMPORT_MODULES_CONF
873IMPORT_MODULES_LIBS
874IMPORT_MODULES_CMDS
875IMPORT_MODULES_CLASSES
876BUILD_HOTSPOT
877HOTSPOT_DIST
878BUILD_OUTPUT
879JDK_TOPDIR
880NASHORN_TOPDIR
881HOTSPOT_TOPDIR
882JAXWS_TOPDIR
883JAXP_TOPDIR
884CORBA_TOPDIR
885LANGTOOLS_TOPDIR
886EXTERNAL_BUILDJDK
887BUILD_JDK
888CREATE_BUILDJDK
889JLINK
890JMOD
891BOOT_JDK_BITS
892JAVAC_FLAGS
893BOOT_JDK_MODULAR
894BOOT_JDK_SOURCETARGET
895JARSIGNER
896JAR
897JAVAH
898JAVAC
899JAVA
900BOOT_JDK
901JAVA_CHECK
902JAVAC_CHECK
903VERSION_IS_GA
904VERSION_SHORT
905VERSION_STRING
906VERSION_NUMBER_FOUR_POSITIONS
907VERSION_NUMBER
908VERSION_OPT
909VERSION_BUILD
910VERSION_PRE
911VERSION_PATCH
912VERSION_SECURITY
913VERSION_MINOR
914VERSION_MAJOR
915MACOSX_BUNDLE_ID_BASE
916MACOSX_BUNDLE_NAME_BASE
917HOTSPOT_VM_DISTRO
918COMPANY_NAME
919JDK_RC_PLATFORM_NAME
920PRODUCT_SUFFIX
921PRODUCT_NAME
922LAUNCHER_NAME
923JLINK_KEEP_PACKAGED_MODULES
924COPYRIGHT_YEAR
925COMPRESS_JARS
926INCLUDE_SA
927UNLIMITED_CRYPTO
928CACERTS_FILE
929ENABLE_HEADLESS_ONLY
930DEFAULT_MAKE_TARGET
931OS_VERSION_MICRO
932OS_VERSION_MINOR
933OS_VERSION_MAJOR
934PKG_CONFIG
935BASH_ARGS
936SETFILE
937CODESIGN
938XATTR
939DSYMUTIL
940IS_GNU_TIME
941PATCH
942DTRACE
943TIME
944STAT
945HG
946READELF
947OTOOL
948LDD
949ZIP
950UNZIP
951TAR_SUPPORTS_TRANSFORM
952TAR_INCLUDE_PARAM
953TAR_CREATE_EXTRA_PARAM
954TAR_TYPE
955FIND_DELETE
956OUTPUT_SYNC
957OUTPUT_SYNC_SUPPORTED
958CHECK_TOOLSDIR_MAKE
959CHECK_TOOLSDIR_GMAKE
960CHECK_MAKE
961CHECK_GMAKE
962MAKE
963PKGHANDLER
964CONFIGURESUPPORT_OUTPUTDIR
965OUTPUT_ROOT
966CONF_NAME
967SPEC
968SDKROOT
969XCODEBUILD
970VALID_JVM_VARIANTS
971JVM_VARIANTS
972DEBUG_LEVEL
973HOTSPOT_DEBUG_LEVEL
974JDK_VARIANT
975USERNAME
976CANONICAL_TOPDIR
977ORIGINAL_TOPDIR
978TOPDIR
979PATH_SEP
980ZERO_ARCHDEF
981HOTSPOT_BUILD_CPU_DEFINE
982HOTSPOT_BUILD_CPU_ARCH
983HOTSPOT_BUILD_CPU
984HOTSPOT_BUILD_OS_TYPE
985HOTSPOT_BUILD_OS
986OPENJDK_BUILD_BUNDLE_PLATFORM
987OPENJDK_BUILD_CPU_BUNDLE
988OPENJDK_BUILD_OS_BUNDLE
989OPENJDK_BUILD_OS_EXPORT_DIR
990OPENJDK_BUILD_CPU_JLI_CFLAGS
991OPENJDK_BUILD_CPU_OSARCH
992OPENJDK_BUILD_CPU_ISADIR
993OPENJDK_BUILD_CPU_LIBDIR
994OPENJDK_BUILD_CPU_LEGACY_LIB
995OPENJDK_BUILD_CPU_LEGACY
996HOTSPOT_TARGET_CPU_DEFINE
997HOTSPOT_TARGET_CPU_ARCH
998HOTSPOT_TARGET_CPU
999HOTSPOT_TARGET_OS_TYPE
1000HOTSPOT_TARGET_OS
1001DEFINE_CROSS_COMPILE_ARCH
1002LP64
1003OPENJDK_TARGET_BUNDLE_PLATFORM
1004OPENJDK_TARGET_CPU_BUNDLE
1005OPENJDK_TARGET_OS_BUNDLE
1006OPENJDK_TARGET_OS_EXPORT_DIR
1007OPENJDK_TARGET_CPU_JLI_CFLAGS
1008OPENJDK_TARGET_CPU_OSARCH
1009OPENJDK_TARGET_CPU_ISADIR
1010OPENJDK_TARGET_CPU_LIBDIR
1011OPENJDK_TARGET_CPU_LEGACY_LIB
1012OPENJDK_TARGET_CPU_LEGACY
1013REQUIRED_OS_VERSION
1014REQUIRED_OS_NAME
1015COMPILE_TYPE
1016OPENJDK_TARGET_CPU_ENDIAN
1017OPENJDK_TARGET_CPU_BITS
1018OPENJDK_TARGET_CPU_ARCH
1019OPENJDK_TARGET_CPU
1020OPENJDK_TARGET_OS_ENV
1021OPENJDK_TARGET_OS_TYPE
1022OPENJDK_TARGET_OS
1023OPENJDK_BUILD_CPU_ENDIAN
1024OPENJDK_BUILD_CPU_BITS
1025OPENJDK_BUILD_CPU_ARCH
1026OPENJDK_BUILD_CPU
1027OPENJDK_BUILD_OS_ENV
1028OPENJDK_BUILD_OS_TYPE
1029OPENJDK_BUILD_OS
1030OPENJDK_BUILD_AUTOCONF_NAME
1031OPENJDK_TARGET_AUTOCONF_NAME
1032target_os
1033target_vendor
1034target_cpu
1035target
1036host_os
1037host_vendor
1038host_cpu
1039host
1040build_os
1041build_vendor
1042build_cpu
1043build
1044NICE
1045CPIO
1046DF
1047READLINK
1048CYGPATH
1049SED
1050FGREP
1051EGREP
1052GREP
1053AWK
1054XARGS
1055WHICH
1056WC
1057UNIQ
1058UNAME
1059TR
1060TOUCH
1061TEE
1062TAR
1063TAIL
1064SORT
1065SH
1066RMDIR
1067RM
1068PRINTF
1069NAWK
1070MV
1071MKTEMP
1072MKDIR
1073LS
1074LN
1075GZIP
1076GUNZIP
1077HEAD
1078FIND
1079FILE
1080EXPR
1081ECHO
1082DIRNAME
1083DIFF
1084DATE
1085CUT
1086CP
1087COMM
1088CMP
1089CHMOD
1090CAT
1091BASH
1092BASENAME
1093DATE_WHEN_CONFIGURED
1094ORIGINAL_PATH
1095CONFIGURE_COMMAND_LINE
1096target_alias
1097host_alias
1098build_alias
1099LIBS
1100ECHO_T
1101ECHO_N
1102ECHO_C
1103DEFS
1104mandir
1105localedir
1106libdir
1107psdir
1108pdfdir
1109dvidir
1110htmldir
1111infodir
1112docdir
1113oldincludedir
1114includedir
1115localstatedir
1116sharedstatedir
1117sysconfdir
1118datadir
1119datarootdir
1120libexecdir
1121sbindir
1122bindir
1123program_transform_name
1124prefix
1125exec_prefix
1126PACKAGE_URL
1127PACKAGE_BUGREPORT
1128PACKAGE_STRING
1129PACKAGE_VERSION
1130PACKAGE_TARNAME
1131PACKAGE_NAME
1132PATH_SEPARATOR
1133SHELL'
1134ac_subst_files=''
1135ac_user_opts='
1136enable_option_checking
1137with_target_bits
1138enable_openjdk_only
1139with_custom_make_dir
1140with_jdk_variant
1141enable_debug
1142with_debug_level
1143with_jvm_variants
1144with_devkit
1145with_sys_root
1146with_sysroot
1147with_tools_dir
1148with_toolchain_path
1149with_extra_path
1150with_sdk_name
1151with_conf_name
1152with_output_sync
1153with_default_make_target
1154enable_headless_only
1155with_cacerts_file
1156enable_unlimited_crypto
1157with_copyright_year
1158enable_keep_packaged_modules
1159with_milestone
1160with_update_version
1161with_user_release_suffix
1162with_build_number
1163with_version_string
1164with_version_pre
1165with_version_opt
1166with_version_build
1167with_version_major
1168with_version_minor
1169with_version_security
1170with_version_patch
1171with_boot_jdk
1172with_build_jdk
1173with_add_source_root
1174with_override_source_root
1175with_adds_and_overrides
1176with_override_langtools
1177with_override_corba
1178with_override_jaxp
1179with_override_jaxws
1180with_override_hotspot
1181with_override_nashorn
1182with_override_jdk
1183with_import_hotspot
1184with_import_modules
1185enable_static_build
1186with_toolchain_type
1187with_extra_cflags
1188with_extra_cxxflags
1189with_extra_ldflags
1190with_toolchain_version
1191with_build_devkit
1192with_jtreg
1193enable_warnings_as_errors
1194with_native_debug_symbols
1195enable_debug_symbols
1196enable_zip_debug_info
1197enable_native_coverage
1198enable_dtrace
1199with_jvm_features
1200with_jvm_interpreter
1201enable_hotspot_gtest
1202with_stdc__lib
1203with_msvcr_dll
1204with_msvcp_dll
1205with_x
1206with_cups
1207with_cups_include
1208with_freetype
1209with_freetype_include
1210with_freetype_lib
1211with_freetype_src
1212enable_freetype_bundling
1213with_alsa
1214with_alsa_include
1215with_alsa_lib
1216with_libffi
1217with_libffi_include
1218with_libffi_lib
1219with_libjpeg
1220with_giflib
1221with_libpng
1222with_zlib
1223with_lcms
1224with_dxsdk
1225with_dxsdk_lib
1226with_dxsdk_include
1227enable_jtreg_failure_handler
1228enable_generate_classlist
1229with_num_cores
1230with_memory_size
1231with_jobs
1232with_test_jobs
1233with_boot_jdk_jvmargs
1234with_sjavac_server_java
1235enable_sjavac
1236enable_javac_server
1237enable_icecc
1238enable_precompiled_headers
1239enable_ccache
1240with_ccache_dir
1241'
1242      ac_precious_vars='build_alias
1243host_alias
1244target_alias
1245BASENAME
1246BASH
1247CAT
1248CHMOD
1249CMP
1250COMM
1251CP
1252CUT
1253DATE
1254DIFF
1255DIRNAME
1256ECHO
1257EXPR
1258FILE
1259FIND
1260HEAD
1261GUNZIP
1262GZIP
1263LN
1264LS
1265MKDIR
1266MKTEMP
1267MV
1268NAWK
1269PRINTF
1270RM
1271RMDIR
1272SH
1273SORT
1274TAIL
1275TAR
1276TEE
1277TOUCH
1278TR
1279UNAME
1280UNIQ
1281WC
1282WHICH
1283XARGS
1284AWK
1285GREP
1286EGREP
1287FGREP
1288SED
1289CYGPATH
1290READLINK
1291DF
1292CPIO
1293NICE
1294MAKE
1295UNZIP
1296ZIP
1297LDD
1298OTOOL
1299READELF
1300HG
1301STAT
1302TIME
1303DTRACE
1304PATCH
1305DSYMUTIL
1306XATTR
1307CODESIGN
1308SETFILE
1309PKG_CONFIG
1310JAVA
1311JAVAC
1312JAVAH
1313JAR
1314JARSIGNER
1315CC
1316CFLAGS
1317LDFLAGS
1318LIBS
1319CPPFLAGS
1320CXX
1321CXXFLAGS
1322CCC
1323CPP
1324CXXCPP
1325AS
1326AR
1327LIPO
1328STRIP
1329NM
1330GNM
1331OBJCOPY
1332OBJDUMP
1333BUILD_CC
1334BUILD_CXX
1335BUILD_NM
1336BUILD_AR
1337BUILD_OBJCOPY
1338BUILD_STRIP
1339JTREGEXE
1340XMKMF
1341FREETYPE_CFLAGS
1342FREETYPE_LIBS
1343ALSA_CFLAGS
1344ALSA_LIBS
1345LIBFFI_CFLAGS
1346LIBFFI_LIBS
1347PNG_CFLAGS
1348PNG_LIBS
1349LCMS_CFLAGS
1350LCMS_LIBS
1351ICECC_CMD
1352ICECC_CREATE_ENV
1353ICECC_WRAPPER
1354CCACHE'
1355
1356
1357# Initialize some variables set by options.
1358ac_init_help=
1359ac_init_version=false
1360ac_unrecognized_opts=
1361ac_unrecognized_sep=
1362# The variables have the same names as the options, with
1363# dashes changed to underlines.
1364cache_file=/dev/null
1365exec_prefix=NONE
1366no_create=
1367no_recursion=
1368prefix=NONE
1369program_prefix=NONE
1370program_suffix=NONE
1371program_transform_name=s,x,x,
1372silent=
1373site=
1374srcdir=
1375verbose=
1376x_includes=NONE
1377x_libraries=NONE
1378
1379# Installation directory options.
1380# These are left unexpanded so users can "make install exec_prefix=/foo"
1381# and all the variables that are supposed to be based on exec_prefix
1382# by default will actually change.
1383# Use braces instead of parens because sh, perl, etc. also accept them.
1384# (The list follows the same order as the GNU Coding Standards.)
1385bindir='${exec_prefix}/bin'
1386sbindir='${exec_prefix}/sbin'
1387libexecdir='${exec_prefix}/libexec'
1388datarootdir='${prefix}/share'
1389datadir='${datarootdir}'
1390sysconfdir='${prefix}/etc'
1391sharedstatedir='${prefix}/com'
1392localstatedir='${prefix}/var'
1393includedir='${prefix}/include'
1394oldincludedir='/usr/include'
1395docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1396infodir='${datarootdir}/info'
1397htmldir='${docdir}'
1398dvidir='${docdir}'
1399pdfdir='${docdir}'
1400psdir='${docdir}'
1401libdir='${exec_prefix}/lib'
1402localedir='${datarootdir}/locale'
1403mandir='${datarootdir}/man'
1404
1405ac_prev=
1406ac_dashdash=
1407for ac_option
1408do
1409  # If the previous option needs an argument, assign it.
1410  if test -n "$ac_prev"; then
1411    eval $ac_prev=\$ac_option
1412    ac_prev=
1413    continue
1414  fi
1415
1416  case $ac_option in
1417  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1418  *=)   ac_optarg= ;;
1419  *)    ac_optarg=yes ;;
1420  esac
1421
1422  # Accept the important Cygnus configure options, so we can diagnose typos.
1423
1424  case $ac_dashdash$ac_option in
1425  --)
1426    ac_dashdash=yes ;;
1427
1428  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1429    ac_prev=bindir ;;
1430  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1431    bindir=$ac_optarg ;;
1432
1433  -build | --build | --buil | --bui | --bu)
1434    ac_prev=build_alias ;;
1435  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1436    build_alias=$ac_optarg ;;
1437
1438  -cache-file | --cache-file | --cache-fil | --cache-fi \
1439  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1440    ac_prev=cache_file ;;
1441  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1442  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1443    cache_file=$ac_optarg ;;
1444
1445  --config-cache | -C)
1446    cache_file=config.cache ;;
1447
1448  -datadir | --datadir | --datadi | --datad)
1449    ac_prev=datadir ;;
1450  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1451    datadir=$ac_optarg ;;
1452
1453  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1454  | --dataroo | --dataro | --datar)
1455    ac_prev=datarootdir ;;
1456  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1457  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1458    datarootdir=$ac_optarg ;;
1459
1460  -disable-* | --disable-*)
1461    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1462    # Reject names that are not valid shell variable names.
1463    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1464      as_fn_error $? "invalid feature name: $ac_useropt"
1465    ac_useropt_orig=$ac_useropt
1466    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1467    case $ac_user_opts in
1468      *"
1469"enable_$ac_useropt"
1470"*) ;;
1471      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1472	 ac_unrecognized_sep=', ';;
1473    esac
1474    eval enable_$ac_useropt=no ;;
1475
1476  -docdir | --docdir | --docdi | --doc | --do)
1477    ac_prev=docdir ;;
1478  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1479    docdir=$ac_optarg ;;
1480
1481  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1482    ac_prev=dvidir ;;
1483  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1484    dvidir=$ac_optarg ;;
1485
1486  -enable-* | --enable-*)
1487    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1488    # Reject names that are not valid shell variable names.
1489    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1490      as_fn_error $? "invalid feature name: $ac_useropt"
1491    ac_useropt_orig=$ac_useropt
1492    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1493    case $ac_user_opts in
1494      *"
1495"enable_$ac_useropt"
1496"*) ;;
1497      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1498	 ac_unrecognized_sep=', ';;
1499    esac
1500    eval enable_$ac_useropt=\$ac_optarg ;;
1501
1502  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1503  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1504  | --exec | --exe | --ex)
1505    ac_prev=exec_prefix ;;
1506  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1507  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1508  | --exec=* | --exe=* | --ex=*)
1509    exec_prefix=$ac_optarg ;;
1510
1511  -gas | --gas | --ga | --g)
1512    # Obsolete; use --with-gas.
1513    with_gas=yes ;;
1514
1515  -help | --help | --hel | --he | -h)
1516    ac_init_help=long ;;
1517  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1518    ac_init_help=recursive ;;
1519  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1520    ac_init_help=short ;;
1521
1522  -host | --host | --hos | --ho)
1523    ac_prev=host_alias ;;
1524  -host=* | --host=* | --hos=* | --ho=*)
1525    host_alias=$ac_optarg ;;
1526
1527  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1528    ac_prev=htmldir ;;
1529  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1530  | --ht=*)
1531    htmldir=$ac_optarg ;;
1532
1533  -includedir | --includedir | --includedi | --included | --include \
1534  | --includ | --inclu | --incl | --inc)
1535    ac_prev=includedir ;;
1536  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1537  | --includ=* | --inclu=* | --incl=* | --inc=*)
1538    includedir=$ac_optarg ;;
1539
1540  -infodir | --infodir | --infodi | --infod | --info | --inf)
1541    ac_prev=infodir ;;
1542  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1543    infodir=$ac_optarg ;;
1544
1545  -libdir | --libdir | --libdi | --libd)
1546    ac_prev=libdir ;;
1547  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1548    libdir=$ac_optarg ;;
1549
1550  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1551  | --libexe | --libex | --libe)
1552    ac_prev=libexecdir ;;
1553  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1554  | --libexe=* | --libex=* | --libe=*)
1555    libexecdir=$ac_optarg ;;
1556
1557  -localedir | --localedir | --localedi | --localed | --locale)
1558    ac_prev=localedir ;;
1559  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1560    localedir=$ac_optarg ;;
1561
1562  -localstatedir | --localstatedir | --localstatedi | --localstated \
1563  | --localstate | --localstat | --localsta | --localst | --locals)
1564    ac_prev=localstatedir ;;
1565  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1566  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1567    localstatedir=$ac_optarg ;;
1568
1569  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1570    ac_prev=mandir ;;
1571  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1572    mandir=$ac_optarg ;;
1573
1574  -nfp | --nfp | --nf)
1575    # Obsolete; use --without-fp.
1576    with_fp=no ;;
1577
1578  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1579  | --no-cr | --no-c | -n)
1580    no_create=yes ;;
1581
1582  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1583  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1584    no_recursion=yes ;;
1585
1586  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1587  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1588  | --oldin | --oldi | --old | --ol | --o)
1589    ac_prev=oldincludedir ;;
1590  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1591  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1592  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1593    oldincludedir=$ac_optarg ;;
1594
1595  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1596    ac_prev=prefix ;;
1597  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1598    prefix=$ac_optarg ;;
1599
1600  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1601  | --program-pre | --program-pr | --program-p)
1602    ac_prev=program_prefix ;;
1603  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1604  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1605    program_prefix=$ac_optarg ;;
1606
1607  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1608  | --program-suf | --program-su | --program-s)
1609    ac_prev=program_suffix ;;
1610  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1611  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1612    program_suffix=$ac_optarg ;;
1613
1614  -program-transform-name | --program-transform-name \
1615  | --program-transform-nam | --program-transform-na \
1616  | --program-transform-n | --program-transform- \
1617  | --program-transform | --program-transfor \
1618  | --program-transfo | --program-transf \
1619  | --program-trans | --program-tran \
1620  | --progr-tra | --program-tr | --program-t)
1621    ac_prev=program_transform_name ;;
1622  -program-transform-name=* | --program-transform-name=* \
1623  | --program-transform-nam=* | --program-transform-na=* \
1624  | --program-transform-n=* | --program-transform-=* \
1625  | --program-transform=* | --program-transfor=* \
1626  | --program-transfo=* | --program-transf=* \
1627  | --program-trans=* | --program-tran=* \
1628  | --progr-tra=* | --program-tr=* | --program-t=*)
1629    program_transform_name=$ac_optarg ;;
1630
1631  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1632    ac_prev=pdfdir ;;
1633  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1634    pdfdir=$ac_optarg ;;
1635
1636  -psdir | --psdir | --psdi | --psd | --ps)
1637    ac_prev=psdir ;;
1638  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1639    psdir=$ac_optarg ;;
1640
1641  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1642  | -silent | --silent | --silen | --sile | --sil)
1643    silent=yes ;;
1644
1645  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1646    ac_prev=sbindir ;;
1647  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1648  | --sbi=* | --sb=*)
1649    sbindir=$ac_optarg ;;
1650
1651  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1652  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1653  | --sharedst | --shareds | --shared | --share | --shar \
1654  | --sha | --sh)
1655    ac_prev=sharedstatedir ;;
1656  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1657  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1658  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1659  | --sha=* | --sh=*)
1660    sharedstatedir=$ac_optarg ;;
1661
1662  -site | --site | --sit)
1663    ac_prev=site ;;
1664  -site=* | --site=* | --sit=*)
1665    site=$ac_optarg ;;
1666
1667  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1668    ac_prev=srcdir ;;
1669  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1670    srcdir=$ac_optarg ;;
1671
1672  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1673  | --syscon | --sysco | --sysc | --sys | --sy)
1674    ac_prev=sysconfdir ;;
1675  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1676  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1677    sysconfdir=$ac_optarg ;;
1678
1679  -target | --target | --targe | --targ | --tar | --ta | --t)
1680    ac_prev=target_alias ;;
1681  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1682    target_alias=$ac_optarg ;;
1683
1684  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1685    verbose=yes ;;
1686
1687  -version | --version | --versio | --versi | --vers | -V)
1688    ac_init_version=: ;;
1689
1690  -with-* | --with-*)
1691    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1692    # Reject names that are not valid shell variable names.
1693    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1694      as_fn_error $? "invalid package name: $ac_useropt"
1695    ac_useropt_orig=$ac_useropt
1696    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1697    case $ac_user_opts in
1698      *"
1699"with_$ac_useropt"
1700"*) ;;
1701      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1702	 ac_unrecognized_sep=', ';;
1703    esac
1704    eval with_$ac_useropt=\$ac_optarg ;;
1705
1706  -without-* | --without-*)
1707    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1708    # Reject names that are not valid shell variable names.
1709    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1710      as_fn_error $? "invalid package name: $ac_useropt"
1711    ac_useropt_orig=$ac_useropt
1712    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1713    case $ac_user_opts in
1714      *"
1715"with_$ac_useropt"
1716"*) ;;
1717      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1718	 ac_unrecognized_sep=', ';;
1719    esac
1720    eval with_$ac_useropt=no ;;
1721
1722  --x)
1723    # Obsolete; use --with-x.
1724    with_x=yes ;;
1725
1726  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1727  | --x-incl | --x-inc | --x-in | --x-i)
1728    ac_prev=x_includes ;;
1729  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1730  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1731    x_includes=$ac_optarg ;;
1732
1733  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1734  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1735    ac_prev=x_libraries ;;
1736  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1737  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1738    x_libraries=$ac_optarg ;;
1739
1740  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1741Try \`$0 --help' for more information"
1742    ;;
1743
1744  *=*)
1745    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1746    # Reject names that are not valid shell variable names.
1747    case $ac_envvar in #(
1748      '' | [0-9]* | *[!_$as_cr_alnum]* )
1749      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1750    esac
1751    eval $ac_envvar=\$ac_optarg
1752    export $ac_envvar ;;
1753
1754  *)
1755    # FIXME: should be removed in autoconf 3.0.
1756    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1757    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1758      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1759    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1760    ;;
1761
1762  esac
1763done
1764
1765if test -n "$ac_prev"; then
1766  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1767  as_fn_error $? "missing argument to $ac_option"
1768fi
1769
1770if test -n "$ac_unrecognized_opts"; then
1771  case $enable_option_checking in
1772    no) ;;
1773    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1774    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1775  esac
1776fi
1777
1778# Check all directory arguments for consistency.
1779for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1780		datadir sysconfdir sharedstatedir localstatedir includedir \
1781		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1782		libdir localedir mandir
1783do
1784  eval ac_val=\$$ac_var
1785  # Remove trailing slashes.
1786  case $ac_val in
1787    */ )
1788      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1789      eval $ac_var=\$ac_val;;
1790  esac
1791  # Be sure to have absolute directory names.
1792  case $ac_val in
1793    [\\/$]* | ?:[\\/]* )  continue;;
1794    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1795  esac
1796  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1797done
1798
1799# There might be people who depend on the old broken behavior: `$host'
1800# used to hold the argument of --host etc.
1801# FIXME: To remove some day.
1802build=$build_alias
1803host=$host_alias
1804target=$target_alias
1805
1806# FIXME: To remove some day.
1807if test "x$host_alias" != x; then
1808  if test "x$build_alias" = x; then
1809    cross_compiling=maybe
1810  elif test "x$build_alias" != "x$host_alias"; then
1811    cross_compiling=yes
1812  fi
1813fi
1814
1815ac_tool_prefix=
1816test -n "$host_alias" && ac_tool_prefix=$host_alias-
1817
1818test "$silent" = yes && exec 6>/dev/null
1819
1820
1821ac_pwd=`pwd` && test -n "$ac_pwd" &&
1822ac_ls_di=`ls -di .` &&
1823ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1824  as_fn_error $? "working directory cannot be determined"
1825test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1826  as_fn_error $? "pwd does not report name of working directory"
1827
1828
1829# Find the source files, if location was not specified.
1830if test -z "$srcdir"; then
1831  ac_srcdir_defaulted=yes
1832  # Try the directory containing this script, then the parent directory.
1833  ac_confdir=`$as_dirname -- "$as_myself" ||
1834$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1835	 X"$as_myself" : 'X\(//\)[^/]' \| \
1836	 X"$as_myself" : 'X\(//\)$' \| \
1837	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1838$as_echo X"$as_myself" |
1839    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1840	    s//\1/
1841	    q
1842	  }
1843	  /^X\(\/\/\)[^/].*/{
1844	    s//\1/
1845	    q
1846	  }
1847	  /^X\(\/\/\)$/{
1848	    s//\1/
1849	    q
1850	  }
1851	  /^X\(\/\).*/{
1852	    s//\1/
1853	    q
1854	  }
1855	  s/.*/./; q'`
1856  srcdir=$ac_confdir
1857  if test ! -r "$srcdir/$ac_unique_file"; then
1858    srcdir=..
1859  fi
1860else
1861  ac_srcdir_defaulted=no
1862fi
1863if test ! -r "$srcdir/$ac_unique_file"; then
1864  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1865  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1866fi
1867ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1868ac_abs_confdir=`(
1869	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1870	pwd)`
1871# When building in place, set srcdir=.
1872if test "$ac_abs_confdir" = "$ac_pwd"; then
1873  srcdir=.
1874fi
1875# Remove unnecessary trailing slashes from srcdir.
1876# Double slashes in file names in object file debugging info
1877# mess up M-x gdb in Emacs.
1878case $srcdir in
1879*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1880esac
1881for ac_var in $ac_precious_vars; do
1882  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1883  eval ac_env_${ac_var}_value=\$${ac_var}
1884  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1885  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1886done
1887
1888#
1889# Report the --help message.
1890#
1891if test "$ac_init_help" = "long"; then
1892  # Omit some internal or obsolete options to make the list less imposing.
1893  # This message is too long to be a string in the A/UX 3.1 sh.
1894  cat <<_ACEOF
1895\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1896
1897Usage: $0 [OPTION]... [VAR=VALUE]...
1898
1899To assign environment variables (e.g., CC, CFLAGS...), specify them as
1900VAR=VALUE.  See below for descriptions of some of the useful variables.
1901
1902Defaults for the options are specified in brackets.
1903
1904Configuration:
1905  -h, --help              display this help and exit
1906      --help=short        display options specific to this package
1907      --help=recursive    display the short help of all the included packages
1908  -V, --version           display version information and exit
1909  -q, --quiet, --silent   do not print \`checking ...' messages
1910      --cache-file=FILE   cache test results in FILE [disabled]
1911  -C, --config-cache      alias for \`--cache-file=config.cache'
1912  -n, --no-create         do not create output files
1913      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1914
1915Installation directories:
1916  --prefix=PREFIX         install architecture-independent files in PREFIX
1917                          [$ac_default_prefix]
1918  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1919                          [PREFIX]
1920
1921By default, \`make install' will install all the files in
1922\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1923an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1924for instance \`--prefix=\$HOME'.
1925
1926For better control, use the options below.
1927
1928Fine tuning of the installation directories:
1929  --bindir=DIR            user executables [EPREFIX/bin]
1930  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1931  --libexecdir=DIR        program executables [EPREFIX/libexec]
1932  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1933  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1934  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1935  --libdir=DIR            object code libraries [EPREFIX/lib]
1936  --includedir=DIR        C header files [PREFIX/include]
1937  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1938  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1939  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1940  --infodir=DIR           info documentation [DATAROOTDIR/info]
1941  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1942  --mandir=DIR            man documentation [DATAROOTDIR/man]
1943  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1944  --htmldir=DIR           html documentation [DOCDIR]
1945  --dvidir=DIR            dvi documentation [DOCDIR]
1946  --pdfdir=DIR            pdf documentation [DOCDIR]
1947  --psdir=DIR             ps documentation [DOCDIR]
1948_ACEOF
1949
1950  cat <<\_ACEOF
1951
1952X features:
1953  --x-includes=DIR    X include files are in DIR
1954  --x-libraries=DIR   X library files are in DIR
1955
1956System types:
1957  --build=BUILD     configure for building on BUILD [guessed]
1958  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1959  --target=TARGET   configure for building compilers for TARGET [HOST]
1960_ACEOF
1961fi
1962
1963if test -n "$ac_init_help"; then
1964  case $ac_init_help in
1965     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1966   esac
1967  cat <<\_ACEOF
1968
1969Optional Features:
1970  --disable-option-checking  ignore unrecognized --enable/--with options
1971  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1972  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1973  --enable-openjdk-only   suppress building custom source even if present
1974                          [disabled]
1975  --enable-debug          set the debug level to fastdebug (shorthand for
1976                          --with-debug-level=fastdebug) [disabled]
1977  --enable-headless-only  only build headless (no GUI) support [disabled]
1978  --enable-unlimited-crypto
1979                          Enable unlimited crypto policy [disabled]
1980  --disable-keep-packaged-modules
1981                          Do not keep packaged modules in jdk image [enable]
1982  --enable-static-build   enable static library build [disabled]
1983  --disable-warnings-as-errors
1984                          do not consider native warnings to be an error
1985                          [enabled]
1986  --enable-debug-symbols  Deprecated. Option is kept for backwards
1987                          compatibility and is ignored
1988  --enable-zip-debug-info Deprecated. Option is kept for backwards
1989                          compatibility and is ignored
1990  --enable-native-coverage
1991                          enable native compilation with code coverage
1992                          data[disabled]
1993  --enable-dtrace[=yes/no/auto]
1994                          enable dtrace. Default is auto, where dtrace is
1995                          enabled if all dependencies are present.
1996  --disable-hotspot-gtest Disables building of the Hotspot unit tests
1997  --disable-freetype-bundling
1998                          disable bundling of the freetype library with the
1999                          build result [enabled on Windows or when using
2000                          --with-freetype, disabled otherwise]
2001  --enable-jtreg-failure-handler
2002                          forces build of the jtreg failure handler to be
2003                          enabled, missing dependencies become fatal errors.
2004                          Default is auto, where the failure handler is built
2005                          if all dependencies are present and otherwise just
2006                          disabled.
2007  --disable-generate-classlist
2008                          forces enabling or disabling of the generation of a
2009                          CDS classlist at build time. Default is to generate
2010                          it when either the server or client JVMs are built.
2011  --enable-sjavac         use sjavac to do fast incremental compiles
2012                          [disabled]
2013  --disable-javac-server  disable javac server [enabled]
2014  --enable-icecc          enable distribted compilation of native code using
2015                          icecc/icecream [disabled]
2016  --disable-precompiled-headers
2017                          disable using precompiled headers when compiling C++
2018                          [enabled]
2019  --enable-ccache         enable using ccache to speed up recompilations
2020                          [disabled]
2021
2022Optional Packages:
2023  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2024  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2025  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
2026                          support it), e.g. --with-target-bits=32 [guessed]
2027  --with-custom-make-dir  Deprecated. Option is kept for backwards
2028                          compatibility and is ignored
2029  --with-jdk-variant      JDK variant to build (normal) [normal]
2030  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
2031                          optimized) [release]
2032  --with-jvm-variants     JVM variants (separated by commas) to build
2033                          (server,client,minimal,core,zero,zeroshark,custom)
2034                          [server]
2035  --with-devkit           use this devkit for compilers, tools and resources
2036  --with-sys-root         alias for --with-sysroot for backwards compatability
2037  --with-sysroot          use this directory as sysroot
2038  --with-tools-dir        alias for --with-toolchain-path for backwards
2039                          compatibility
2040  --with-toolchain-path   prepend these directories when searching for
2041                          toolchain binaries (compilers etc)
2042  --with-extra-path       prepend these directories to the default path
2043  --with-sdk-name         use the platform SDK of the given name. [macosx]
2044  --with-conf-name        use this as the name of the configuration [generated
2045                          from important configuration options]
2046  --with-output-sync      set make output sync type if supported by make.
2047                          [recurse]
2048  --with-default-make-target
2049                          set the default make target [exploded-image]
2050  --with-cacerts-file     specify alternative cacerts file
2051  --with-copyright-year   Set copyright year value for build [current year]
2052  --with-milestone        Deprecated. Option is kept for backwards
2053                          compatibility and is ignored
2054  --with-update-version   Deprecated. Option is kept for backwards
2055                          compatibility and is ignored
2056  --with-user-release-suffix
2057                          Deprecated. Option is kept for backwards
2058                          compatibility and is ignored
2059  --with-build-number     Deprecated. Option is kept for backwards
2060                          compatibility and is ignored
2061  --with-version-string   Set version string [calculated]
2062  --with-version-pre      Set the base part of the version 'PRE' field
2063                          (pre-release identifier) ['internal']
2064  --with-version-opt      Set version 'OPT' field (build metadata)
2065                          [<timestamp>.<user>.<dirname>]
2066  --with-version-build    Set version 'BUILD' field (build number) [not
2067                          specified]
2068  --with-version-major    Set version 'MAJOR' field (first number) [current
2069                          source value]
2070  --with-version-minor    Set version 'MINOR' field (second number) [current
2071                          source value]
2072  --with-version-security Set version 'SECURITY' field (third number) [current
2073                          source value]
2074  --with-version-patch    Set version 'PATCH' field (fourth number) [not
2075                          specified]
2076  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2077  --with-build-jdk        path to JDK of same version as is being built[the
2078                          newly built JDK]
2079  --with-add-source-root  Deprecated. Option is kept for backwards
2080                          compatibility and is ignored
2081  --with-override-source-root
2082                          Deprecated. Option is kept for backwards
2083                          compatibility and is ignored
2084  --with-adds-and-overrides
2085                          Deprecated. Option is kept for backwards
2086                          compatibility and is ignored
2087  --with-override-langtools
2088                          Deprecated. Option is kept for backwards
2089                          compatibility and is ignored
2090  --with-override-corba   Deprecated. Option is kept for backwards
2091                          compatibility and is ignored
2092  --with-override-jaxp    Deprecated. Option is kept for backwards
2093                          compatibility and is ignored
2094  --with-override-jaxws   Deprecated. Option is kept for backwards
2095                          compatibility and is ignored
2096  --with-override-hotspot Deprecated. Option is kept for backwards
2097                          compatibility and is ignored
2098  --with-override-nashorn Deprecated. Option is kept for backwards
2099                          compatibility and is ignored
2100  --with-override-jdk     Deprecated. Option is kept for backwards
2101                          compatibility and is ignored
2102  --with-import-hotspot   import hotspot binaries from this jdk image or
2103                          hotspot build dist dir instead of building from
2104                          source
2105  --with-import-modules   import a set of prebuilt modules either as a zip
2106                          file or an exploded directory
2107  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2108                          to show possible values [platform dependent]
2109  --with-extra-cflags     extra flags to be used when compiling jdk c-files
2110  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2111  --with-extra-ldflags    extra flags to be used when linking jdk
2112  --with-toolchain-version
2113                          the version of the toolchain to look for, use
2114                          '--help' to show possible values [platform
2115                          dependent]
2116  --with-build-devkit     Devkit to use for the build platform toolchain
2117  --with-jtreg            Regression Test Harness [probed]
2118  --with-native-debug-symbols
2119                          set the native debug symbol configuration (none,
2120                          internal, external, zipped) [varying]
2121  --with-jvm-features     additional JVM features to enable (separated by
2122                          comma), use '--help' to show possible values [none]
2123  --with-jvm-interpreter  Deprecated. Option is kept for backwards
2124                          compatibility and is ignored
2125  --with-stdc++lib=<static>,<dynamic>,<default>
2126                          force linking of the C++ runtime on Linux to either
2127                          static or dynamic, default is static with dynamic as
2128                          fallback
2129  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2130                          (Windows only) [probed]
2131  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2132                          (Windows only) [probed]
2133  --with-x                use the X Window System
2134  --with-cups             specify prefix directory for the cups package
2135                          (expecting the headers under PATH/include)
2136  --with-cups-include     specify directory for the cups include files
2137  --with-freetype         specify prefix directory for the freetype package
2138                          (expecting the libraries under PATH/lib and the
2139                          headers under PATH/include)
2140  --with-freetype-include specify directory for the freetype include files
2141  --with-freetype-lib     specify directory for the freetype library
2142  --with-freetype-src     specify directory with freetype sources to
2143                          automatically build the library (experimental,
2144                          Windows-only)
2145  --with-alsa             specify prefix directory for the alsa package
2146                          (expecting the libraries under PATH/lib and the
2147                          headers under PATH/include)
2148  --with-alsa-include     specify directory for the alsa include files
2149  --with-alsa-lib         specify directory for the alsa library
2150  --with-libffi           specify prefix directory for the libffi package
2151                          (expecting the libraries under PATH/lib and the
2152                          headers under PATH/include)
2153  --with-libffi-include   specify directory for the libffi include files
2154  --with-libffi-lib       specify directory for the libffi library
2155  --with-libjpeg          use libjpeg from build system or OpenJDK source
2156                          (system, bundled) [bundled]
2157  --with-giflib           use giflib from build system or OpenJDK source
2158                          (system, bundled) [bundled]
2159  --with-libpng           use libpng from build system or OpenJDK source
2160                          (system, bundled) [bundled]
2161  --with-zlib             use zlib from build system or OpenJDK source
2162                          (system, bundled) [bundled]
2163  --with-lcms             use lcms2 from build system or OpenJDK source
2164                          (system, bundled) [bundled]
2165  --with-dxsdk            Deprecated. Option is kept for backwards
2166                          compatibility and is ignored
2167  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2168                          compatibility and is ignored
2169  --with-dxsdk-include    Deprecated. Option is kept for backwards
2170                          compatibility and is ignored
2171  --with-num-cores        number of cores in the build system, e.g.
2172                          --with-num-cores=8 [probed]
2173  --with-memory-size      memory (in MB) available in the build system, e.g.
2174                          --with-memory-size=1024 [probed]
2175  --with-jobs             number of parallel jobs to let make run [calculated
2176                          based on cores and memory]
2177  --with-test-jobs        number of parallel tests jobs to run [based on build
2178                          jobs]
2179  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2180                          invocations of boot JDK, overriding the default
2181                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2182                          -enableassertions"
2183  --with-sjavac-server-java
2184                          use this java binary for running the sjavac
2185                          background server [Boot JDK java]
2186  --with-ccache-dir       where to store ccache files [~/.ccache]
2187
2188Some influential environment variables:
2189  BASENAME    Override default value for BASENAME
2190  BASH        Override default value for BASH
2191  CAT         Override default value for CAT
2192  CHMOD       Override default value for CHMOD
2193  CMP         Override default value for CMP
2194  COMM        Override default value for COMM
2195  CP          Override default value for CP
2196  CUT         Override default value for CUT
2197  DATE        Override default value for DATE
2198  DIFF        Override default value for DIFF
2199  DIRNAME     Override default value for DIRNAME
2200  ECHO        Override default value for ECHO
2201  EXPR        Override default value for EXPR
2202  FILE        Override default value for FILE
2203  FIND        Override default value for FIND
2204  HEAD        Override default value for HEAD
2205  GUNZIP      Override default value for GUNZIP
2206  GZIP        Override default value for GZIP
2207  LN          Override default value for LN
2208  LS          Override default value for LS
2209  MKDIR       Override default value for MKDIR
2210  MKTEMP      Override default value for MKTEMP
2211  MV          Override default value for MV
2212  NAWK        Override default value for NAWK
2213  PRINTF      Override default value for PRINTF
2214  RM          Override default value for RM
2215  RMDIR       Override default value for RMDIR
2216  SH          Override default value for SH
2217  SORT        Override default value for SORT
2218  TAIL        Override default value for TAIL
2219  TAR         Override default value for TAR
2220  TEE         Override default value for TEE
2221  TOUCH       Override default value for TOUCH
2222  TR          Override default value for TR
2223  UNAME       Override default value for UNAME
2224  UNIQ        Override default value for UNIQ
2225  WC          Override default value for WC
2226  WHICH       Override default value for WHICH
2227  XARGS       Override default value for XARGS
2228  AWK         Override default value for AWK
2229  GREP        Override default value for GREP
2230  EGREP       Override default value for EGREP
2231  FGREP       Override default value for FGREP
2232  SED         Override default value for SED
2233  CYGPATH     Override default value for CYGPATH
2234  READLINK    Override default value for READLINK
2235  DF          Override default value for DF
2236  CPIO        Override default value for CPIO
2237  NICE        Override default value for NICE
2238  MAKE        Override default value for MAKE
2239  UNZIP       Override default value for UNZIP
2240  ZIP         Override default value for ZIP
2241  LDD         Override default value for LDD
2242  OTOOL       Override default value for OTOOL
2243  READELF     Override default value for READELF
2244  HG          Override default value for HG
2245  STAT        Override default value for STAT
2246  TIME        Override default value for TIME
2247  DTRACE      Override default value for DTRACE
2248  PATCH       Override default value for PATCH
2249  DSYMUTIL    Override default value for DSYMUTIL
2250  XATTR       Override default value for XATTR
2251  CODESIGN    Override default value for CODESIGN
2252  SETFILE     Override default value for SETFILE
2253  PKG_CONFIG  path to pkg-config utility
2254  JAVA        Override default value for JAVA
2255  JAVAC       Override default value for JAVAC
2256  JAVAH       Override default value for JAVAH
2257  JAR         Override default value for JAR
2258  JARSIGNER   Override default value for JARSIGNER
2259  CC          C compiler command
2260  CFLAGS      C compiler flags
2261  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2262              nonstandard directory <lib dir>
2263  LIBS        libraries to pass to the linker, e.g. -l<library>
2264  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2265              you have headers in a nonstandard directory <include dir>
2266  CXX         C++ compiler command
2267  CXXFLAGS    C++ compiler flags
2268  CPP         C preprocessor
2269  CXXCPP      C++ preprocessor
2270  AS          Override default value for AS
2271  AR          Override default value for AR
2272  LIPO        Override default value for LIPO
2273  STRIP       Override default value for STRIP
2274  NM          Override default value for NM
2275  GNM         Override default value for GNM
2276  OBJCOPY     Override default value for OBJCOPY
2277  OBJDUMP     Override default value for OBJDUMP
2278  BUILD_CC    Override default value for BUILD_CC
2279  BUILD_CXX   Override default value for BUILD_CXX
2280  BUILD_NM    Override default value for BUILD_NM
2281  BUILD_AR    Override default value for BUILD_AR
2282  BUILD_OBJCOPY
2283              Override default value for BUILD_OBJCOPY
2284  BUILD_STRIP Override default value for BUILD_STRIP
2285  JTREGEXE    Override default value for JTREGEXE
2286  XMKMF       Path to xmkmf, Makefile generator for X Window System
2287  FREETYPE_CFLAGS
2288              C compiler flags for FREETYPE, overriding pkg-config
2289  FREETYPE_LIBS
2290              linker flags for FREETYPE, overriding pkg-config
2291  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2292  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2293  LIBFFI_CFLAGS
2294              C compiler flags for LIBFFI, overriding pkg-config
2295  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2296  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2297  PNG_LIBS    linker flags for PNG, overriding pkg-config
2298  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2299  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2300  ICECC_CMD   Override default value for ICECC_CMD
2301  ICECC_CREATE_ENV
2302              Override default value for ICECC_CREATE_ENV
2303  ICECC_WRAPPER
2304              Override default value for ICECC_WRAPPER
2305  CCACHE      Override default value for CCACHE
2306
2307Use these variables to override the choices made by `configure' or to help
2308it to find libraries and programs with nonstandard names/locations.
2309
2310Report bugs to <build-dev@openjdk.java.net>.
2311OpenJDK home page: <http://openjdk.java.net>.
2312_ACEOF
2313ac_status=$?
2314fi
2315
2316if test "$ac_init_help" = "recursive"; then
2317  # If there are subdirs, report their specific --help.
2318  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2319    test -d "$ac_dir" ||
2320      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2321      continue
2322    ac_builddir=.
2323
2324case "$ac_dir" in
2325.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2326*)
2327  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2328  # A ".." for each directory in $ac_dir_suffix.
2329  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2330  case $ac_top_builddir_sub in
2331  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2332  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2333  esac ;;
2334esac
2335ac_abs_top_builddir=$ac_pwd
2336ac_abs_builddir=$ac_pwd$ac_dir_suffix
2337# for backward compatibility:
2338ac_top_builddir=$ac_top_build_prefix
2339
2340case $srcdir in
2341  .)  # We are building in place.
2342    ac_srcdir=.
2343    ac_top_srcdir=$ac_top_builddir_sub
2344    ac_abs_top_srcdir=$ac_pwd ;;
2345  [\\/]* | ?:[\\/]* )  # Absolute name.
2346    ac_srcdir=$srcdir$ac_dir_suffix;
2347    ac_top_srcdir=$srcdir
2348    ac_abs_top_srcdir=$srcdir ;;
2349  *) # Relative name.
2350    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2351    ac_top_srcdir=$ac_top_build_prefix$srcdir
2352    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2353esac
2354ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2355
2356    cd "$ac_dir" || { ac_status=$?; continue; }
2357    # Check for guested configure.
2358    if test -f "$ac_srcdir/configure.gnu"; then
2359      echo &&
2360      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2361    elif test -f "$ac_srcdir/configure"; then
2362      echo &&
2363      $SHELL "$ac_srcdir/configure" --help=recursive
2364    else
2365      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2366    fi || ac_status=$?
2367    cd "$ac_pwd" || { ac_status=$?; break; }
2368  done
2369fi
2370
2371test -n "$ac_init_help" && exit $ac_status
2372if $ac_init_version; then
2373  cat <<\_ACEOF
2374OpenJDK configure jdk9
2375generated by GNU Autoconf 2.69
2376
2377Copyright (C) 2012 Free Software Foundation, Inc.
2378This configure script is free software; the Free Software Foundation
2379gives unlimited permission to copy, distribute and modify it.
2380_ACEOF
2381  exit
2382fi
2383
2384## ------------------------ ##
2385## Autoconf initialization. ##
2386## ------------------------ ##
2387
2388# ac_fn_c_try_compile LINENO
2389# --------------------------
2390# Try to compile conftest.$ac_ext, and return whether this succeeded.
2391ac_fn_c_try_compile ()
2392{
2393  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2394  rm -f conftest.$ac_objext
2395  if { { ac_try="$ac_compile"
2396case "(($ac_try" in
2397  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2398  *) ac_try_echo=$ac_try;;
2399esac
2400eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2401$as_echo "$ac_try_echo"; } >&5
2402  (eval "$ac_compile") 2>conftest.err
2403  ac_status=$?
2404  if test -s conftest.err; then
2405    grep -v '^ *+' conftest.err >conftest.er1
2406    cat conftest.er1 >&5
2407    mv -f conftest.er1 conftest.err
2408  fi
2409  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2410  test $ac_status = 0; } && {
2411	 test -z "$ac_c_werror_flag" ||
2412	 test ! -s conftest.err
2413       } && test -s conftest.$ac_objext; then :
2414  ac_retval=0
2415else
2416  $as_echo "$as_me: failed program was:" >&5
2417sed 's/^/| /' conftest.$ac_ext >&5
2418
2419	ac_retval=1
2420fi
2421  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2422  as_fn_set_status $ac_retval
2423
2424} # ac_fn_c_try_compile
2425
2426# ac_fn_cxx_try_compile LINENO
2427# ----------------------------
2428# Try to compile conftest.$ac_ext, and return whether this succeeded.
2429ac_fn_cxx_try_compile ()
2430{
2431  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2432  rm -f conftest.$ac_objext
2433  if { { ac_try="$ac_compile"
2434case "(($ac_try" in
2435  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2436  *) ac_try_echo=$ac_try;;
2437esac
2438eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2439$as_echo "$ac_try_echo"; } >&5
2440  (eval "$ac_compile") 2>conftest.err
2441  ac_status=$?
2442  if test -s conftest.err; then
2443    grep -v '^ *+' conftest.err >conftest.er1
2444    cat conftest.er1 >&5
2445    mv -f conftest.er1 conftest.err
2446  fi
2447  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2448  test $ac_status = 0; } && {
2449	 test -z "$ac_cxx_werror_flag" ||
2450	 test ! -s conftest.err
2451       } && test -s conftest.$ac_objext; then :
2452  ac_retval=0
2453else
2454  $as_echo "$as_me: failed program was:" >&5
2455sed 's/^/| /' conftest.$ac_ext >&5
2456
2457	ac_retval=1
2458fi
2459  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2460  as_fn_set_status $ac_retval
2461
2462} # ac_fn_cxx_try_compile
2463
2464# ac_fn_c_try_cpp LINENO
2465# ----------------------
2466# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2467ac_fn_c_try_cpp ()
2468{
2469  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2470  if { { ac_try="$ac_cpp conftest.$ac_ext"
2471case "(($ac_try" in
2472  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2473  *) ac_try_echo=$ac_try;;
2474esac
2475eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2476$as_echo "$ac_try_echo"; } >&5
2477  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2478  ac_status=$?
2479  if test -s conftest.err; then
2480    grep -v '^ *+' conftest.err >conftest.er1
2481    cat conftest.er1 >&5
2482    mv -f conftest.er1 conftest.err
2483  fi
2484  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2485  test $ac_status = 0; } > conftest.i && {
2486	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2487	 test ! -s conftest.err
2488       }; then :
2489  ac_retval=0
2490else
2491  $as_echo "$as_me: failed program was:" >&5
2492sed 's/^/| /' conftest.$ac_ext >&5
2493
2494    ac_retval=1
2495fi
2496  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2497  as_fn_set_status $ac_retval
2498
2499} # ac_fn_c_try_cpp
2500
2501# ac_fn_cxx_try_cpp LINENO
2502# ------------------------
2503# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2504ac_fn_cxx_try_cpp ()
2505{
2506  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2507  if { { ac_try="$ac_cpp conftest.$ac_ext"
2508case "(($ac_try" in
2509  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2510  *) ac_try_echo=$ac_try;;
2511esac
2512eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2513$as_echo "$ac_try_echo"; } >&5
2514  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2515  ac_status=$?
2516  if test -s conftest.err; then
2517    grep -v '^ *+' conftest.err >conftest.er1
2518    cat conftest.er1 >&5
2519    mv -f conftest.er1 conftest.err
2520  fi
2521  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2522  test $ac_status = 0; } > conftest.i && {
2523	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2524	 test ! -s conftest.err
2525       }; then :
2526  ac_retval=0
2527else
2528  $as_echo "$as_me: failed program was:" >&5
2529sed 's/^/| /' conftest.$ac_ext >&5
2530
2531    ac_retval=1
2532fi
2533  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2534  as_fn_set_status $ac_retval
2535
2536} # ac_fn_cxx_try_cpp
2537
2538# ac_fn_c_try_link LINENO
2539# -----------------------
2540# Try to link conftest.$ac_ext, and return whether this succeeded.
2541ac_fn_c_try_link ()
2542{
2543  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2544  rm -f conftest.$ac_objext conftest$ac_exeext
2545  if { { ac_try="$ac_link"
2546case "(($ac_try" in
2547  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2548  *) ac_try_echo=$ac_try;;
2549esac
2550eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2551$as_echo "$ac_try_echo"; } >&5
2552  (eval "$ac_link") 2>conftest.err
2553  ac_status=$?
2554  if test -s conftest.err; then
2555    grep -v '^ *+' conftest.err >conftest.er1
2556    cat conftest.er1 >&5
2557    mv -f conftest.er1 conftest.err
2558  fi
2559  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2560  test $ac_status = 0; } && {
2561	 test -z "$ac_c_werror_flag" ||
2562	 test ! -s conftest.err
2563       } && test -s conftest$ac_exeext && {
2564	 test "$cross_compiling" = yes ||
2565	 test -x conftest$ac_exeext
2566       }; then :
2567  ac_retval=0
2568else
2569  $as_echo "$as_me: failed program was:" >&5
2570sed 's/^/| /' conftest.$ac_ext >&5
2571
2572	ac_retval=1
2573fi
2574  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2575  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2576  # interfere with the next link command; also delete a directory that is
2577  # left behind by Apple's compiler.  We do this before executing the actions.
2578  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2579  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2580  as_fn_set_status $ac_retval
2581
2582} # ac_fn_c_try_link
2583
2584# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2585# ---------------------------------------------------------
2586# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2587# the include files in INCLUDES and setting the cache variable VAR
2588# accordingly.
2589ac_fn_cxx_check_header_mongrel ()
2590{
2591  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2592  if eval \${$3+:} false; then :
2593  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2594$as_echo_n "checking for $2... " >&6; }
2595if eval \${$3+:} false; then :
2596  $as_echo_n "(cached) " >&6
2597fi
2598eval ac_res=\$$3
2599	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2600$as_echo "$ac_res" >&6; }
2601else
2602  # Is the header compilable?
2603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2604$as_echo_n "checking $2 usability... " >&6; }
2605cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2606/* end confdefs.h.  */
2607$4
2608#include <$2>
2609_ACEOF
2610if ac_fn_cxx_try_compile "$LINENO"; then :
2611  ac_header_compiler=yes
2612else
2613  ac_header_compiler=no
2614fi
2615rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2617$as_echo "$ac_header_compiler" >&6; }
2618
2619# Is the header present?
2620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2621$as_echo_n "checking $2 presence... " >&6; }
2622cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2623/* end confdefs.h.  */
2624#include <$2>
2625_ACEOF
2626if ac_fn_cxx_try_cpp "$LINENO"; then :
2627  ac_header_preproc=yes
2628else
2629  ac_header_preproc=no
2630fi
2631rm -f conftest.err conftest.i conftest.$ac_ext
2632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2633$as_echo "$ac_header_preproc" >&6; }
2634
2635# So?  What about this header?
2636case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2637  yes:no: )
2638    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2639$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2640    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2641$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2642    ;;
2643  no:yes:* )
2644    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2645$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2646    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2647$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2648    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2649$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2650    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2651$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2652    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2653$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2654( $as_echo "## ----------------------------------------- ##
2655## Report this to build-dev@openjdk.java.net ##
2656## ----------------------------------------- ##"
2657     ) | sed "s/^/$as_me: WARNING:     /" >&2
2658    ;;
2659esac
2660  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2661$as_echo_n "checking for $2... " >&6; }
2662if eval \${$3+:} false; then :
2663  $as_echo_n "(cached) " >&6
2664else
2665  eval "$3=\$ac_header_compiler"
2666fi
2667eval ac_res=\$$3
2668	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2669$as_echo "$ac_res" >&6; }
2670fi
2671  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2672
2673} # ac_fn_cxx_check_header_mongrel
2674
2675# ac_fn_cxx_try_run LINENO
2676# ------------------------
2677# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2678# that executables *can* be run.
2679ac_fn_cxx_try_run ()
2680{
2681  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2682  if { { ac_try="$ac_link"
2683case "(($ac_try" in
2684  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2685  *) ac_try_echo=$ac_try;;
2686esac
2687eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2688$as_echo "$ac_try_echo"; } >&5
2689  (eval "$ac_link") 2>&5
2690  ac_status=$?
2691  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2692  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2693  { { case "(($ac_try" in
2694  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2695  *) ac_try_echo=$ac_try;;
2696esac
2697eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2698$as_echo "$ac_try_echo"; } >&5
2699  (eval "$ac_try") 2>&5
2700  ac_status=$?
2701  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2702  test $ac_status = 0; }; }; then :
2703  ac_retval=0
2704else
2705  $as_echo "$as_me: program exited with status $ac_status" >&5
2706       $as_echo "$as_me: failed program was:" >&5
2707sed 's/^/| /' conftest.$ac_ext >&5
2708
2709       ac_retval=$ac_status
2710fi
2711  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2712  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2713  as_fn_set_status $ac_retval
2714
2715} # ac_fn_cxx_try_run
2716
2717# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2718# ---------------------------------------------------------
2719# Tests whether HEADER exists and can be compiled using the include files in
2720# INCLUDES, setting the cache variable VAR accordingly.
2721ac_fn_cxx_check_header_compile ()
2722{
2723  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2724  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2725$as_echo_n "checking for $2... " >&6; }
2726if eval \${$3+:} false; then :
2727  $as_echo_n "(cached) " >&6
2728else
2729  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2730/* end confdefs.h.  */
2731$4
2732#include <$2>
2733_ACEOF
2734if ac_fn_cxx_try_compile "$LINENO"; then :
2735  eval "$3=yes"
2736else
2737  eval "$3=no"
2738fi
2739rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2740fi
2741eval ac_res=\$$3
2742	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2743$as_echo "$ac_res" >&6; }
2744  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2745
2746} # ac_fn_cxx_check_header_compile
2747
2748# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2749# ----------------------------------------------
2750# Tries to find the compile-time value of EXPR in a program that includes
2751# INCLUDES, setting VAR accordingly. Returns whether the value could be
2752# computed
2753ac_fn_cxx_compute_int ()
2754{
2755  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2756  if test "$cross_compiling" = yes; then
2757    # Depending upon the size, compute the lo and hi bounds.
2758cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2759/* end confdefs.h.  */
2760$4
2761int
2762main ()
2763{
2764static int test_array [1 - 2 * !(($2) >= 0)];
2765test_array [0] = 0;
2766return test_array [0];
2767
2768  ;
2769  return 0;
2770}
2771_ACEOF
2772if ac_fn_cxx_try_compile "$LINENO"; then :
2773  ac_lo=0 ac_mid=0
2774  while :; do
2775    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2776/* end confdefs.h.  */
2777$4
2778int
2779main ()
2780{
2781static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2782test_array [0] = 0;
2783return test_array [0];
2784
2785  ;
2786  return 0;
2787}
2788_ACEOF
2789if ac_fn_cxx_try_compile "$LINENO"; then :
2790  ac_hi=$ac_mid; break
2791else
2792  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2793			if test $ac_lo -le $ac_mid; then
2794			  ac_lo= ac_hi=
2795			  break
2796			fi
2797			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2798fi
2799rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2800  done
2801else
2802  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2803/* end confdefs.h.  */
2804$4
2805int
2806main ()
2807{
2808static int test_array [1 - 2 * !(($2) < 0)];
2809test_array [0] = 0;
2810return test_array [0];
2811
2812  ;
2813  return 0;
2814}
2815_ACEOF
2816if ac_fn_cxx_try_compile "$LINENO"; then :
2817  ac_hi=-1 ac_mid=-1
2818  while :; do
2819    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2820/* end confdefs.h.  */
2821$4
2822int
2823main ()
2824{
2825static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2826test_array [0] = 0;
2827return test_array [0];
2828
2829  ;
2830  return 0;
2831}
2832_ACEOF
2833if ac_fn_cxx_try_compile "$LINENO"; then :
2834  ac_lo=$ac_mid; break
2835else
2836  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2837			if test $ac_mid -le $ac_hi; then
2838			  ac_lo= ac_hi=
2839			  break
2840			fi
2841			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2842fi
2843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2844  done
2845else
2846  ac_lo= ac_hi=
2847fi
2848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2849fi
2850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2851# Binary search between lo and hi bounds.
2852while test "x$ac_lo" != "x$ac_hi"; do
2853  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2854  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2855/* end confdefs.h.  */
2856$4
2857int
2858main ()
2859{
2860static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2861test_array [0] = 0;
2862return test_array [0];
2863
2864  ;
2865  return 0;
2866}
2867_ACEOF
2868if ac_fn_cxx_try_compile "$LINENO"; then :
2869  ac_hi=$ac_mid
2870else
2871  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2872fi
2873rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2874done
2875case $ac_lo in #((
2876?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2877'') ac_retval=1 ;;
2878esac
2879  else
2880    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2881/* end confdefs.h.  */
2882$4
2883static long int longval () { return $2; }
2884static unsigned long int ulongval () { return $2; }
2885#include <stdio.h>
2886#include <stdlib.h>
2887int
2888main ()
2889{
2890
2891  FILE *f = fopen ("conftest.val", "w");
2892  if (! f)
2893    return 1;
2894  if (($2) < 0)
2895    {
2896      long int i = longval ();
2897      if (i != ($2))
2898	return 1;
2899      fprintf (f, "%ld", i);
2900    }
2901  else
2902    {
2903      unsigned long int i = ulongval ();
2904      if (i != ($2))
2905	return 1;
2906      fprintf (f, "%lu", i);
2907    }
2908  /* Do not output a trailing newline, as this causes \r\n confusion
2909     on some platforms.  */
2910  return ferror (f) || fclose (f) != 0;
2911
2912  ;
2913  return 0;
2914}
2915_ACEOF
2916if ac_fn_cxx_try_run "$LINENO"; then :
2917  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2918else
2919  ac_retval=1
2920fi
2921rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2922  conftest.$ac_objext conftest.beam conftest.$ac_ext
2923rm -f conftest.val
2924
2925  fi
2926  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2927  as_fn_set_status $ac_retval
2928
2929} # ac_fn_cxx_compute_int
2930
2931# ac_fn_cxx_try_link LINENO
2932# -------------------------
2933# Try to link conftest.$ac_ext, and return whether this succeeded.
2934ac_fn_cxx_try_link ()
2935{
2936  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2937  rm -f conftest.$ac_objext conftest$ac_exeext
2938  if { { ac_try="$ac_link"
2939case "(($ac_try" in
2940  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2941  *) ac_try_echo=$ac_try;;
2942esac
2943eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2944$as_echo "$ac_try_echo"; } >&5
2945  (eval "$ac_link") 2>conftest.err
2946  ac_status=$?
2947  if test -s conftest.err; then
2948    grep -v '^ *+' conftest.err >conftest.er1
2949    cat conftest.er1 >&5
2950    mv -f conftest.er1 conftest.err
2951  fi
2952  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2953  test $ac_status = 0; } && {
2954	 test -z "$ac_cxx_werror_flag" ||
2955	 test ! -s conftest.err
2956       } && test -s conftest$ac_exeext && {
2957	 test "$cross_compiling" = yes ||
2958	 test -x conftest$ac_exeext
2959       }; then :
2960  ac_retval=0
2961else
2962  $as_echo "$as_me: failed program was:" >&5
2963sed 's/^/| /' conftest.$ac_ext >&5
2964
2965	ac_retval=1
2966fi
2967  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2968  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2969  # interfere with the next link command; also delete a directory that is
2970  # left behind by Apple's compiler.  We do this before executing the actions.
2971  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2972  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2973  as_fn_set_status $ac_retval
2974
2975} # ac_fn_cxx_try_link
2976
2977# ac_fn_cxx_check_func LINENO FUNC VAR
2978# ------------------------------------
2979# Tests whether FUNC exists, setting the cache variable VAR accordingly
2980ac_fn_cxx_check_func ()
2981{
2982  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2983  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2984$as_echo_n "checking for $2... " >&6; }
2985if eval \${$3+:} false; then :
2986  $as_echo_n "(cached) " >&6
2987else
2988  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2989/* end confdefs.h.  */
2990/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2991   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2992#define $2 innocuous_$2
2993
2994/* System header to define __stub macros and hopefully few prototypes,
2995    which can conflict with char $2 (); below.
2996    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2997    <limits.h> exists even on freestanding compilers.  */
2998
2999#ifdef __STDC__
3000# include <limits.h>
3001#else
3002# include <assert.h>
3003#endif
3004
3005#undef $2
3006
3007/* Override any GCC internal prototype to avoid an error.
3008   Use char because int might match the return type of a GCC
3009   builtin and then its argument prototype would still apply.  */
3010#ifdef __cplusplus
3011extern "C"
3012#endif
3013char $2 ();
3014/* The GNU C library defines this for functions which it implements
3015    to always fail with ENOSYS.  Some functions are actually named
3016    something starting with __ and the normal name is an alias.  */
3017#if defined __stub_$2 || defined __stub___$2
3018choke me
3019#endif
3020
3021int
3022main ()
3023{
3024return $2 ();
3025  ;
3026  return 0;
3027}
3028_ACEOF
3029if ac_fn_cxx_try_link "$LINENO"; then :
3030  eval "$3=yes"
3031else
3032  eval "$3=no"
3033fi
3034rm -f core conftest.err conftest.$ac_objext \
3035    conftest$ac_exeext conftest.$ac_ext
3036fi
3037eval ac_res=\$$3
3038	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3039$as_echo "$ac_res" >&6; }
3040  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3041
3042} # ac_fn_cxx_check_func
3043
3044# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3045# -------------------------------------------------------
3046# Tests whether HEADER exists and can be compiled using the include files in
3047# INCLUDES, setting the cache variable VAR accordingly.
3048ac_fn_c_check_header_compile ()
3049{
3050  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3051  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3052$as_echo_n "checking for $2... " >&6; }
3053if eval \${$3+:} false; then :
3054  $as_echo_n "(cached) " >&6
3055else
3056  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3057/* end confdefs.h.  */
3058$4
3059#include <$2>
3060_ACEOF
3061if ac_fn_c_try_compile "$LINENO"; then :
3062  eval "$3=yes"
3063else
3064  eval "$3=no"
3065fi
3066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3067fi
3068eval ac_res=\$$3
3069	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3070$as_echo "$ac_res" >&6; }
3071  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3072
3073} # ac_fn_c_check_header_compile
3074cat >config.log <<_ACEOF
3075This file contains any messages produced by compilers while
3076running configure, to aid debugging if configure makes a mistake.
3077
3078It was created by OpenJDK $as_me jdk9, which was
3079generated by GNU Autoconf 2.69.  Invocation command line was
3080
3081  $ $0 $@
3082
3083_ACEOF
3084exec 5>>config.log
3085{
3086cat <<_ASUNAME
3087## --------- ##
3088## Platform. ##
3089## --------- ##
3090
3091hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3092uname -m = `(uname -m) 2>/dev/null || echo unknown`
3093uname -r = `(uname -r) 2>/dev/null || echo unknown`
3094uname -s = `(uname -s) 2>/dev/null || echo unknown`
3095uname -v = `(uname -v) 2>/dev/null || echo unknown`
3096
3097/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3098/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3099
3100/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3101/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3102/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3103/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3104/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3105/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3106/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3107
3108_ASUNAME
3109
3110as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3111for as_dir in $PATH
3112do
3113  IFS=$as_save_IFS
3114  test -z "$as_dir" && as_dir=.
3115    $as_echo "PATH: $as_dir"
3116  done
3117IFS=$as_save_IFS
3118
3119} >&5
3120
3121cat >&5 <<_ACEOF
3122
3123
3124## ----------- ##
3125## Core tests. ##
3126## ----------- ##
3127
3128_ACEOF
3129
3130
3131# Keep a trace of the command line.
3132# Strip out --no-create and --no-recursion so they do not pile up.
3133# Strip out --silent because we don't want to record it for future runs.
3134# Also quote any args containing shell meta-characters.
3135# Make two passes to allow for proper duplicate-argument suppression.
3136ac_configure_args=
3137ac_configure_args0=
3138ac_configure_args1=
3139ac_must_keep_next=false
3140for ac_pass in 1 2
3141do
3142  for ac_arg
3143  do
3144    case $ac_arg in
3145    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3146    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3147    | -silent | --silent | --silen | --sile | --sil)
3148      continue ;;
3149    *\'*)
3150      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3151    esac
3152    case $ac_pass in
3153    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3154    2)
3155      as_fn_append ac_configure_args1 " '$ac_arg'"
3156      if test $ac_must_keep_next = true; then
3157	ac_must_keep_next=false # Got value, back to normal.
3158      else
3159	case $ac_arg in
3160	  *=* | --config-cache | -C | -disable-* | --disable-* \
3161	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3162	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3163	  | -with-* | --with-* | -without-* | --without-* | --x)
3164	    case "$ac_configure_args0 " in
3165	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3166	    esac
3167	    ;;
3168	  -* ) ac_must_keep_next=true ;;
3169	esac
3170      fi
3171      as_fn_append ac_configure_args " '$ac_arg'"
3172      ;;
3173    esac
3174  done
3175done
3176{ ac_configure_args0=; unset ac_configure_args0;}
3177{ ac_configure_args1=; unset ac_configure_args1;}
3178
3179# When interrupted or exit'd, cleanup temporary files, and complete
3180# config.log.  We remove comments because anyway the quotes in there
3181# would cause problems or look ugly.
3182# WARNING: Use '\'' to represent an apostrophe within the trap.
3183# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3184trap 'exit_status=$?
3185  # Save into config.log some information that might help in debugging.
3186  {
3187    echo
3188
3189    $as_echo "## ---------------- ##
3190## Cache variables. ##
3191## ---------------- ##"
3192    echo
3193    # The following way of writing the cache mishandles newlines in values,
3194(
3195  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3196    eval ac_val=\$$ac_var
3197    case $ac_val in #(
3198    *${as_nl}*)
3199      case $ac_var in #(
3200      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3201$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3202      esac
3203      case $ac_var in #(
3204      _ | IFS | as_nl) ;; #(
3205      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3206      *) { eval $ac_var=; unset $ac_var;} ;;
3207      esac ;;
3208    esac
3209  done
3210  (set) 2>&1 |
3211    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3212    *${as_nl}ac_space=\ *)
3213      sed -n \
3214	"s/'\''/'\''\\\\'\'''\''/g;
3215	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3216      ;; #(
3217    *)
3218      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3219      ;;
3220    esac |
3221    sort
3222)
3223    echo
3224
3225    $as_echo "## ----------------- ##
3226## Output variables. ##
3227## ----------------- ##"
3228    echo
3229    for ac_var in $ac_subst_vars
3230    do
3231      eval ac_val=\$$ac_var
3232      case $ac_val in
3233      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3234      esac
3235      $as_echo "$ac_var='\''$ac_val'\''"
3236    done | sort
3237    echo
3238
3239    if test -n "$ac_subst_files"; then
3240      $as_echo "## ------------------- ##
3241## File substitutions. ##
3242## ------------------- ##"
3243      echo
3244      for ac_var in $ac_subst_files
3245      do
3246	eval ac_val=\$$ac_var
3247	case $ac_val in
3248	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3249	esac
3250	$as_echo "$ac_var='\''$ac_val'\''"
3251      done | sort
3252      echo
3253    fi
3254
3255    if test -s confdefs.h; then
3256      $as_echo "## ----------- ##
3257## confdefs.h. ##
3258## ----------- ##"
3259      echo
3260      cat confdefs.h
3261      echo
3262    fi
3263    test "$ac_signal" != 0 &&
3264      $as_echo "$as_me: caught signal $ac_signal"
3265    $as_echo "$as_me: exit $exit_status"
3266  } >&5
3267  rm -f core *.core core.conftest.* &&
3268    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3269    exit $exit_status
3270' 0
3271for ac_signal in 1 2 13 15; do
3272  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3273done
3274ac_signal=0
3275
3276# confdefs.h avoids OS command line length limits that DEFS can exceed.
3277rm -f -r conftest* confdefs.h
3278
3279$as_echo "/* confdefs.h */" > confdefs.h
3280
3281# Predefined preprocessor variables.
3282
3283cat >>confdefs.h <<_ACEOF
3284#define PACKAGE_NAME "$PACKAGE_NAME"
3285_ACEOF
3286
3287cat >>confdefs.h <<_ACEOF
3288#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3289_ACEOF
3290
3291cat >>confdefs.h <<_ACEOF
3292#define PACKAGE_VERSION "$PACKAGE_VERSION"
3293_ACEOF
3294
3295cat >>confdefs.h <<_ACEOF
3296#define PACKAGE_STRING "$PACKAGE_STRING"
3297_ACEOF
3298
3299cat >>confdefs.h <<_ACEOF
3300#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3301_ACEOF
3302
3303cat >>confdefs.h <<_ACEOF
3304#define PACKAGE_URL "$PACKAGE_URL"
3305_ACEOF
3306
3307
3308# Let the site file select an alternate cache file if it wants to.
3309# Prefer an explicitly selected file to automatically selected ones.
3310ac_site_file1=NONE
3311ac_site_file2=NONE
3312if test -n "$CONFIG_SITE"; then
3313  # We do not want a PATH search for config.site.
3314  case $CONFIG_SITE in #((
3315    -*)  ac_site_file1=./$CONFIG_SITE;;
3316    */*) ac_site_file1=$CONFIG_SITE;;
3317    *)   ac_site_file1=./$CONFIG_SITE;;
3318  esac
3319elif test "x$prefix" != xNONE; then
3320  ac_site_file1=$prefix/share/config.site
3321  ac_site_file2=$prefix/etc/config.site
3322else
3323  ac_site_file1=$ac_default_prefix/share/config.site
3324  ac_site_file2=$ac_default_prefix/etc/config.site
3325fi
3326for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3327do
3328  test "x$ac_site_file" = xNONE && continue
3329  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3330    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3331$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3332    sed 's/^/| /' "$ac_site_file" >&5
3333    . "$ac_site_file" \
3334      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3335$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3336as_fn_error $? "failed to load site script $ac_site_file
3337See \`config.log' for more details" "$LINENO" 5; }
3338  fi
3339done
3340
3341if test -r "$cache_file"; then
3342  # Some versions of bash will fail to source /dev/null (special files
3343  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3344  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3345    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3346$as_echo "$as_me: loading cache $cache_file" >&6;}
3347    case $cache_file in
3348      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3349      *)                      . "./$cache_file";;
3350    esac
3351  fi
3352else
3353  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3354$as_echo "$as_me: creating cache $cache_file" >&6;}
3355  >$cache_file
3356fi
3357
3358# Check that the precious variables saved in the cache have kept the same
3359# value.
3360ac_cache_corrupted=false
3361for ac_var in $ac_precious_vars; do
3362  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3363  eval ac_new_set=\$ac_env_${ac_var}_set
3364  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3365  eval ac_new_val=\$ac_env_${ac_var}_value
3366  case $ac_old_set,$ac_new_set in
3367    set,)
3368      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3369$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3370      ac_cache_corrupted=: ;;
3371    ,set)
3372      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3373$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3374      ac_cache_corrupted=: ;;
3375    ,);;
3376    *)
3377      if test "x$ac_old_val" != "x$ac_new_val"; then
3378	# differences in whitespace do not lead to failure.
3379	ac_old_val_w=`echo x $ac_old_val`
3380	ac_new_val_w=`echo x $ac_new_val`
3381	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3382	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3383$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3384	  ac_cache_corrupted=:
3385	else
3386	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3387$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3388	  eval $ac_var=\$ac_old_val
3389	fi
3390	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3391$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3392	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3393$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3394      fi;;
3395  esac
3396  # Pass precious variables to config.status.
3397  if test "$ac_new_set" = set; then
3398    case $ac_new_val in
3399    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3400    *) ac_arg=$ac_var=$ac_new_val ;;
3401    esac
3402    case " $ac_configure_args " in
3403      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3404      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3405    esac
3406  fi
3407done
3408if $ac_cache_corrupted; then
3409  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3410$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3411  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3412$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3413  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3414fi
3415## -------------------- ##
3416## Main body of script. ##
3417## -------------------- ##
3418
3419ac_ext=c
3420ac_cpp='$CPP $CPPFLAGS'
3421ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3422ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3423ac_compiler_gnu=$ac_cv_c_compiler_gnu
3424
3425
3426
3427ac_aux_dir=
3428for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3429  if test -f "$ac_dir/install-sh"; then
3430    ac_aux_dir=$ac_dir
3431    ac_install_sh="$ac_aux_dir/install-sh -c"
3432    break
3433  elif test -f "$ac_dir/install.sh"; then
3434    ac_aux_dir=$ac_dir
3435    ac_install_sh="$ac_aux_dir/install.sh -c"
3436    break
3437  elif test -f "$ac_dir/shtool"; then
3438    ac_aux_dir=$ac_dir
3439    ac_install_sh="$ac_aux_dir/shtool install -c"
3440    break
3441  fi
3442done
3443if test -z "$ac_aux_dir"; then
3444  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
3445fi
3446
3447# These three variables are undocumented and unsupported,
3448# and are intended to be withdrawn in a future Autoconf release.
3449# They can cause serious problems if a builder's source tree is in a directory
3450# whose full name contains unusual characters.
3451ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3452ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3453ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3454
3455
3456# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3457
3458#
3459# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3460# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3461#
3462# This code is free software; you can redistribute it and/or modify it
3463# under the terms of the GNU General Public License version 2 only, as
3464# published by the Free Software Foundation.  Oracle designates this
3465# particular file as subject to the "Classpath" exception as provided
3466# by Oracle in the LICENSE file that accompanied this code.
3467#
3468# This code is distributed in the hope that it will be useful, but WITHOUT
3469# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3470# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3471# version 2 for more details (a copy is included in the LICENSE file that
3472# accompanied this code).
3473#
3474# You should have received a copy of the GNU General Public License version
3475# 2 along with this work; if not, write to the Free Software Foundation,
3476# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3477#
3478# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3479# or visit www.oracle.com if you need additional information or have any
3480# questions.
3481#
3482
3483#
3484# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3485#
3486# This program is free software; you can redistribute it and/or modify
3487# it under the terms of the GNU General Public License as published by
3488# the Free Software Foundation; either version 2 of the License, or
3489# (at your option) any later version.
3490#
3491# This program is distributed in the hope that it will be useful, but
3492# WITHOUT ANY WARRANTY; without even the implied warranty of
3493# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3494# General Public License for more details.
3495#
3496# You should have received a copy of the GNU General Public License
3497# along with this program; if not, write to the Free Software
3498# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3499#
3500# As a special exception to the GNU General Public License, if you
3501# distribute this file as part of a program that contains a
3502# configuration script generated by Autoconf, you may include it under
3503# the same distribution terms that you use for the rest of that program.
3504
3505# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3506# ----------------------------------
3507# PKG_PROG_PKG_CONFIG
3508
3509# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3510#
3511# Check to see whether a particular set of modules exists.  Similar
3512# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3513#
3514#
3515# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3516# this or PKG_CHECK_MODULES is called, or make sure to call
3517# PKG_CHECK_EXISTS manually
3518# --------------------------------------------------------------
3519
3520
3521
3522# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3523# ---------------------------------------------
3524# _PKG_CONFIG
3525
3526# _PKG_SHORT_ERRORS_SUPPORTED
3527# -----------------------------
3528# _PKG_SHORT_ERRORS_SUPPORTED
3529
3530
3531# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3532# [ACTION-IF-NOT-FOUND])
3533#
3534#
3535# Note that if there is a possibility the first call to
3536# PKG_CHECK_MODULES might not happen, you should be sure to include an
3537# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3538#
3539#
3540# --------------------------------------------------------------
3541# PKG_CHECK_MODULES
3542
3543
3544# Include these first...
3545#
3546# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3547# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3548#
3549# This code is free software; you can redistribute it and/or modify it
3550# under the terms of the GNU General Public License version 2 only, as
3551# published by the Free Software Foundation.  Oracle designates this
3552# particular file as subject to the "Classpath" exception as provided
3553# by Oracle in the LICENSE file that accompanied this code.
3554#
3555# This code is distributed in the hope that it will be useful, but WITHOUT
3556# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3557# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3558# version 2 for more details (a copy is included in the LICENSE file that
3559# accompanied this code).
3560#
3561# You should have received a copy of the GNU General Public License version
3562# 2 along with this work; if not, write to the Free Software Foundation,
3563# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3564#
3565# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3566# or visit www.oracle.com if you need additional information or have any
3567# questions.
3568#
3569
3570# Create a function/macro that takes a series of named arguments. The call is
3571# similar to AC_DEFUN, but the setup of the function looks like this:
3572# BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3573# ... do something
3574#   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3575# ])
3576# A star (*) in front of a named argument means that it is required and it's
3577# presence will be verified. To pass e.g. the first value as a normal indexed
3578# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3579# arguments are referenced in the function by their name prefixed by ARG_, e.g.
3580# "ARG_FOO".
3581#
3582# The generated function can be called like this:
3583# MYFUNC(FOO: [foo-val],
3584#     BAR: [
3585#         $ECHO hello world
3586#     ])
3587# Note that the argument value must start on the same line as the argument name.
3588#
3589# Argument 1: Name of the function to define
3590# Argument 2: List of legal named arguments, with a * prefix for required arguments
3591# Argument 3: Argument array to treat as named, typically $@
3592# Argument 4: The main function body
3593
3594
3595# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3596# If so, then append $1 to $2 \
3597# Also set JVM_ARG_OK to true/false depending on outcome.
3598
3599
3600# Appends a string to a path variable, only adding the : when needed.
3601
3602
3603# Prepends a string to a path variable, only adding the : when needed.
3604
3605
3606# This will make sure the given variable points to a full and proper
3607# path. This means:
3608# 1) There will be no spaces in the path. On unix platforms,
3609#    spaces in the path will result in an error. On Windows,
3610#    the path will be rewritten using short-style to be space-free.
3611# 2) The path will be absolute, and it will be in unix-style (on
3612#     cygwin).
3613# $1: The name of the variable to fix
3614
3615
3616# This will make sure the given variable points to a executable
3617# with a full and proper path. This means:
3618# 1) There will be no spaces in the path. On unix platforms,
3619#    spaces in the path will result in an error. On Windows,
3620#    the path will be rewritten using short-style to be space-free.
3621# 2) The path will be absolute, and it will be in unix-style (on
3622#     cygwin).
3623# Any arguments given to the executable is preserved.
3624# If the input variable does not have a directory specification, then
3625# it need to be in the PATH.
3626# $1: The name of the variable to fix
3627
3628
3629
3630
3631# Register a --with argument but mark it as deprecated
3632# $1: The name of the with argument to deprecate, not including --with-
3633
3634
3635# Register a --enable argument but mark it as deprecated
3636# $1: The name of the with argument to deprecate, not including --enable-
3637# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3638# $3: Messages to user.
3639
3640
3641
3642
3643# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3644# $1: variable to check
3645
3646
3647# Check that there are no unprocessed overridden variables left.
3648# If so, they are an incorrect argument and we will exit with an error.
3649
3650
3651# Setup a tool for the given variable. If correctly specified by the user,
3652# use that value, otherwise search for the tool using the supplied code snippet.
3653# $1: variable to set
3654# $2: code snippet to call to look for the tool
3655# $3: code snippet to call if variable was used to find tool
3656
3657
3658# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3659# $1: variable to set
3660# $2: executable name (or list of names) to look for
3661
3662
3663# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3664# $1: variable to set
3665# $2: executable name (or list of names) to look for
3666
3667
3668# Like BASIC_PATH_PROGS but fails if no tool was found.
3669# $1: variable to set
3670# $2: executable name (or list of names) to look for
3671
3672
3673# Like BASIC_SETUP_TOOL but fails if no tool was found.
3674# $1: variable to set
3675# $2: autoconf macro to call to look for the special tool
3676
3677
3678# Setup the most fundamental tools that relies on not much else to set up,
3679# but is used by much of the early bootstrap code.
3680
3681
3682# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3683
3684
3685# Evaluates platform specific overrides for devkit variables.
3686# $1: Name of variable
3687
3688
3689
3690
3691
3692
3693#%%% Simple tools %%%
3694
3695# Check if we have found a usable version of make
3696# $1: the path to a potential make binary (or empty)
3697# $2: the description on how we found this
3698
3699
3700
3701
3702# Goes looking for a usable version of GNU make.
3703
3704
3705
3706
3707
3708
3709
3710
3711# Check if build directory is on local disk. If not possible to determine,
3712# we prefer to claim it's local.
3713# Argument 1: directory to test
3714# Argument 2: what to do if it is on local disk
3715# Argument 3: what to do otherwise (remote disk or failure)
3716
3717
3718# Check that source files have basic read permissions set. This might
3719# not be the case in cygwin in certain conditions.
3720
3721
3722
3723
3724# Check for support for specific options in bash
3725
3726
3727################################################################################
3728#
3729# Default make target
3730#
3731
3732
3733# Code to run after AC_OUTPUT
3734
3735
3736#
3737# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3738# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3739#
3740# This code is free software; you can redistribute it and/or modify it
3741# under the terms of the GNU General Public License version 2 only, as
3742# published by the Free Software Foundation.  Oracle designates this
3743# particular file as subject to the "Classpath" exception as provided
3744# by Oracle in the LICENSE file that accompanied this code.
3745#
3746# This code is distributed in the hope that it will be useful, but WITHOUT
3747# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3748# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3749# version 2 for more details (a copy is included in the LICENSE file that
3750# accompanied this code).
3751#
3752# You should have received a copy of the GNU General Public License version
3753# 2 along with this work; if not, write to the Free Software Foundation,
3754# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3755#
3756# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3757# or visit www.oracle.com if you need additional information or have any
3758# questions.
3759#
3760
3761
3762
3763
3764
3765# Helper function which possibly converts a path using DOS-style short mode.
3766# If so, the updated path is stored in $new_path.
3767# $1: The path to check
3768
3769
3770# Helper function which possibly converts a path using DOS-style short mode.
3771# If so, the updated path is stored in $new_path.
3772# $1: The path to check
3773
3774
3775# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3776# and could probably be heavily simplified. However, all changes in this
3777# area tend to need lot of testing in different scenarios, and in lack of
3778# proper unit testing, cleaning this up has not been deemed worth the effort
3779# at the moment.
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3790
3791
3792
3793
3794# ... then the rest
3795#
3796# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3797# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3798#
3799# This code is free software; you can redistribute it and/or modify it
3800# under the terms of the GNU General Public License version 2 only, as
3801# published by the Free Software Foundation.  Oracle designates this
3802# particular file as subject to the "Classpath" exception as provided
3803# by Oracle in the LICENSE file that accompanied this code.
3804#
3805# This code is distributed in the hope that it will be useful, but WITHOUT
3806# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3807# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3808# version 2 for more details (a copy is included in the LICENSE file that
3809# accompanied this code).
3810#
3811# You should have received a copy of the GNU General Public License version
3812# 2 along with this work; if not, write to the Free Software Foundation,
3813# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3814#
3815# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3816# or visit www.oracle.com if you need additional information or have any
3817# questions.
3818#
3819
3820########################################################################
3821# This file handles detection of the Boot JDK. The Boot JDK detection
3822# process has been developed as a response to solve a complex real-world
3823# problem. Initially, it was simple, but it has grown as platform after
3824# platform, idiosyncracy after idiosyncracy has been supported.
3825#
3826# The basic idea is this:
3827# 1) You need an acceptable *) JDK to use as a Boot JDK
3828# 2) There are several ways to locate a JDK, that are mostly platform
3829#    dependent **)
3830# 3) You can have multiple JDKs installed
3831# 4) If possible, configure should try to dig out an acceptable JDK
3832#    automatically, without having to resort to command-line options
3833#
3834# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3835#     javac) and not a JRE, etc.
3836#
3837# **) On Windows we typically use a well-known path.
3838#     On MacOSX we typically use the tool java_home.
3839#     On Linux we typically find javac in the $PATH, and then follow a
3840#     chain of symlinks that often ends up in a real JDK.
3841#
3842# This leads to the code where we check in different ways to locate a
3843# JDK, and if one is found, check if it is acceptable. If not, we print
3844# our reasons for rejecting it (useful when debugging non-working
3845# configure situations) and continue checking the next one.
3846########################################################################
3847
3848# Execute the check given as argument, and verify the result
3849# If the Boot JDK was previously found, do nothing
3850# $1 A command line (typically autoconf macro) to execute
3851
3852
3853# Test: Is bootjdk explicitely set by command line arguments?
3854
3855
3856# Test: Is $JAVA_HOME set?
3857
3858
3859# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3860
3861
3862# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3863# $1: Argument to the java_home binary (optional)
3864
3865
3866# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3867
3868
3869# Look for a jdk in the given path. If there are multiple, try to select the newest.
3870# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3871# $1 = Path to directory containing jdk installations.
3872# $2 = String to append to the found JDK directory to get the proper JDK home
3873
3874
3875# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3876# environmental variable as base for where to look.
3877# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3878
3879
3880# Test: Is there a JDK installed in default, well-known locations?
3881
3882
3883# Check that a command-line tool in the Boot JDK is correct
3884# $1 = name of variable to assign
3885# $2 = name of binary
3886
3887
3888###############################################################################
3889#
3890# We need a Boot JDK to bootstrap the build.
3891#
3892
3893
3894
3895
3896
3897# BUILD_JDK: the location of the latest JDK that can run
3898#   on the host system and supports the target class file version
3899#   generated in this JDK build.  This variable should only be
3900#   used after the launchers are built.
3901#
3902
3903# Execute the check given as argument, and verify the result.
3904# If the JDK was previously found, do nothing.
3905# $1 A command line (typically autoconf macro) to execute
3906
3907
3908# By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3909# is different than the host system doing the build (e.g. cross-compilation),
3910# a special BUILD_JDK is built as part of the build process.  An external
3911# prebuilt BUILD_JDK can also be supplied.
3912
3913
3914#
3915# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3916# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3917#
3918# This code is free software; you can redistribute it and/or modify it
3919# under the terms of the GNU General Public License version 2 only, as
3920# published by the Free Software Foundation.  Oracle designates this
3921# particular file as subject to the "Classpath" exception as provided
3922# by Oracle in the LICENSE file that accompanied this code.
3923#
3924# This code is distributed in the hope that it will be useful, but WITHOUT
3925# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3926# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3927# version 2 for more details (a copy is included in the LICENSE file that
3928# accompanied this code).
3929#
3930# You should have received a copy of the GNU General Public License version
3931# 2 along with this work; if not, write to the Free Software Foundation,
3932# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3933#
3934# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3935# or visit www.oracle.com if you need additional information or have any
3936# questions.
3937#
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955################################################################################
3956#
3957# Runs icecc-create-env once and prints the error if it fails
3958#
3959# $1: arguments to icecc-create-env
3960# $2: log file
3961#
3962
3963
3964################################################################################
3965#
3966# Optionally enable distributed compilation of native code using icecc/icecream
3967#
3968
3969
3970
3971
3972
3973
3974
3975#
3976# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3977# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3978#
3979# This code is free software; you can redistribute it and/or modify it
3980# under the terms of the GNU General Public License version 2 only, as
3981# published by the Free Software Foundation.  Oracle designates this
3982# particular file as subject to the "Classpath" exception as provided
3983# by Oracle in the LICENSE file that accompanied this code.
3984#
3985# This code is distributed in the hope that it will be useful, but WITHOUT
3986# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3987# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3988# version 2 for more details (a copy is included in the LICENSE file that
3989# accompanied this code).
3990#
3991# You should have received a copy of the GNU General Public License version
3992# 2 along with this work; if not, write to the Free Software Foundation,
3993# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3994#
3995# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3996# or visit www.oracle.com if you need additional information or have any
3997# questions.
3998#
3999
4000# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
4001# corresponding configure arguments instead
4002
4003
4004# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
4005# that configure can use them while detecting compilers.
4006# TOOLCHAIN_TYPE is available here.
4007# Param 1 - Optional prefix to all variables. (e.g BUILD_)
4008
4009
4010
4011
4012
4013
4014# Documentation on common flags used for solstudio in HIGHEST.
4015#
4016# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
4017#          done with care, there are some assumptions below that need to
4018#          be understood about the use of pointers, and IEEE behavior.
4019#
4020# -fns: Use non-standard floating point mode (not IEEE 754)
4021# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4022# -fsingle: Use single precision floating point with 'float'
4023# -xalias_level=basic: Assume memory references via basic pointer types do not alias
4024#   (Source with excessing pointer casting and data access with mixed
4025#    pointer types are not recommended)
4026# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4027#   (If you expect perfect errno behavior, do not use this)
4028# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4029# -xrestrict: Pointer parameters to functions do not overlap
4030#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4031#    If you pass in multiple pointers to the same data, do not use this)
4032# -xlibmil: Inline some library routines
4033#   (If you expect perfect errno behavior, do not use this)
4034# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4035#   (If you expect perfect errno behavior, do not use this)
4036#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4037
4038    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4039    # Bug?
4040    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4041    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4042    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4043    #fi
4044
4045
4046
4047
4048
4049
4050################################################################################
4051# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4052#      conditionals against.
4053# $2 - Optional prefix for each variable defined.
4054
4055
4056# FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4057#                                  IF_FALSE: [RUN-IF-FALSE])
4058# ------------------------------------------------------------
4059# Check that the C compiler supports an argument
4060
4061
4062
4063
4064# FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4065#                                    IF_FALSE: [RUN-IF-FALSE])
4066# ------------------------------------------------------------
4067# Check that the C++ compiler supports an argument
4068
4069
4070
4071
4072# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4073#                                IF_FALSE: [RUN-IF-FALSE])
4074# ------------------------------------------------------------
4075# Check that the C and C++ compilers support an argument
4076
4077
4078
4079
4080# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4081#                                   IF_FALSE: [RUN-IF-FALSE])
4082# ------------------------------------------------------------
4083# Check that the linker support an argument
4084
4085
4086
4087
4088
4089
4090# FLAGS_SETUP_GCC6_COMPILER_FLAGS([PREFIX])
4091# Arguments:
4092# $1 - Optional prefix for each variable defined.
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.13"
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=1475753998
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  elif test "x$OPENJDK_TARGET_CPU" != x; then
15945    HOTSPOT_TARGET_CPU_DEFINE=$(echo $OPENJDK_TARGET_CPU | tr a-z A-Z)
15946  fi
15947
15948
15949
15950
15951  # Also store the legacy naming of the cpu.
15952  # Ie i586 and amd64 instead of x86 and x86_64
15953  OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
15954  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15955    OPENJDK_BUILD_CPU_LEGACY="i586"
15956  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15957    # On all platforms except MacOSX replace x86_64 with amd64.
15958    OPENJDK_BUILD_CPU_LEGACY="amd64"
15959  fi
15960
15961
15962  # And the second legacy naming of the cpu.
15963  # Ie i386 and amd64 instead of x86 and x86_64.
15964  OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
15965  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15966    OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
15967  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15968    OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
15969  fi
15970
15971
15972  # This is the name of the cpu (but using i386 and amd64 instead of
15973  # x86 and x86_64, respectively), preceeded by a /, to be used when
15974  # locating libraries. On macosx, it's empty, though.
15975  OPENJDK_BUILD_CPU_LIBDIR="/$OPENJDK_BUILD_CPU_LEGACY_LIB"
15976  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
15977    OPENJDK_BUILD_CPU_LIBDIR=""
15978  fi
15979
15980
15981  # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15982  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15983  # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
15984  OPENJDK_BUILD_CPU_ISADIR=""
15985  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
15986    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15987      OPENJDK_BUILD_CPU_ISADIR="/amd64"
15988    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
15989      OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
15990    fi
15991  fi
15992
15993
15994  # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
15995  OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
15996  if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
15997    # On linux only, we replace x86 with i386.
15998    OPENJDK_BUILD_CPU_OSARCH="i386"
15999  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16000    # On all platforms except macosx, we replace x86_64 with amd64.
16001    OPENJDK_BUILD_CPU_OSARCH="amd64"
16002  fi
16003
16004
16005  OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
16006  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16007    OPENJDK_BUILD_CPU_JLI="i386"
16008  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16009    # On all platforms except macosx, we replace x86_64 with amd64.
16010    OPENJDK_BUILD_CPU_JLI="amd64"
16011  fi
16012  # Now setup the -D flags for building libjli.
16013  OPENJDK_BUILD_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_BUILD_CPU_JLI\"'"
16014  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
16015    if test "x$OPENJDK_BUILD_CPU_ARCH" = xsparc; then
16016      OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
16017    elif test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
16018      OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
16019    fi
16020  fi
16021
16022
16023  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16024      OPENJDK_BUILD_OS_EXPORT_DIR=macosx
16025  else
16026      OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
16027  fi
16028
16029
16030  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16031  # Macosx is osx and x86_64 is x64
16032  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16033    OPENJDK_BUILD_OS_BUNDLE="osx"
16034  else
16035    OPENJDK_BUILD_OS_BUNDLE="$OPENJDK_TARGET_OS"
16036  fi
16037  if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16038    OPENJDK_BUILD_CPU_BUNDLE="x64"
16039  else
16040    OPENJDK_BUILD_CPU_BUNDLE="$OPENJDK_BUILD_CPU"
16041  fi
16042  OPENJDK_BUILD_BUNDLE_PLATFORM="${OPENJDK_BUILD_OS_BUNDLE}-${OPENJDK_BUILD_CPU_BUNDLE}"
16043
16044
16045
16046
16047  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
16048    A_LP64="LP64:="
16049    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16050    # unpack200.exe
16051    if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
16052      OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
16053    fi
16054  fi
16055  LP64=$A_LP64
16056
16057
16058  if test "x$COMPILE_TYPE" = "xcross"; then
16059    # FIXME: ... or should this include reduced builds..?
16060    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
16061  else
16062    DEFINE_CROSS_COMPILE_ARCH=""
16063  fi
16064
16065
16066  # Convert openjdk platform names to hotspot names
16067
16068  HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
16069  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16070    HOTSPOT_BUILD_OS=bsd
16071  fi
16072
16073
16074  HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
16075  if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
16076    HOTSPOT_BUILD_OS_TYPE=posix
16077  fi
16078
16079
16080  HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
16081  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16082    HOTSPOT_BUILD_CPU=x86_32
16083  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16084    HOTSPOT_BUILD_CPU=sparc
16085  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16086    HOTSPOT_BUILD_CPU=ppc_64
16087  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16088    HOTSPOT_BUILD_CPU=ppc_64
16089  fi
16090
16091
16092  # This is identical with OPENJDK_*, but define anyway for consistency.
16093  HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
16094
16095
16096  # Setup HOTSPOT_BUILD_CPU_DEFINE
16097  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16098    HOTSPOT_BUILD_CPU_DEFINE=IA32
16099  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16100    HOTSPOT_BUILD_CPU_DEFINE=AMD64
16101  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16102    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16103  elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
16104    HOTSPOT_BUILD_CPU_DEFINE=AARCH64
16105  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16106    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16107  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16108    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16109
16110  # The cpu defines below are for zero, we don't support them directly.
16111  elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
16112    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16113  elif test "x$OPENJDK_BUILD_CPU" = xppc; then
16114    HOTSPOT_BUILD_CPU_DEFINE=PPC32
16115  elif test "x$OPENJDK_BUILD_CPU" = xs390; then
16116    HOTSPOT_BUILD_CPU_DEFINE=S390
16117  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
16118    HOTSPOT_BUILD_CPU_DEFINE=S390
16119  elif test "x$OPENJDK_BUILD_CPU" != x; then
16120    HOTSPOT_BUILD_CPU_DEFINE=$(echo $OPENJDK_BUILD_CPU | tr a-z A-Z)
16121  fi
16122
16123
16124
16125
16126  # ZERO_ARCHDEF is used to enable architecture-specific code.
16127  # This is used in legacy hotspot build.
16128  ZERO_ARCHDEF="$HOTSPOT_TARGET_CPU_DEFINE"
16129
16130
16131
16132
16133
16134# Continue setting up basic stuff. Most remaining code require fundamental tools.
16135
16136  # Save the current directory this script was started from
16137  CURDIR="$PWD"
16138
16139  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
16140  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
16141  # was not available at that time.
16142  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
16143  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
16144    ORIGINAL_PATH="$REWRITTEN_PATH"
16145    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
16146$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
16147  fi
16148
16149  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16150    PATH_SEP=";"
16151
16152  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
16153  if test $SRC_ROOT_LENGTH -gt 100; then
16154    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
16155  fi
16156
16157  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16158    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
16159$as_echo_n "checking cygwin release... " >&6; }
16160    CYGWIN_VERSION=`$UNAME -r`
16161    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
16162$as_echo "$CYGWIN_VERSION" >&6; }
16163    WINDOWS_ENV_VENDOR='cygwin'
16164    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
16165
16166    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
16167    if test "x$CYGWIN_VERSION_OLD" != x; then
16168      { $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
16169$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;}
16170      as_fn_error $? "Cannot continue" "$LINENO" 5
16171    fi
16172    if test "x$CYGPATH" = x; then
16173      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
16174    fi
16175    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
16176$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
16177    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16178    cygwin_winpath_root=`cd / ; cmd /c cd | $GREP ".*"`
16179    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
16180    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
16181    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
16182$as_echo "$CYGWIN_ROOT_PATH" >&6; }
16183    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
16184    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
16185    if test "x$test_cygdrive_prefix" = x; then
16186      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
16187    fi
16188  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16189    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
16190$as_echo_n "checking msys release... " >&6; }
16191    MSYS_VERSION=`$UNAME -r`
16192    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
16193$as_echo "$MSYS_VERSION" >&6; }
16194
16195    WINDOWS_ENV_VENDOR='msys'
16196    WINDOWS_ENV_VERSION="$MSYS_VERSION"
16197
16198    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
16199$as_echo_n "checking msys root directory as unix-style path... " >&6; }
16200    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16201    MSYS_ROOT_PATH=`cd / ; cmd /c cd | $GREP ".*"`
16202
16203  windows_path="$MSYS_ROOT_PATH"
16204  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16205    unix_path=`$CYGPATH -u "$windows_path"`
16206    MSYS_ROOT_PATH="$unix_path"
16207  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16208    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16209    MSYS_ROOT_PATH="$unix_path"
16210  fi
16211
16212    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
16213$as_echo "$MSYS_ROOT_PATH" >&6; }
16214    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
16215  else
16216    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
16217  fi
16218
16219  # Test if windows or unix (cygwin/msys) find is first in path.
16220  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
16221$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
16222  FIND_BINARY_OUTPUT=`find --version 2>&1`
16223  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
16224    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
16225$as_echo "unix style" >&6; }
16226  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
16227    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
16228$as_echo "Windows" >&6; }
16229    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
16230$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
16231    { $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
16232$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
16233    as_fn_error $? "Cannot continue" "$LINENO" 5
16234  else
16235    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
16236$as_echo "unknown" >&6; }
16237    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
16238$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
16239  fi
16240
16241  else
16242    PATH_SEP=":"
16243  fi
16244
16245
16246  # We get the top-level directory from the supporting wrappers.
16247  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
16248$as_echo_n "checking for top-level directory... " >&6; }
16249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
16250$as_echo "$TOPDIR" >&6; }
16251
16252
16253  # Save the original version of TOPDIR for string comparisons
16254  ORIGINAL_TOPDIR="$TOPDIR"
16255
16256
16257  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
16258
16259  # Only process if variable expands to non-empty
16260
16261  if test "x$CURDIR" != x; then
16262    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16263
16264  # Input might be given as Windows format, start by converting to
16265  # unix format.
16266  path="$CURDIR"
16267  new_path=`$CYGPATH -u "$path"`
16268
16269  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16270  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16271  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16272  # "foo.exe" is OK but "foo" is an error.
16273  #
16274  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16275  # It is also a way to make sure we got the proper file name for the real test later on.
16276  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16277  if test "x$test_shortpath" = x; then
16278    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16279$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16280    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
16281  fi
16282
16283  # Call helper function which possibly converts this using DOS-style short mode.
16284  # If so, the updated path is stored in $new_path.
16285
16286  input_path="$new_path"
16287  # Check if we need to convert this using DOS-style short mode. If the path
16288  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16289  # take no chances and rewrite it.
16290  # Note: m4 eats our [], so we need to use [ and ] instead.
16291  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16292  if test "x$has_forbidden_chars" != x; then
16293    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16294    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16295    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16296    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16297      # Going to short mode and back again did indeed matter. Since short mode is
16298      # case insensitive, let's make it lowercase to improve readability.
16299      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16300      # Now convert it back to Unix-style (cygpath)
16301      input_path=`$CYGPATH -u "$shortmode_path"`
16302      new_path="$input_path"
16303    fi
16304  fi
16305
16306  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16307  if test "x$test_cygdrive_prefix" = x; then
16308    # As a simple fix, exclude /usr/bin since it's not a real path.
16309    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16310      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16311      # a path prefixed by /cygdrive for fixpath to work.
16312      new_path="$CYGWIN_ROOT_PATH$input_path"
16313    fi
16314  fi
16315
16316
16317  if test "x$path" != "x$new_path"; then
16318    CURDIR="$new_path"
16319    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16320$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16321  fi
16322
16323    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16324
16325  path="$CURDIR"
16326  has_colon=`$ECHO $path | $GREP ^.:`
16327  new_path="$path"
16328  if test "x$has_colon" = x; then
16329    # Not in mixed or Windows style, start by that.
16330    new_path=`cmd //c echo $path`
16331  fi
16332
16333
16334  input_path="$new_path"
16335  # Check if we need to convert this using DOS-style short mode. If the path
16336  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16337  # take no chances and rewrite it.
16338  # Note: m4 eats our [], so we need to use [ and ] instead.
16339  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16340  if test "x$has_forbidden_chars" != x; then
16341    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16342    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16343  fi
16344
16345
16346  windows_path="$new_path"
16347  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16348    unix_path=`$CYGPATH -u "$windows_path"`
16349    new_path="$unix_path"
16350  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16351    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16352    new_path="$unix_path"
16353  fi
16354
16355  if test "x$path" != "x$new_path"; then
16356    CURDIR="$new_path"
16357    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16358$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16359  fi
16360
16361  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16362  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16363
16364    else
16365      # We're on a unix platform. Hooray! :)
16366      path="$CURDIR"
16367      has_space=`$ECHO "$path" | $GREP " "`
16368      if test "x$has_space" != x; then
16369        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16370$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16371        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16372      fi
16373
16374      # Use eval to expand a potential ~
16375      eval path="$path"
16376      if test ! -f "$path" && test ! -d "$path"; then
16377        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16378      fi
16379
16380      if test -d "$path"; then
16381        CURDIR="`cd "$path"; $THEPWDCMD -L`"
16382      else
16383        dir="`$DIRNAME "$path"`"
16384        base="`$BASENAME "$path"`"
16385        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16386      fi
16387    fi
16388  fi
16389
16390
16391  # Only process if variable expands to non-empty
16392
16393  if test "x$TOPDIR" != x; then
16394    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16395
16396  # Input might be given as Windows format, start by converting to
16397  # unix format.
16398  path="$TOPDIR"
16399  new_path=`$CYGPATH -u "$path"`
16400
16401  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16402  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16403  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16404  # "foo.exe" is OK but "foo" is an error.
16405  #
16406  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16407  # It is also a way to make sure we got the proper file name for the real test later on.
16408  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16409  if test "x$test_shortpath" = x; then
16410    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16411$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16412    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
16413  fi
16414
16415  # Call helper function which possibly converts this using DOS-style short mode.
16416  # If so, the updated path is stored in $new_path.
16417
16418  input_path="$new_path"
16419  # Check if we need to convert this using DOS-style short mode. If the path
16420  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16421  # take no chances and rewrite it.
16422  # Note: m4 eats our [], so we need to use [ and ] instead.
16423  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16424  if test "x$has_forbidden_chars" != x; then
16425    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16426    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16427    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16428    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16429      # Going to short mode and back again did indeed matter. Since short mode is
16430      # case insensitive, let's make it lowercase to improve readability.
16431      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16432      # Now convert it back to Unix-style (cygpath)
16433      input_path=`$CYGPATH -u "$shortmode_path"`
16434      new_path="$input_path"
16435    fi
16436  fi
16437
16438  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16439  if test "x$test_cygdrive_prefix" = x; then
16440    # As a simple fix, exclude /usr/bin since it's not a real path.
16441    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16442      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16443      # a path prefixed by /cygdrive for fixpath to work.
16444      new_path="$CYGWIN_ROOT_PATH$input_path"
16445    fi
16446  fi
16447
16448
16449  if test "x$path" != "x$new_path"; then
16450    TOPDIR="$new_path"
16451    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16452$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16453  fi
16454
16455    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16456
16457  path="$TOPDIR"
16458  has_colon=`$ECHO $path | $GREP ^.:`
16459  new_path="$path"
16460  if test "x$has_colon" = x; then
16461    # Not in mixed or Windows style, start by that.
16462    new_path=`cmd //c echo $path`
16463  fi
16464
16465
16466  input_path="$new_path"
16467  # Check if we need to convert this using DOS-style short mode. If the path
16468  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16469  # take no chances and rewrite it.
16470  # Note: m4 eats our [], so we need to use [ and ] instead.
16471  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16472  if test "x$has_forbidden_chars" != x; then
16473    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16474    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16475  fi
16476
16477
16478  windows_path="$new_path"
16479  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16480    unix_path=`$CYGPATH -u "$windows_path"`
16481    new_path="$unix_path"
16482  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16483    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16484    new_path="$unix_path"
16485  fi
16486
16487  if test "x$path" != "x$new_path"; then
16488    TOPDIR="$new_path"
16489    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16490$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16491  fi
16492
16493  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16494  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16495
16496    else
16497      # We're on a unix platform. Hooray! :)
16498      path="$TOPDIR"
16499      has_space=`$ECHO "$path" | $GREP " "`
16500      if test "x$has_space" != x; then
16501        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16502$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16503        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16504      fi
16505
16506      # Use eval to expand a potential ~
16507      eval path="$path"
16508      if test ! -f "$path" && test ! -d "$path"; then
16509        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16510      fi
16511
16512      if test -d "$path"; then
16513        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16514      else
16515        dir="`$DIRNAME "$path"`"
16516        base="`$BASENAME "$path"`"
16517        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16518      fi
16519    fi
16520  fi
16521
16522  # SRC_ROOT is a traditional alias for TOPDIR.
16523  SRC_ROOT=$TOPDIR
16524
16525  # Calculate a canonical version of TOPDIR for string comparisons
16526  CANONICAL_TOPDIR=$TOPDIR
16527
16528  if test "x$OPENJDK_BUILD_OS" != xwindows; then
16529    # Follow a chain of symbolic links. Use readlink
16530    # where it exists, else fall back to horribly
16531    # complicated shell code.
16532    if test "x$READLINK_TESTED" != yes; then
16533      # On MacOSX there is a readlink tool with a different
16534      # purpose than the GNU readlink tool. Check the found readlink.
16535      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16536      if test "x$ISGNU" = x; then
16537        # A readlink that we do not know how to use.
16538        # Are there other non-GNU readlinks out there?
16539        READLINK_TESTED=yes
16540        READLINK=
16541      fi
16542    fi
16543
16544    if test "x$READLINK" != x; then
16545      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16546    else
16547      # Save the current directory for restoring afterwards
16548      STARTDIR=$PWD
16549      COUNTER=0
16550      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16551      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16552      cd $sym_link_dir
16553      # Use -P flag to resolve symlinks in directories.
16554      cd `$THEPWDCMD -P`
16555      sym_link_dir=`$THEPWDCMD -P`
16556      # Resolve file symlinks
16557      while test $COUNTER -lt 20; do
16558        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16559        if test "x$ISLINK" == x; then
16560          # This is not a symbolic link! We are done!
16561          break
16562        fi
16563        # Again resolve directory symlinks since the target of the just found
16564        # link could be in a different directory
16565        cd `$DIRNAME $ISLINK`
16566        sym_link_dir=`$THEPWDCMD -P`
16567        sym_link_file=`$BASENAME $ISLINK`
16568        let COUNTER=COUNTER+1
16569      done
16570      cd $STARTDIR
16571      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16572    fi
16573  fi
16574
16575
16576
16577  # Locate the directory of this script.
16578  AUTOCONF_DIR=$TOPDIR/common/autoconf
16579
16580  # Setup username (for use in adhoc version strings etc)
16581  # Outer [ ] to quote m4.
16582   USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16583
16584
16585
16586# Check if it's a pure open build or if custom sources are to be used.
16587
16588  # Check whether --enable-openjdk-only was given.
16589if test "${enable_openjdk_only+set}" = set; then :
16590  enableval=$enable_openjdk_only;
16591else
16592  enable_openjdk_only="no"
16593fi
16594
16595
16596  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if custom source is suppressed (openjdk-only)" >&5
16597$as_echo_n "checking if custom source is suppressed (openjdk-only)... " >&6; }
16598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_openjdk_only" >&5
16599$as_echo "$enable_openjdk_only" >&6; }
16600  if test "x$enable_openjdk_only" = "xyes"; then
16601    SUPPRESS_CUSTOM_EXTENSIONS="true"
16602  elif test "x$enable_openjdk_only" = "xno"; then
16603    SUPPRESS_CUSTOM_EXTENSIONS="false"
16604  else
16605    as_fn_error $? "Invalid value for --enable-openjdk-only: $enable_openjdk_only" "$LINENO" 5
16606  fi
16607
16608  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16609  # the IncludeCustomExtension macro.
16610
16611
16612# Check whether --with-custom-make-dir was given.
16613if test "${with_custom_make_dir+set}" = set; then :
16614  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
16615$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16616fi
16617
16618
16619
16620
16621# These are needed to be able to create a configuration name (and thus the output directory)
16622
16623  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16624$as_echo_n "checking which variant of the JDK to build... " >&6; }
16625
16626# Check whether --with-jdk-variant was given.
16627if test "${with_jdk_variant+set}" = set; then :
16628  withval=$with_jdk_variant;
16629fi
16630
16631
16632  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16633    JDK_VARIANT="normal"
16634  else
16635    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16636  fi
16637
16638
16639
16640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16641$as_echo "$JDK_VARIANT" >&6; }
16642
16643
16644  DEBUG_LEVEL="release"
16645  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16646$as_echo_n "checking which debug level to use... " >&6; }
16647  # Check whether --enable-debug was given.
16648if test "${enable_debug+set}" = set; then :
16649  enableval=$enable_debug;
16650        ENABLE_DEBUG="${enableval}"
16651        DEBUG_LEVEL="fastdebug"
16652
16653else
16654  ENABLE_DEBUG="no"
16655fi
16656
16657
16658
16659# Check whether --with-debug-level was given.
16660if test "${with_debug_level+set}" = set; then :
16661  withval=$with_debug_level;
16662        DEBUG_LEVEL="${withval}"
16663        if test "x$ENABLE_DEBUG" = xyes; then
16664          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16665        fi
16666
16667fi
16668
16669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16670$as_echo "$DEBUG_LEVEL" >&6; }
16671
16672  if test "x$DEBUG_LEVEL" != xrelease && \
16673      test "x$DEBUG_LEVEL" != xoptimized && \
16674      test "x$DEBUG_LEVEL" != xfastdebug && \
16675      test "x$DEBUG_LEVEL" != xslowdebug; then
16676    as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16677  fi
16678
16679  # Translate DEBUG_LEVEL to debug level used by Hotspot
16680  HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16681  if test "x$DEBUG_LEVEL" = xrelease; then
16682    HOTSPOT_DEBUG_LEVEL="product"
16683  elif test "x$DEBUG_LEVEL" = xslowdebug; then
16684    HOTSPOT_DEBUG_LEVEL="debug"
16685  fi
16686
16687  if test "x$DEBUG_LEVEL" = xoptimized; then
16688    # The debug level 'optimized' is a little special because it is currently only
16689    # applicable to the HotSpot build where it means to build a completely
16690    # optimized version of the VM without any debugging code (like for the
16691    # 'release' debug level which is called 'product' in the HotSpot build) but
16692    # with the exception that it can contain additional code which is otherwise
16693    # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16694    # test new and/or experimental features which are not intended for customer
16695    # shipment. Because these new features need to be tested and benchmarked in
16696    # real world scenarios, we want to build the containing JDK at the 'release'
16697    # debug level.
16698    DEBUG_LEVEL="release"
16699  fi
16700
16701
16702
16703
16704
16705
16706# Check whether --with-jvm-variants was given.
16707if test "${with_jvm_variants+set}" = set; then :
16708  withval=$with_jvm_variants;
16709fi
16710
16711
16712  if test "x$with_jvm_variants" = x; then
16713    with_jvm_variants="server"
16714  fi
16715  JVM_VARIANTS_OPT="$with_jvm_variants"
16716
16717  # Has the user listed more than one variant?
16718  # Additional [] needed to keep m4 from mangling shell constructs.
16719  if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
16720    BUILDING_MULTIPLE_JVM_VARIANTS=true
16721  else
16722    BUILDING_MULTIPLE_JVM_VARIANTS=false
16723  fi
16724  # Replace the commas with AND for use in the build directory name.
16725  JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
16726
16727  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
16728$as_echo_n "checking which variants of the JVM to build... " >&6; }
16729  # JVM_VARIANTS is a space-separated list.
16730  # Also use minimal, not minimal1 (which is kept for backwards compatibility).
16731  JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
16732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
16733$as_echo "$JVM_VARIANTS" >&6; }
16734
16735  # Check that the selected variants are valid
16736
16737  # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
16738  # Notice that the original variant failes on SLES 10 and 11
16739  NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
16740  STACK=${JVM_VARIANTS// /$'\n'}
16741  INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16742  if test "x$INVALID_VARIANTS" != x; then
16743    { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
16744$as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
16745    as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
16746  fi
16747
16748  # All "special" variants share the same output directory ("server")
16749  VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
16750  NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
16751  STACK=${JVM_VARIANTS// /$'\n'}
16752  INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16753  if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
16754    as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
16755  fi
16756
16757
16758
16759
16760  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
16761    # zero behaves as a platform and rewrites these values. This is really weird. :(
16762    # We are guaranteed that we do not build any other variants when building zero.
16763    HOTSPOT_TARGET_CPU=zero
16764    HOTSPOT_TARGET_CPU_ARCH=zero
16765  fi
16766
16767
16768# With basic setup done, call the custom early hook.
16769
16770
16771# Check if we have devkits, extra paths or sysroot set.
16772
16773
16774# Check whether --with-devkit was given.
16775if test "${with_devkit+set}" = set; then :
16776  withval=$with_devkit;
16777
16778  # Only process if variable expands to non-empty
16779
16780  if test "x$with_devkit" != x; then
16781    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16782
16783  # Input might be given as Windows format, start by converting to
16784  # unix format.
16785  path="$with_devkit"
16786  new_path=`$CYGPATH -u "$path"`
16787
16788  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16789  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16790  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16791  # "foo.exe" is OK but "foo" is an error.
16792  #
16793  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16794  # It is also a way to make sure we got the proper file name for the real test later on.
16795  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16796  if test "x$test_shortpath" = x; then
16797    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16798$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16799    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
16800  fi
16801
16802  # Call helper function which possibly converts this using DOS-style short mode.
16803  # If so, the updated path is stored in $new_path.
16804
16805  input_path="$new_path"
16806  # Check if we need to convert this using DOS-style short mode. If the path
16807  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16808  # take no chances and rewrite it.
16809  # Note: m4 eats our [], so we need to use [ and ] instead.
16810  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16811  if test "x$has_forbidden_chars" != x; then
16812    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16813    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16814    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16815    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16816      # Going to short mode and back again did indeed matter. Since short mode is
16817      # case insensitive, let's make it lowercase to improve readability.
16818      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16819      # Now convert it back to Unix-style (cygpath)
16820      input_path=`$CYGPATH -u "$shortmode_path"`
16821      new_path="$input_path"
16822    fi
16823  fi
16824
16825  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16826  if test "x$test_cygdrive_prefix" = x; then
16827    # As a simple fix, exclude /usr/bin since it's not a real path.
16828    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16829      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16830      # a path prefixed by /cygdrive for fixpath to work.
16831      new_path="$CYGWIN_ROOT_PATH$input_path"
16832    fi
16833  fi
16834
16835
16836  if test "x$path" != "x$new_path"; then
16837    with_devkit="$new_path"
16838    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16839$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16840  fi
16841
16842    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16843
16844  path="$with_devkit"
16845  has_colon=`$ECHO $path | $GREP ^.:`
16846  new_path="$path"
16847  if test "x$has_colon" = x; then
16848    # Not in mixed or Windows style, start by that.
16849    new_path=`cmd //c echo $path`
16850  fi
16851
16852
16853  input_path="$new_path"
16854  # Check if we need to convert this using DOS-style short mode. If the path
16855  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16856  # take no chances and rewrite it.
16857  # Note: m4 eats our [], so we need to use [ and ] instead.
16858  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16859  if test "x$has_forbidden_chars" != x; then
16860    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16861    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16862  fi
16863
16864
16865  windows_path="$new_path"
16866  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16867    unix_path=`$CYGPATH -u "$windows_path"`
16868    new_path="$unix_path"
16869  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16870    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16871    new_path="$unix_path"
16872  fi
16873
16874  if test "x$path" != "x$new_path"; then
16875    with_devkit="$new_path"
16876    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16877$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16878  fi
16879
16880  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16881  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16882
16883    else
16884      # We're on a unix platform. Hooray! :)
16885      path="$with_devkit"
16886      has_space=`$ECHO "$path" | $GREP " "`
16887      if test "x$has_space" != x; then
16888        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16889$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16890        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16891      fi
16892
16893      # Use eval to expand a potential ~
16894      eval path="$path"
16895      if test ! -f "$path" && test ! -d "$path"; then
16896        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
16897      fi
16898
16899      if test -d "$path"; then
16900        with_devkit="`cd "$path"; $THEPWDCMD -L`"
16901      else
16902        dir="`$DIRNAME "$path"`"
16903        base="`$BASENAME "$path"`"
16904        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
16905      fi
16906    fi
16907  fi
16908
16909        DEVKIT_ROOT="$with_devkit"
16910        # Check for a meta data info file in the root of the devkit
16911        if test -f "$DEVKIT_ROOT/devkit.info"; then
16912          . $DEVKIT_ROOT/devkit.info
16913          # This potentially sets the following:
16914          # A descriptive name of the devkit
16915
16916  if test "x$DEVKIT_NAME" = x; then
16917    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
16918  fi
16919
16920          # Corresponds to --with-extra-path
16921
16922  if test "x$DEVKIT_EXTRA_PATH" = x; then
16923    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
16924  fi
16925
16926          # Corresponds to --with-toolchain-path
16927
16928  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16929    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
16930  fi
16931
16932          # Corresponds to --with-sysroot
16933
16934  if test "x$DEVKIT_SYSROOT" = x; then
16935    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
16936  fi
16937
16938
16939          # Identifies the Visual Studio version in the devkit
16940
16941  if test "x$DEVKIT_VS_VERSION" = x; then
16942    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
16943  fi
16944
16945          # The Visual Studio include environment variable
16946
16947  if test "x$DEVKIT_VS_INCLUDE" = x; then
16948    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
16949  fi
16950
16951          # The Visual Studio lib environment variable
16952
16953  if test "x$DEVKIT_VS_LIB" = x; then
16954    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
16955  fi
16956
16957          # Corresponds to --with-msvcr-dll
16958
16959  if test "x$DEVKIT_MSVCR_DLL" = x; then
16960    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
16961  fi
16962
16963          # Corresponds to --with-msvcp-dll
16964
16965  if test "x$DEVKIT_MSVCP_DLL" = x; then
16966    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
16967  fi
16968
16969        fi
16970
16971        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
16972$as_echo_n "checking for devkit... " >&6; }
16973        if test "x$DEVKIT_NAME" != x; then
16974          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
16975$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
16976        else
16977          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
16978$as_echo "$DEVKIT_ROOT" >&6; }
16979        fi
16980
16981
16982  if test "x$DEVKIT_EXTRA_PATH" != x; then
16983    if test "x$EXTRA_PATH" = x; then
16984      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
16985    else
16986      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
16987    fi
16988  fi
16989
16990
16991        # Fallback default of just /bin if DEVKIT_PATH is not defined
16992        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16993          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
16994        fi
16995
16996  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
16997    if test "x$TOOLCHAIN_PATH" = x; then
16998      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
16999    else
17000      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
17001    fi
17002  fi
17003
17004
17005        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
17006        # places for backwards compatiblity.
17007        if test "x$DEVKIT_SYSROOT" != x; then
17008          SYSROOT="$DEVKIT_SYSROOT"
17009        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
17010          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
17011        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
17012          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
17013        fi
17014
17015
17016fi
17017
17018
17019  # You can force the sysroot if the sysroot encoded into the compiler tools
17020  # is not correct.
17021
17022# Check whether --with-sys-root was given.
17023if test "${with_sys_root+set}" = set; then :
17024  withval=$with_sys_root; SYSROOT=$with_sys_root
17025
17026fi
17027
17028
17029
17030# Check whether --with-sysroot was given.
17031if test "${with_sysroot+set}" = set; then :
17032  withval=$with_sysroot; SYSROOT=$with_sysroot
17033
17034fi
17035
17036
17037
17038# Check whether --with-tools-dir was given.
17039if test "${with_tools_dir+set}" = set; then :
17040  withval=$with_tools_dir;
17041  if test "x$with_tools_dir" != x; then
17042    if test "x$TOOLCHAIN_PATH" = x; then
17043      TOOLCHAIN_PATH="$with_tools_dir"
17044    else
17045      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
17046    fi
17047  fi
17048
17049
17050fi
17051
17052
17053
17054# Check whether --with-toolchain-path was given.
17055if test "${with_toolchain_path+set}" = set; then :
17056  withval=$with_toolchain_path;
17057  if test "x$with_toolchain_path" != x; then
17058    if test "x$TOOLCHAIN_PATH" = x; then
17059      TOOLCHAIN_PATH="$with_toolchain_path"
17060    else
17061      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
17062    fi
17063  fi
17064
17065
17066fi
17067
17068
17069
17070# Check whether --with-extra-path was given.
17071if test "${with_extra_path+set}" = set; then :
17072  withval=$with_extra_path;
17073  if test "x$with_extra_path" != x; then
17074    if test "x$EXTRA_PATH" = x; then
17075      EXTRA_PATH="$with_extra_path"
17076    else
17077      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
17078    fi
17079  fi
17080
17081
17082fi
17083
17084
17085  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
17086    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
17087    # If not, detect if Xcode is installed by running xcodebuild -version
17088    # if no Xcode installed, xcodebuild exits with 1
17089    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
17090    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
17091      # We need to use xcodebuild in the toolchain dir provided by the user, this will
17092      # fall back on the stub binary in /usr/bin/xcodebuild
17093      # Extract the first word of "xcodebuild", so it can be a program name with args.
17094set dummy xcodebuild; ac_word=$2
17095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17096$as_echo_n "checking for $ac_word... " >&6; }
17097if ${ac_cv_path_XCODEBUILD+:} false; then :
17098  $as_echo_n "(cached) " >&6
17099else
17100  case $XCODEBUILD in
17101  [\\/]* | ?:[\\/]*)
17102  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
17103  ;;
17104  *)
17105  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17106for as_dir in $TOOLCHAIN_PATH
17107do
17108  IFS=$as_save_IFS
17109  test -z "$as_dir" && as_dir=.
17110    for ac_exec_ext in '' $ac_executable_extensions; do
17111  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17112    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
17113    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17114    break 2
17115  fi
17116done
17117  done
17118IFS=$as_save_IFS
17119
17120  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
17121  ;;
17122esac
17123fi
17124XCODEBUILD=$ac_cv_path_XCODEBUILD
17125if test -n "$XCODEBUILD"; then
17126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
17127$as_echo "$XCODEBUILD" >&6; }
17128else
17129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17130$as_echo "no" >&6; }
17131fi
17132
17133
17134    else
17135      # this should result in SYSROOT being empty, unless --with-sysroot is provided
17136      # when only the command line tools are installed there are no SDKs, so headers
17137      # are copied into the system frameworks
17138      XCODEBUILD=
17139
17140    fi
17141
17142    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
17143$as_echo_n "checking for sdk name... " >&6; }
17144
17145# Check whether --with-sdk-name was given.
17146if test "${with_sdk_name+set}" = set; then :
17147  withval=$with_sdk_name; SDKNAME=$with_sdk_name
17148
17149fi
17150
17151    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
17152$as_echo "$SDKNAME" >&6; }
17153
17154    # if toolchain path is specified then don't rely on system headers, they may not compile
17155    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
17156    test -z "$TOOLCHAIN_PATH" && \
17157      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
17158
17159    if test -z "$SYSROOT"; then
17160      if test -n "$XCODEBUILD"; then
17161        # if we don't have system headers, use default SDK name (last resort)
17162        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17163          SDKNAME=${SDKNAME:-macosx}
17164        fi
17165
17166        if test -n "$SDKNAME"; then
17167          # Call xcodebuild to determine SYSROOT
17168          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | $GREP '^Path: ' | $SED 's/Path: //'`
17169        fi
17170      else
17171        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17172          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
17173        fi
17174      fi
17175    else
17176      # warn user if --with-sdk-name was also set
17177      if test -n "$with_sdk_name"; then
17178        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
17179$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
17180      fi
17181    fi
17182
17183    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
17184      # If no system framework headers, then SYSROOT must be set, or we won't build
17185      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
17186    fi
17187
17188    # Perform a basic sanity test
17189    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
17190      if test -z "$SYSROOT"; then
17191        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
17192      else
17193        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
17194      fi
17195    fi
17196
17197    # set SDKROOT too, Xcode tools will pick it up
17198    SDKROOT=$SYSROOT
17199
17200  fi
17201
17202  # Prepend the extra path to the global path
17203
17204  if test "x$EXTRA_PATH" != x; then
17205    if test "x$PATH" = x; then
17206      PATH="$EXTRA_PATH"
17207    else
17208      PATH="$EXTRA_PATH:$PATH"
17209    fi
17210  fi
17211
17212
17213  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
17214$as_echo_n "checking for sysroot... " >&6; }
17215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
17216$as_echo "$SYSROOT" >&6; }
17217  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
17218$as_echo_n "checking for toolchain path... " >&6; }
17219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
17220$as_echo "$TOOLCHAIN_PATH" >&6; }
17221  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
17222$as_echo_n "checking for extra path... " >&6; }
17223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
17224$as_echo "$EXTRA_PATH" >&6; }
17225
17226
17227# To properly create a configuration name, we need to have the OpenJDK target
17228# and options (variants and debug level) parsed.
17229
17230
17231
17232# Check whether --with-conf-name was given.
17233if test "${with_conf_name+set}" = set; then :
17234  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
17235fi
17236
17237
17238  # Test from where we are running configure, in or outside of src root.
17239  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
17240$as_echo_n "checking where to store configuration... " >&6; }
17241  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
17242      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
17243      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
17244    # We are running configure from the src root.
17245    # Create a default ./build/target-variant-debuglevel output root.
17246    if test "x${CONF_NAME}" = x; then
17247      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
17248$as_echo "in default location" >&6; }
17249      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
17250    else
17251      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
17252$as_echo "in build directory with custom name" >&6; }
17253    fi
17254    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
17255    $MKDIR -p "$OUTPUT_ROOT"
17256    if test ! -d "$OUTPUT_ROOT"; then
17257      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
17258    fi
17259  else
17260    # We are running configure from outside of the src dir.
17261    # Then use the current directory as output dir!
17262    # If configuration is situated in normal build directory, just use the build
17263    # directory name as configuration name, otherwise use the complete path.
17264    if test "x${CONF_NAME}" = x; then
17265      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
17266    fi
17267    OUTPUT_ROOT="$CURDIR"
17268    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
17269$as_echo "in current directory" >&6; }
17270
17271    # WARNING: This might be a bad thing to do. You need to be sure you want to
17272    # have a configuration in this directory. Do some sanity checks!
17273
17274    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
17275      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
17276      # other files
17277      files_present=`$LS $OUTPUT_ROOT`
17278      # Configure has already touched config.log and confdefs.h in the current dir when this check
17279      # is performed.
17280      filtered_files=`$ECHO "$files_present" \
17281          | $SED -e 's/config.log//g' \
17282              -e 's/configure.log//g' \
17283              -e 's/confdefs.h//g' \
17284              -e 's/ //g' \
17285          | $TR -d '\n'`
17286      if test "x$filtered_files" != x; then
17287        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
17288$as_echo "$as_me: Current directory is $CURDIR." >&6;}
17289        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
17290$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
17291        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
17292$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
17293        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
17294$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
17295        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
17296$as_echo "$as_me: seriously mess up just about everything." >&6;}
17297        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
17298$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
17299        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
17300$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
17301        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
17302      fi
17303    fi
17304  fi
17305  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
17306$as_echo_n "checking what configuration name to use... " >&6; }
17307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
17308$as_echo "$CONF_NAME" >&6; }
17309
17310
17311  # Only process if variable expands to non-empty
17312
17313  if test "x$OUTPUT_ROOT" != x; then
17314    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17315
17316  # Input might be given as Windows format, start by converting to
17317  # unix format.
17318  path="$OUTPUT_ROOT"
17319  new_path=`$CYGPATH -u "$path"`
17320
17321  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17322  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17323  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17324  # "foo.exe" is OK but "foo" is an error.
17325  #
17326  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17327  # It is also a way to make sure we got the proper file name for the real test later on.
17328  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17329  if test "x$test_shortpath" = x; then
17330    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17331$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17332    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
17333  fi
17334
17335  # Call helper function which possibly converts this using DOS-style short mode.
17336  # If so, the updated path is stored in $new_path.
17337
17338  input_path="$new_path"
17339  # Check if we need to convert this using DOS-style short mode. If the path
17340  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17341  # take no chances and rewrite it.
17342  # Note: m4 eats our [], so we need to use [ and ] instead.
17343  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17344  if test "x$has_forbidden_chars" != x; then
17345    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17346    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17347    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17348    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17349      # Going to short mode and back again did indeed matter. Since short mode is
17350      # case insensitive, let's make it lowercase to improve readability.
17351      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17352      # Now convert it back to Unix-style (cygpath)
17353      input_path=`$CYGPATH -u "$shortmode_path"`
17354      new_path="$input_path"
17355    fi
17356  fi
17357
17358  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17359  if test "x$test_cygdrive_prefix" = x; then
17360    # As a simple fix, exclude /usr/bin since it's not a real path.
17361    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17362      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17363      # a path prefixed by /cygdrive for fixpath to work.
17364      new_path="$CYGWIN_ROOT_PATH$input_path"
17365    fi
17366  fi
17367
17368
17369  if test "x$path" != "x$new_path"; then
17370    OUTPUT_ROOT="$new_path"
17371    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17372$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17373  fi
17374
17375    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17376
17377  path="$OUTPUT_ROOT"
17378  has_colon=`$ECHO $path | $GREP ^.:`
17379  new_path="$path"
17380  if test "x$has_colon" = x; then
17381    # Not in mixed or Windows style, start by that.
17382    new_path=`cmd //c echo $path`
17383  fi
17384
17385
17386  input_path="$new_path"
17387  # Check if we need to convert this using DOS-style short mode. If the path
17388  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17389  # take no chances and rewrite it.
17390  # Note: m4 eats our [], so we need to use [ and ] instead.
17391  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17392  if test "x$has_forbidden_chars" != x; then
17393    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17394    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17395  fi
17396
17397
17398  windows_path="$new_path"
17399  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17400    unix_path=`$CYGPATH -u "$windows_path"`
17401    new_path="$unix_path"
17402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17403    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17404    new_path="$unix_path"
17405  fi
17406
17407  if test "x$path" != "x$new_path"; then
17408    OUTPUT_ROOT="$new_path"
17409    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17410$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17411  fi
17412
17413  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17414  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17415
17416    else
17417      # We're on a unix platform. Hooray! :)
17418      path="$OUTPUT_ROOT"
17419      has_space=`$ECHO "$path" | $GREP " "`
17420      if test "x$has_space" != x; then
17421        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17422$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17423        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17424      fi
17425
17426      # Use eval to expand a potential ~
17427      eval path="$path"
17428      if test ! -f "$path" && test ! -d "$path"; then
17429        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
17430      fi
17431
17432      if test -d "$path"; then
17433        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
17434      else
17435        dir="`$DIRNAME "$path"`"
17436        base="`$BASENAME "$path"`"
17437        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
17438      fi
17439    fi
17440  fi
17441
17442
17443  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
17444  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
17445
17446  SPEC=$OUTPUT_ROOT/spec.gmk
17447
17448  CONF_NAME=$CONF_NAME
17449
17450  OUTPUT_ROOT=$OUTPUT_ROOT
17451
17452
17453
17454  # The spec.gmk file contains all variables for the make system.
17455  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17456
17457  # The bootcycle-spec.gmk file contains support for boot cycle builds.
17458  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17459
17460  # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17461  ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17462
17463  # The compare.sh is used to compare the build output to other builds.
17464  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17465
17466  # The generated Makefile knows where the spec.gmk is and where the source is.
17467  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17468  # which will look for generated configurations
17469  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17470
17471
17472
17473# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17474
17475  for ac_prog in apt-get yum port pkgutil pkgadd
17476do
17477  # Extract the first word of "$ac_prog", so it can be a program name with args.
17478set dummy $ac_prog; ac_word=$2
17479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17480$as_echo_n "checking for $ac_word... " >&6; }
17481if ${ac_cv_prog_PKGHANDLER+:} false; then :
17482  $as_echo_n "(cached) " >&6
17483else
17484  if test -n "$PKGHANDLER"; then
17485  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17486else
17487as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17488for as_dir in $PATH
17489do
17490  IFS=$as_save_IFS
17491  test -z "$as_dir" && as_dir=.
17492    for ac_exec_ext in '' $ac_executable_extensions; do
17493  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17494    ac_cv_prog_PKGHANDLER="$ac_prog"
17495    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17496    break 2
17497  fi
17498done
17499  done
17500IFS=$as_save_IFS
17501
17502fi
17503fi
17504PKGHANDLER=$ac_cv_prog_PKGHANDLER
17505if test -n "$PKGHANDLER"; then
17506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17507$as_echo "$PKGHANDLER" >&6; }
17508else
17509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17510$as_echo "no" >&6; }
17511fi
17512
17513
17514  test -n "$PKGHANDLER" && break
17515done
17516
17517
17518
17519# Setup tools that requires more complex handling, or that is not needed by the configure script.
17520
17521
17522
17523  # Publish this variable in the help.
17524
17525
17526  if [ -z "${MAKE+x}" ]; then
17527    # The variable is not set by user, try to locate tool using the code snippet
17528
17529    # Try our hardest to locate a correct version of GNU make
17530    for ac_prog in gmake
17531do
17532  # Extract the first word of "$ac_prog", so it can be a program name with args.
17533set dummy $ac_prog; ac_word=$2
17534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17535$as_echo_n "checking for $ac_word... " >&6; }
17536if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17537  $as_echo_n "(cached) " >&6
17538else
17539  case $CHECK_GMAKE in
17540  [\\/]* | ?:[\\/]*)
17541  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17542  ;;
17543  *)
17544  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17545for as_dir in $PATH
17546do
17547  IFS=$as_save_IFS
17548  test -z "$as_dir" && as_dir=.
17549    for ac_exec_ext in '' $ac_executable_extensions; do
17550  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17551    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17552    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17553    break 2
17554  fi
17555done
17556  done
17557IFS=$as_save_IFS
17558
17559  ;;
17560esac
17561fi
17562CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17563if test -n "$CHECK_GMAKE"; then
17564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17565$as_echo "$CHECK_GMAKE" >&6; }
17566else
17567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17568$as_echo "no" >&6; }
17569fi
17570
17571
17572  test -n "$CHECK_GMAKE" && break
17573done
17574
17575
17576  MAKE_CANDIDATE=""$CHECK_GMAKE""
17577  DESCRIPTION="gmake in PATH"
17578
17579  # On Cygwin, we require a newer version of make than on other platforms
17580  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17581    MAKE_VERSION_EXPR="-e 4\."
17582    MAKE_REQUIRED_VERSION="4.0"
17583   else
17584    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17585    MAKE_REQUIRED_VERSION="3.81"
17586  fi
17587
17588  if test "x$MAKE_CANDIDATE" != x; then
17589    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17590$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17591    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17592    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17593    if test "x$IS_GNU_MAKE" = x; then
17594      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17595$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17596    else
17597      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17598      if test "x$IS_MODERN_MAKE" = x; then
17599        { $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
17600$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;}
17601      else
17602        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17603          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17604            MAKE_EXPECTED_ENV='cygwin'
17605          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17606            MAKE_EXPECTED_ENV='msys'
17607          else
17608            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17609          fi
17610          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17611          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17612        else
17613          # Not relevant for non-Windows
17614          IS_MAKE_CORRECT_ENV=true
17615        fi
17616        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17617          { $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
17618$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;}
17619        else
17620          FOUND_MAKE=$MAKE_CANDIDATE
17621
17622  # Only process if variable expands to non-empty
17623
17624  if test "x$FOUND_MAKE" != x; then
17625    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17626
17627  # First separate the path from the arguments. This will split at the first
17628  # space.
17629  complete="$FOUND_MAKE"
17630  path="${complete%% *}"
17631  tmp="$complete EOL"
17632  arguments="${tmp#* }"
17633
17634  # Input might be given as Windows format, start by converting to
17635  # unix format.
17636  new_path=`$CYGPATH -u "$path"`
17637
17638  # Now try to locate executable using which
17639  new_path=`$WHICH "$new_path" 2> /dev/null`
17640  # bat and cmd files are not always considered executable in cygwin causing which
17641  # to not find them
17642  if test "x$new_path" = x \
17643      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17644      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17645    new_path=`$CYGPATH -u "$path"`
17646  fi
17647  if test "x$new_path" = x; then
17648    # Oops. Which didn't find the executable.
17649    # The splitting of arguments from the executable at a space might have been incorrect,
17650    # since paths with space are more likely in Windows. Give it another try with the whole
17651    # argument.
17652    path="$complete"
17653    arguments="EOL"
17654    new_path=`$CYGPATH -u "$path"`
17655    new_path=`$WHICH "$new_path" 2> /dev/null`
17656    # bat and cmd files are not always considered executable in cygwin causing which
17657    # to not find them
17658    if test "x$new_path" = x \
17659        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17660        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17661      new_path=`$CYGPATH -u "$path"`
17662    fi
17663    if test "x$new_path" = x; then
17664      # It's still not found. Now this is an unrecoverable error.
17665      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17666$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17667      has_space=`$ECHO "$complete" | $GREP " "`
17668      if test "x$has_space" != x; then
17669        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17670$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17671      fi
17672      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17673    fi
17674  fi
17675
17676  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17677  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17678  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17679  # "foo.exe" is OK but "foo" is an error.
17680  #
17681  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17682  # It is also a way to make sure we got the proper file name for the real test later on.
17683  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17684  if test "x$test_shortpath" = x; then
17685    # Short path failed, file does not exist as specified.
17686    # Try adding .exe or .cmd
17687    if test -f "${new_path}.exe"; then
17688      input_to_shortpath="${new_path}.exe"
17689    elif test -f "${new_path}.cmd"; then
17690      input_to_shortpath="${new_path}.cmd"
17691    else
17692      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17693$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17694      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17695$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17696      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17697    fi
17698  else
17699    input_to_shortpath="$new_path"
17700  fi
17701
17702  # Call helper function which possibly converts this using DOS-style short mode.
17703  # If so, the updated path is stored in $new_path.
17704  new_path="$input_to_shortpath"
17705
17706  input_path="$input_to_shortpath"
17707  # Check if we need to convert this using DOS-style short mode. If the path
17708  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17709  # take no chances and rewrite it.
17710  # Note: m4 eats our [], so we need to use [ and ] instead.
17711  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17712  if test "x$has_forbidden_chars" != x; then
17713    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17714    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17715    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17716    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17717      # Going to short mode and back again did indeed matter. Since short mode is
17718      # case insensitive, let's make it lowercase to improve readability.
17719      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17720      # Now convert it back to Unix-style (cygpath)
17721      input_path=`$CYGPATH -u "$shortmode_path"`
17722      new_path="$input_path"
17723    fi
17724  fi
17725
17726  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17727  if test "x$test_cygdrive_prefix" = x; then
17728    # As a simple fix, exclude /usr/bin since it's not a real path.
17729    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17730      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17731      # a path prefixed by /cygdrive for fixpath to work.
17732      new_path="$CYGWIN_ROOT_PATH$input_path"
17733    fi
17734  fi
17735
17736  # remove trailing .exe if any
17737  new_path="${new_path/%.exe/}"
17738
17739    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17740
17741  # First separate the path from the arguments. This will split at the first
17742  # space.
17743  complete="$FOUND_MAKE"
17744  path="${complete%% *}"
17745  tmp="$complete EOL"
17746  arguments="${tmp#* }"
17747
17748  # Input might be given as Windows format, start by converting to
17749  # unix format.
17750  new_path="$path"
17751
17752  windows_path="$new_path"
17753  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17754    unix_path=`$CYGPATH -u "$windows_path"`
17755    new_path="$unix_path"
17756  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17757    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17758    new_path="$unix_path"
17759  fi
17760
17761
17762  # Now try to locate executable using which
17763  new_path=`$WHICH "$new_path" 2> /dev/null`
17764
17765  if test "x$new_path" = x; then
17766    # Oops. Which didn't find the executable.
17767    # The splitting of arguments from the executable at a space might have been incorrect,
17768    # since paths with space are more likely in Windows. Give it another try with the whole
17769    # argument.
17770    path="$complete"
17771    arguments="EOL"
17772    new_path="$path"
17773
17774  windows_path="$new_path"
17775  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17776    unix_path=`$CYGPATH -u "$windows_path"`
17777    new_path="$unix_path"
17778  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17779    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17780    new_path="$unix_path"
17781  fi
17782
17783
17784    new_path=`$WHICH "$new_path" 2> /dev/null`
17785    # bat and cmd files are not always considered executable in MSYS causing which
17786    # to not find them
17787    if test "x$new_path" = x \
17788        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17789        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17790      new_path="$path"
17791
17792  windows_path="$new_path"
17793  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17794    unix_path=`$CYGPATH -u "$windows_path"`
17795    new_path="$unix_path"
17796  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17797    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17798    new_path="$unix_path"
17799  fi
17800
17801    fi
17802
17803    if test "x$new_path" = x; then
17804      # It's still not found. Now this is an unrecoverable error.
17805      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17806$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17807      has_space=`$ECHO "$complete" | $GREP " "`
17808      if test "x$has_space" != x; then
17809        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17810$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17811      fi
17812      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17813    fi
17814  fi
17815
17816  # Now new_path has a complete unix path to the binary
17817  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17818    # Keep paths in /bin as-is, but remove trailing .exe if any
17819    new_path="${new_path/%.exe/}"
17820    # Do not save /bin paths to all_fixpath_prefixes!
17821  else
17822    # Not in mixed or Windows style, start by that.
17823    new_path=`cmd //c echo $new_path`
17824
17825  input_path="$new_path"
17826  # Check if we need to convert this using DOS-style short mode. If the path
17827  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17828  # take no chances and rewrite it.
17829  # Note: m4 eats our [], so we need to use [ and ] instead.
17830  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17831  if test "x$has_forbidden_chars" != x; then
17832    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17833    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17834  fi
17835
17836    # Output is in $new_path
17837
17838  windows_path="$new_path"
17839  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17840    unix_path=`$CYGPATH -u "$windows_path"`
17841    new_path="$unix_path"
17842  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17843    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17844    new_path="$unix_path"
17845  fi
17846
17847    # remove trailing .exe if any
17848    new_path="${new_path/%.exe/}"
17849
17850    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17851    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17852  fi
17853
17854    else
17855      # We're on a unix platform. Hooray! :)
17856      # First separate the path from the arguments. This will split at the first
17857      # space.
17858      complete="$FOUND_MAKE"
17859      path="${complete%% *}"
17860      tmp="$complete EOL"
17861      arguments="${tmp#* }"
17862
17863      # Cannot rely on the command "which" here since it doesn't always work.
17864      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17865      if test -z "$is_absolute_path"; then
17866        # Path to executable is not absolute. Find it.
17867        IFS_save="$IFS"
17868        IFS=:
17869        for p in $PATH; do
17870          if test -f "$p/$path" && test -x "$p/$path"; then
17871            new_path="$p/$path"
17872            break
17873          fi
17874        done
17875        IFS="$IFS_save"
17876      else
17877        # This is an absolute path, we can use it without further modifications.
17878        new_path="$path"
17879      fi
17880
17881      if test "x$new_path" = x; then
17882        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17883$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17884        has_space=`$ECHO "$complete" | $GREP " "`
17885        if test "x$has_space" != x; then
17886          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17887$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17888        fi
17889        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17890      fi
17891    fi
17892
17893    # Now join together the path and the arguments once again
17894    if test "x$arguments" != xEOL; then
17895      new_complete="$new_path ${arguments% *}"
17896    else
17897      new_complete="$new_path"
17898    fi
17899
17900    if test "x$complete" != "x$new_complete"; then
17901      FOUND_MAKE="$new_complete"
17902      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17903$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17904    fi
17905  fi
17906
17907        fi
17908      fi
17909    fi
17910  fi
17911
17912
17913    if test "x$FOUND_MAKE" = x; then
17914      for ac_prog in make
17915do
17916  # Extract the first word of "$ac_prog", so it can be a program name with args.
17917set dummy $ac_prog; ac_word=$2
17918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17919$as_echo_n "checking for $ac_word... " >&6; }
17920if ${ac_cv_path_CHECK_MAKE+:} false; then :
17921  $as_echo_n "(cached) " >&6
17922else
17923  case $CHECK_MAKE in
17924  [\\/]* | ?:[\\/]*)
17925  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
17926  ;;
17927  *)
17928  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17929for as_dir in $PATH
17930do
17931  IFS=$as_save_IFS
17932  test -z "$as_dir" && as_dir=.
17933    for ac_exec_ext in '' $ac_executable_extensions; do
17934  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17935    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
17936    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17937    break 2
17938  fi
17939done
17940  done
17941IFS=$as_save_IFS
17942
17943  ;;
17944esac
17945fi
17946CHECK_MAKE=$ac_cv_path_CHECK_MAKE
17947if test -n "$CHECK_MAKE"; then
17948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
17949$as_echo "$CHECK_MAKE" >&6; }
17950else
17951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17952$as_echo "no" >&6; }
17953fi
17954
17955
17956  test -n "$CHECK_MAKE" && break
17957done
17958
17959
17960  MAKE_CANDIDATE=""$CHECK_MAKE""
17961  DESCRIPTION="make in PATH"
17962
17963  # On Cygwin, we require a newer version of make than on other platforms
17964  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17965    MAKE_VERSION_EXPR="-e 4\."
17966    MAKE_REQUIRED_VERSION="4.0"
17967   else
17968    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17969    MAKE_REQUIRED_VERSION="3.81"
17970  fi
17971
17972  if test "x$MAKE_CANDIDATE" != x; then
17973    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17974$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17975    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17976    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17977    if test "x$IS_GNU_MAKE" = x; then
17978      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17979$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17980    else
17981      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17982      if test "x$IS_MODERN_MAKE" = x; then
17983        { $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
17984$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;}
17985      else
17986        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17987          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17988            MAKE_EXPECTED_ENV='cygwin'
17989          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17990            MAKE_EXPECTED_ENV='msys'
17991          else
17992            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17993          fi
17994          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17995          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17996        else
17997          # Not relevant for non-Windows
17998          IS_MAKE_CORRECT_ENV=true
17999        fi
18000        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18001          { $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
18002$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;}
18003        else
18004          FOUND_MAKE=$MAKE_CANDIDATE
18005
18006  # Only process if variable expands to non-empty
18007
18008  if test "x$FOUND_MAKE" != x; then
18009    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18010
18011  # First separate the path from the arguments. This will split at the first
18012  # space.
18013  complete="$FOUND_MAKE"
18014  path="${complete%% *}"
18015  tmp="$complete EOL"
18016  arguments="${tmp#* }"
18017
18018  # Input might be given as Windows format, start by converting to
18019  # unix format.
18020  new_path=`$CYGPATH -u "$path"`
18021
18022  # Now try to locate executable using which
18023  new_path=`$WHICH "$new_path" 2> /dev/null`
18024  # bat and cmd files are not always considered executable in cygwin causing which
18025  # to not find them
18026  if test "x$new_path" = x \
18027      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18028      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18029    new_path=`$CYGPATH -u "$path"`
18030  fi
18031  if test "x$new_path" = x; then
18032    # Oops. Which didn't find the executable.
18033    # The splitting of arguments from the executable at a space might have been incorrect,
18034    # since paths with space are more likely in Windows. Give it another try with the whole
18035    # argument.
18036    path="$complete"
18037    arguments="EOL"
18038    new_path=`$CYGPATH -u "$path"`
18039    new_path=`$WHICH "$new_path" 2> /dev/null`
18040    # bat and cmd files are not always considered executable in cygwin causing which
18041    # to not find them
18042    if test "x$new_path" = x \
18043        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18044        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18045      new_path=`$CYGPATH -u "$path"`
18046    fi
18047    if test "x$new_path" = x; then
18048      # It's still not found. Now this is an unrecoverable error.
18049      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18050$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18051      has_space=`$ECHO "$complete" | $GREP " "`
18052      if test "x$has_space" != x; then
18053        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18054$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18055      fi
18056      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18057    fi
18058  fi
18059
18060  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18061  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18062  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18063  # "foo.exe" is OK but "foo" is an error.
18064  #
18065  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18066  # It is also a way to make sure we got the proper file name for the real test later on.
18067  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18068  if test "x$test_shortpath" = x; then
18069    # Short path failed, file does not exist as specified.
18070    # Try adding .exe or .cmd
18071    if test -f "${new_path}.exe"; then
18072      input_to_shortpath="${new_path}.exe"
18073    elif test -f "${new_path}.cmd"; then
18074      input_to_shortpath="${new_path}.cmd"
18075    else
18076      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18077$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18078      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18079$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18080      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18081    fi
18082  else
18083    input_to_shortpath="$new_path"
18084  fi
18085
18086  # Call helper function which possibly converts this using DOS-style short mode.
18087  # If so, the updated path is stored in $new_path.
18088  new_path="$input_to_shortpath"
18089
18090  input_path="$input_to_shortpath"
18091  # Check if we need to convert this using DOS-style short mode. If the path
18092  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18093  # take no chances and rewrite it.
18094  # Note: m4 eats our [], so we need to use [ and ] instead.
18095  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18096  if test "x$has_forbidden_chars" != x; then
18097    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18098    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18099    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18100    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18101      # Going to short mode and back again did indeed matter. Since short mode is
18102      # case insensitive, let's make it lowercase to improve readability.
18103      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18104      # Now convert it back to Unix-style (cygpath)
18105      input_path=`$CYGPATH -u "$shortmode_path"`
18106      new_path="$input_path"
18107    fi
18108  fi
18109
18110  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18111  if test "x$test_cygdrive_prefix" = x; then
18112    # As a simple fix, exclude /usr/bin since it's not a real path.
18113    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18114      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18115      # a path prefixed by /cygdrive for fixpath to work.
18116      new_path="$CYGWIN_ROOT_PATH$input_path"
18117    fi
18118  fi
18119
18120  # remove trailing .exe if any
18121  new_path="${new_path/%.exe/}"
18122
18123    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18124
18125  # First separate the path from the arguments. This will split at the first
18126  # space.
18127  complete="$FOUND_MAKE"
18128  path="${complete%% *}"
18129  tmp="$complete EOL"
18130  arguments="${tmp#* }"
18131
18132  # Input might be given as Windows format, start by converting to
18133  # unix format.
18134  new_path="$path"
18135
18136  windows_path="$new_path"
18137  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18138    unix_path=`$CYGPATH -u "$windows_path"`
18139    new_path="$unix_path"
18140  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18141    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18142    new_path="$unix_path"
18143  fi
18144
18145
18146  # Now try to locate executable using which
18147  new_path=`$WHICH "$new_path" 2> /dev/null`
18148
18149  if test "x$new_path" = x; then
18150    # Oops. Which didn't find the executable.
18151    # The splitting of arguments from the executable at a space might have been incorrect,
18152    # since paths with space are more likely in Windows. Give it another try with the whole
18153    # argument.
18154    path="$complete"
18155    arguments="EOL"
18156    new_path="$path"
18157
18158  windows_path="$new_path"
18159  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18160    unix_path=`$CYGPATH -u "$windows_path"`
18161    new_path="$unix_path"
18162  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18163    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18164    new_path="$unix_path"
18165  fi
18166
18167
18168    new_path=`$WHICH "$new_path" 2> /dev/null`
18169    # bat and cmd files are not always considered executable in MSYS causing which
18170    # to not find them
18171    if test "x$new_path" = x \
18172        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18173        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18174      new_path="$path"
18175
18176  windows_path="$new_path"
18177  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18178    unix_path=`$CYGPATH -u "$windows_path"`
18179    new_path="$unix_path"
18180  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18181    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18182    new_path="$unix_path"
18183  fi
18184
18185    fi
18186
18187    if test "x$new_path" = x; then
18188      # It's still not found. Now this is an unrecoverable error.
18189      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18190$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18191      has_space=`$ECHO "$complete" | $GREP " "`
18192      if test "x$has_space" != x; then
18193        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18194$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18195      fi
18196      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18197    fi
18198  fi
18199
18200  # Now new_path has a complete unix path to the binary
18201  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18202    # Keep paths in /bin as-is, but remove trailing .exe if any
18203    new_path="${new_path/%.exe/}"
18204    # Do not save /bin paths to all_fixpath_prefixes!
18205  else
18206    # Not in mixed or Windows style, start by that.
18207    new_path=`cmd //c echo $new_path`
18208
18209  input_path="$new_path"
18210  # Check if we need to convert this using DOS-style short mode. If the path
18211  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18212  # take no chances and rewrite it.
18213  # Note: m4 eats our [], so we need to use [ and ] instead.
18214  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18215  if test "x$has_forbidden_chars" != x; then
18216    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18217    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18218  fi
18219
18220    # Output is in $new_path
18221
18222  windows_path="$new_path"
18223  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18224    unix_path=`$CYGPATH -u "$windows_path"`
18225    new_path="$unix_path"
18226  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18227    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18228    new_path="$unix_path"
18229  fi
18230
18231    # remove trailing .exe if any
18232    new_path="${new_path/%.exe/}"
18233
18234    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18235    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18236  fi
18237
18238    else
18239      # We're on a unix platform. Hooray! :)
18240      # First separate the path from the arguments. This will split at the first
18241      # space.
18242      complete="$FOUND_MAKE"
18243      path="${complete%% *}"
18244      tmp="$complete EOL"
18245      arguments="${tmp#* }"
18246
18247      # Cannot rely on the command "which" here since it doesn't always work.
18248      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18249      if test -z "$is_absolute_path"; then
18250        # Path to executable is not absolute. Find it.
18251        IFS_save="$IFS"
18252        IFS=:
18253        for p in $PATH; do
18254          if test -f "$p/$path" && test -x "$p/$path"; then
18255            new_path="$p/$path"
18256            break
18257          fi
18258        done
18259        IFS="$IFS_save"
18260      else
18261        # This is an absolute path, we can use it without further modifications.
18262        new_path="$path"
18263      fi
18264
18265      if test "x$new_path" = x; then
18266        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18267$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18268        has_space=`$ECHO "$complete" | $GREP " "`
18269        if test "x$has_space" != x; then
18270          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18271$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18272        fi
18273        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18274      fi
18275    fi
18276
18277    # Now join together the path and the arguments once again
18278    if test "x$arguments" != xEOL; then
18279      new_complete="$new_path ${arguments% *}"
18280    else
18281      new_complete="$new_path"
18282    fi
18283
18284    if test "x$complete" != "x$new_complete"; then
18285      FOUND_MAKE="$new_complete"
18286      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18287$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18288    fi
18289  fi
18290
18291        fi
18292      fi
18293    fi
18294  fi
18295
18296    fi
18297
18298    if test "x$FOUND_MAKE" = x; then
18299      if test "x$TOOLCHAIN_PATH" != x; then
18300        # We have a toolchain path, check that as well before giving up.
18301        OLD_PATH=$PATH
18302        PATH=$TOOLCHAIN_PATH:$PATH
18303        for ac_prog in gmake
18304do
18305  # Extract the first word of "$ac_prog", so it can be a program name with args.
18306set dummy $ac_prog; ac_word=$2
18307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18308$as_echo_n "checking for $ac_word... " >&6; }
18309if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18310  $as_echo_n "(cached) " >&6
18311else
18312  case $CHECK_TOOLSDIR_GMAKE in
18313  [\\/]* | ?:[\\/]*)
18314  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18315  ;;
18316  *)
18317  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18318for as_dir in $PATH
18319do
18320  IFS=$as_save_IFS
18321  test -z "$as_dir" && as_dir=.
18322    for ac_exec_ext in '' $ac_executable_extensions; do
18323  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18324    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18325    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18326    break 2
18327  fi
18328done
18329  done
18330IFS=$as_save_IFS
18331
18332  ;;
18333esac
18334fi
18335CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18336if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18338$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18339else
18340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18341$as_echo "no" >&6; }
18342fi
18343
18344
18345  test -n "$CHECK_TOOLSDIR_GMAKE" && break
18346done
18347
18348
18349  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18350  DESCRIPTION="gmake in tools-dir"
18351
18352  # On Cygwin, we require a newer version of make than on other platforms
18353  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18354    MAKE_VERSION_EXPR="-e 4\."
18355    MAKE_REQUIRED_VERSION="4.0"
18356   else
18357    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18358    MAKE_REQUIRED_VERSION="3.81"
18359  fi
18360
18361  if test "x$MAKE_CANDIDATE" != x; then
18362    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18363$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18364    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18365    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18366    if test "x$IS_GNU_MAKE" = x; then
18367      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18368$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18369    else
18370      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18371      if test "x$IS_MODERN_MAKE" = x; then
18372        { $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
18373$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;}
18374      else
18375        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18376          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18377            MAKE_EXPECTED_ENV='cygwin'
18378          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18379            MAKE_EXPECTED_ENV='msys'
18380          else
18381            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18382          fi
18383          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18384          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18385        else
18386          # Not relevant for non-Windows
18387          IS_MAKE_CORRECT_ENV=true
18388        fi
18389        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18390          { $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
18391$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;}
18392        else
18393          FOUND_MAKE=$MAKE_CANDIDATE
18394
18395  # Only process if variable expands to non-empty
18396
18397  if test "x$FOUND_MAKE" != x; then
18398    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18399
18400  # First separate the path from the arguments. This will split at the first
18401  # space.
18402  complete="$FOUND_MAKE"
18403  path="${complete%% *}"
18404  tmp="$complete EOL"
18405  arguments="${tmp#* }"
18406
18407  # Input might be given as Windows format, start by converting to
18408  # unix format.
18409  new_path=`$CYGPATH -u "$path"`
18410
18411  # Now try to locate executable using which
18412  new_path=`$WHICH "$new_path" 2> /dev/null`
18413  # bat and cmd files are not always considered executable in cygwin causing which
18414  # to not find them
18415  if test "x$new_path" = x \
18416      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18417      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18418    new_path=`$CYGPATH -u "$path"`
18419  fi
18420  if test "x$new_path" = x; then
18421    # Oops. Which didn't find the executable.
18422    # The splitting of arguments from the executable at a space might have been incorrect,
18423    # since paths with space are more likely in Windows. Give it another try with the whole
18424    # argument.
18425    path="$complete"
18426    arguments="EOL"
18427    new_path=`$CYGPATH -u "$path"`
18428    new_path=`$WHICH "$new_path" 2> /dev/null`
18429    # bat and cmd files are not always considered executable in cygwin causing which
18430    # to not find them
18431    if test "x$new_path" = x \
18432        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18433        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18434      new_path=`$CYGPATH -u "$path"`
18435    fi
18436    if test "x$new_path" = x; then
18437      # It's still not found. Now this is an unrecoverable error.
18438      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18439$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18440      has_space=`$ECHO "$complete" | $GREP " "`
18441      if test "x$has_space" != x; then
18442        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18443$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18444      fi
18445      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18446    fi
18447  fi
18448
18449  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18450  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18451  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18452  # "foo.exe" is OK but "foo" is an error.
18453  #
18454  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18455  # It is also a way to make sure we got the proper file name for the real test later on.
18456  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18457  if test "x$test_shortpath" = x; then
18458    # Short path failed, file does not exist as specified.
18459    # Try adding .exe or .cmd
18460    if test -f "${new_path}.exe"; then
18461      input_to_shortpath="${new_path}.exe"
18462    elif test -f "${new_path}.cmd"; then
18463      input_to_shortpath="${new_path}.cmd"
18464    else
18465      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18466$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18467      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18468$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18469      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18470    fi
18471  else
18472    input_to_shortpath="$new_path"
18473  fi
18474
18475  # Call helper function which possibly converts this using DOS-style short mode.
18476  # If so, the updated path is stored in $new_path.
18477  new_path="$input_to_shortpath"
18478
18479  input_path="$input_to_shortpath"
18480  # Check if we need to convert this using DOS-style short mode. If the path
18481  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18482  # take no chances and rewrite it.
18483  # Note: m4 eats our [], so we need to use [ and ] instead.
18484  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18485  if test "x$has_forbidden_chars" != x; then
18486    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18487    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18488    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18489    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18490      # Going to short mode and back again did indeed matter. Since short mode is
18491      # case insensitive, let's make it lowercase to improve readability.
18492      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18493      # Now convert it back to Unix-style (cygpath)
18494      input_path=`$CYGPATH -u "$shortmode_path"`
18495      new_path="$input_path"
18496    fi
18497  fi
18498
18499  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18500  if test "x$test_cygdrive_prefix" = x; then
18501    # As a simple fix, exclude /usr/bin since it's not a real path.
18502    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18503      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18504      # a path prefixed by /cygdrive for fixpath to work.
18505      new_path="$CYGWIN_ROOT_PATH$input_path"
18506    fi
18507  fi
18508
18509  # remove trailing .exe if any
18510  new_path="${new_path/%.exe/}"
18511
18512    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18513
18514  # First separate the path from the arguments. This will split at the first
18515  # space.
18516  complete="$FOUND_MAKE"
18517  path="${complete%% *}"
18518  tmp="$complete EOL"
18519  arguments="${tmp#* }"
18520
18521  # Input might be given as Windows format, start by converting to
18522  # unix format.
18523  new_path="$path"
18524
18525  windows_path="$new_path"
18526  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18527    unix_path=`$CYGPATH -u "$windows_path"`
18528    new_path="$unix_path"
18529  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18530    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18531    new_path="$unix_path"
18532  fi
18533
18534
18535  # Now try to locate executable using which
18536  new_path=`$WHICH "$new_path" 2> /dev/null`
18537
18538  if test "x$new_path" = x; then
18539    # Oops. Which didn't find the executable.
18540    # The splitting of arguments from the executable at a space might have been incorrect,
18541    # since paths with space are more likely in Windows. Give it another try with the whole
18542    # argument.
18543    path="$complete"
18544    arguments="EOL"
18545    new_path="$path"
18546
18547  windows_path="$new_path"
18548  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18549    unix_path=`$CYGPATH -u "$windows_path"`
18550    new_path="$unix_path"
18551  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18552    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18553    new_path="$unix_path"
18554  fi
18555
18556
18557    new_path=`$WHICH "$new_path" 2> /dev/null`
18558    # bat and cmd files are not always considered executable in MSYS causing which
18559    # to not find them
18560    if test "x$new_path" = x \
18561        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18562        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18563      new_path="$path"
18564
18565  windows_path="$new_path"
18566  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18567    unix_path=`$CYGPATH -u "$windows_path"`
18568    new_path="$unix_path"
18569  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18570    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18571    new_path="$unix_path"
18572  fi
18573
18574    fi
18575
18576    if test "x$new_path" = x; then
18577      # It's still not found. Now this is an unrecoverable error.
18578      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18579$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18580      has_space=`$ECHO "$complete" | $GREP " "`
18581      if test "x$has_space" != x; then
18582        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18583$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18584      fi
18585      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18586    fi
18587  fi
18588
18589  # Now new_path has a complete unix path to the binary
18590  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18591    # Keep paths in /bin as-is, but remove trailing .exe if any
18592    new_path="${new_path/%.exe/}"
18593    # Do not save /bin paths to all_fixpath_prefixes!
18594  else
18595    # Not in mixed or Windows style, start by that.
18596    new_path=`cmd //c echo $new_path`
18597
18598  input_path="$new_path"
18599  # Check if we need to convert this using DOS-style short mode. If the path
18600  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18601  # take no chances and rewrite it.
18602  # Note: m4 eats our [], so we need to use [ and ] instead.
18603  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18604  if test "x$has_forbidden_chars" != x; then
18605    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18606    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18607  fi
18608
18609    # Output is in $new_path
18610
18611  windows_path="$new_path"
18612  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18613    unix_path=`$CYGPATH -u "$windows_path"`
18614    new_path="$unix_path"
18615  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18616    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18617    new_path="$unix_path"
18618  fi
18619
18620    # remove trailing .exe if any
18621    new_path="${new_path/%.exe/}"
18622
18623    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18624    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18625  fi
18626
18627    else
18628      # We're on a unix platform. Hooray! :)
18629      # First separate the path from the arguments. This will split at the first
18630      # space.
18631      complete="$FOUND_MAKE"
18632      path="${complete%% *}"
18633      tmp="$complete EOL"
18634      arguments="${tmp#* }"
18635
18636      # Cannot rely on the command "which" here since it doesn't always work.
18637      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18638      if test -z "$is_absolute_path"; then
18639        # Path to executable is not absolute. Find it.
18640        IFS_save="$IFS"
18641        IFS=:
18642        for p in $PATH; do
18643          if test -f "$p/$path" && test -x "$p/$path"; then
18644            new_path="$p/$path"
18645            break
18646          fi
18647        done
18648        IFS="$IFS_save"
18649      else
18650        # This is an absolute path, we can use it without further modifications.
18651        new_path="$path"
18652      fi
18653
18654      if test "x$new_path" = x; then
18655        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18656$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18657        has_space=`$ECHO "$complete" | $GREP " "`
18658        if test "x$has_space" != x; then
18659          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18660$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18661        fi
18662        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18663      fi
18664    fi
18665
18666    # Now join together the path and the arguments once again
18667    if test "x$arguments" != xEOL; then
18668      new_complete="$new_path ${arguments% *}"
18669    else
18670      new_complete="$new_path"
18671    fi
18672
18673    if test "x$complete" != "x$new_complete"; then
18674      FOUND_MAKE="$new_complete"
18675      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18676$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18677    fi
18678  fi
18679
18680        fi
18681      fi
18682    fi
18683  fi
18684
18685        if test "x$FOUND_MAKE" = x; then
18686          for ac_prog in make
18687do
18688  # Extract the first word of "$ac_prog", so it can be a program name with args.
18689set dummy $ac_prog; ac_word=$2
18690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18691$as_echo_n "checking for $ac_word... " >&6; }
18692if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
18693  $as_echo_n "(cached) " >&6
18694else
18695  case $CHECK_TOOLSDIR_MAKE in
18696  [\\/]* | ?:[\\/]*)
18697  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
18698  ;;
18699  *)
18700  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18701for as_dir in $PATH
18702do
18703  IFS=$as_save_IFS
18704  test -z "$as_dir" && as_dir=.
18705    for ac_exec_ext in '' $ac_executable_extensions; do
18706  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18707    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18708    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18709    break 2
18710  fi
18711done
18712  done
18713IFS=$as_save_IFS
18714
18715  ;;
18716esac
18717fi
18718CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18719if test -n "$CHECK_TOOLSDIR_MAKE"; then
18720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
18721$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
18722else
18723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18724$as_echo "no" >&6; }
18725fi
18726
18727
18728  test -n "$CHECK_TOOLSDIR_MAKE" && break
18729done
18730
18731
18732  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
18733  DESCRIPTION="make in tools-dir"
18734
18735  # On Cygwin, we require a newer version of make than on other platforms
18736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18737    MAKE_VERSION_EXPR="-e 4\."
18738    MAKE_REQUIRED_VERSION="4.0"
18739   else
18740    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18741    MAKE_REQUIRED_VERSION="3.81"
18742  fi
18743
18744  if test "x$MAKE_CANDIDATE" != x; then
18745    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18746$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18747    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18748    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18749    if test "x$IS_GNU_MAKE" = x; then
18750      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18751$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18752    else
18753      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18754      if test "x$IS_MODERN_MAKE" = x; then
18755        { $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
18756$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;}
18757      else
18758        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18759          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18760            MAKE_EXPECTED_ENV='cygwin'
18761          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18762            MAKE_EXPECTED_ENV='msys'
18763          else
18764            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18765          fi
18766          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18767          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18768        else
18769          # Not relevant for non-Windows
18770          IS_MAKE_CORRECT_ENV=true
18771        fi
18772        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18773          { $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
18774$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;}
18775        else
18776          FOUND_MAKE=$MAKE_CANDIDATE
18777
18778  # Only process if variable expands to non-empty
18779
18780  if test "x$FOUND_MAKE" != x; then
18781    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18782
18783  # First separate the path from the arguments. This will split at the first
18784  # space.
18785  complete="$FOUND_MAKE"
18786  path="${complete%% *}"
18787  tmp="$complete EOL"
18788  arguments="${tmp#* }"
18789
18790  # Input might be given as Windows format, start by converting to
18791  # unix format.
18792  new_path=`$CYGPATH -u "$path"`
18793
18794  # Now try to locate executable using which
18795  new_path=`$WHICH "$new_path" 2> /dev/null`
18796  # bat and cmd files are not always considered executable in cygwin causing which
18797  # to not find them
18798  if test "x$new_path" = x \
18799      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18800      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18801    new_path=`$CYGPATH -u "$path"`
18802  fi
18803  if test "x$new_path" = x; then
18804    # Oops. Which didn't find the executable.
18805    # The splitting of arguments from the executable at a space might have been incorrect,
18806    # since paths with space are more likely in Windows. Give it another try with the whole
18807    # argument.
18808    path="$complete"
18809    arguments="EOL"
18810    new_path=`$CYGPATH -u "$path"`
18811    new_path=`$WHICH "$new_path" 2> /dev/null`
18812    # bat and cmd files are not always considered executable in cygwin causing which
18813    # to not find them
18814    if test "x$new_path" = x \
18815        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18816        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18817      new_path=`$CYGPATH -u "$path"`
18818    fi
18819    if test "x$new_path" = x; then
18820      # It's still not found. Now this is an unrecoverable error.
18821      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18822$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18823      has_space=`$ECHO "$complete" | $GREP " "`
18824      if test "x$has_space" != x; then
18825        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18826$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18827      fi
18828      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18829    fi
18830  fi
18831
18832  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18833  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18834  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18835  # "foo.exe" is OK but "foo" is an error.
18836  #
18837  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18838  # It is also a way to make sure we got the proper file name for the real test later on.
18839  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18840  if test "x$test_shortpath" = x; then
18841    # Short path failed, file does not exist as specified.
18842    # Try adding .exe or .cmd
18843    if test -f "${new_path}.exe"; then
18844      input_to_shortpath="${new_path}.exe"
18845    elif test -f "${new_path}.cmd"; then
18846      input_to_shortpath="${new_path}.cmd"
18847    else
18848      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18849$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18850      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18851$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18852      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18853    fi
18854  else
18855    input_to_shortpath="$new_path"
18856  fi
18857
18858  # Call helper function which possibly converts this using DOS-style short mode.
18859  # If so, the updated path is stored in $new_path.
18860  new_path="$input_to_shortpath"
18861
18862  input_path="$input_to_shortpath"
18863  # Check if we need to convert this using DOS-style short mode. If the path
18864  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18865  # take no chances and rewrite it.
18866  # Note: m4 eats our [], so we need to use [ and ] instead.
18867  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18868  if test "x$has_forbidden_chars" != x; then
18869    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18870    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18871    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18872    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18873      # Going to short mode and back again did indeed matter. Since short mode is
18874      # case insensitive, let's make it lowercase to improve readability.
18875      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18876      # Now convert it back to Unix-style (cygpath)
18877      input_path=`$CYGPATH -u "$shortmode_path"`
18878      new_path="$input_path"
18879    fi
18880  fi
18881
18882  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18883  if test "x$test_cygdrive_prefix" = x; then
18884    # As a simple fix, exclude /usr/bin since it's not a real path.
18885    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18886      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18887      # a path prefixed by /cygdrive for fixpath to work.
18888      new_path="$CYGWIN_ROOT_PATH$input_path"
18889    fi
18890  fi
18891
18892  # remove trailing .exe if any
18893  new_path="${new_path/%.exe/}"
18894
18895    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18896
18897  # First separate the path from the arguments. This will split at the first
18898  # space.
18899  complete="$FOUND_MAKE"
18900  path="${complete%% *}"
18901  tmp="$complete EOL"
18902  arguments="${tmp#* }"
18903
18904  # Input might be given as Windows format, start by converting to
18905  # unix format.
18906  new_path="$path"
18907
18908  windows_path="$new_path"
18909  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18910    unix_path=`$CYGPATH -u "$windows_path"`
18911    new_path="$unix_path"
18912  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18913    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18914    new_path="$unix_path"
18915  fi
18916
18917
18918  # Now try to locate executable using which
18919  new_path=`$WHICH "$new_path" 2> /dev/null`
18920
18921  if test "x$new_path" = x; then
18922    # Oops. Which didn't find the executable.
18923    # The splitting of arguments from the executable at a space might have been incorrect,
18924    # since paths with space are more likely in Windows. Give it another try with the whole
18925    # argument.
18926    path="$complete"
18927    arguments="EOL"
18928    new_path="$path"
18929
18930  windows_path="$new_path"
18931  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18932    unix_path=`$CYGPATH -u "$windows_path"`
18933    new_path="$unix_path"
18934  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18935    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18936    new_path="$unix_path"
18937  fi
18938
18939
18940    new_path=`$WHICH "$new_path" 2> /dev/null`
18941    # bat and cmd files are not always considered executable in MSYS causing which
18942    # to not find them
18943    if test "x$new_path" = x \
18944        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18945        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18946      new_path="$path"
18947
18948  windows_path="$new_path"
18949  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18950    unix_path=`$CYGPATH -u "$windows_path"`
18951    new_path="$unix_path"
18952  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18953    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18954    new_path="$unix_path"
18955  fi
18956
18957    fi
18958
18959    if test "x$new_path" = x; then
18960      # It's still not found. Now this is an unrecoverable error.
18961      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18962$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18963      has_space=`$ECHO "$complete" | $GREP " "`
18964      if test "x$has_space" != x; then
18965        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18966$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18967      fi
18968      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18969    fi
18970  fi
18971
18972  # Now new_path has a complete unix path to the binary
18973  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18974    # Keep paths in /bin as-is, but remove trailing .exe if any
18975    new_path="${new_path/%.exe/}"
18976    # Do not save /bin paths to all_fixpath_prefixes!
18977  else
18978    # Not in mixed or Windows style, start by that.
18979    new_path=`cmd //c echo $new_path`
18980
18981  input_path="$new_path"
18982  # Check if we need to convert this using DOS-style short mode. If the path
18983  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18984  # take no chances and rewrite it.
18985  # Note: m4 eats our [], so we need to use [ and ] instead.
18986  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18987  if test "x$has_forbidden_chars" != x; then
18988    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18989    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18990  fi
18991
18992    # Output is in $new_path
18993
18994  windows_path="$new_path"
18995  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18996    unix_path=`$CYGPATH -u "$windows_path"`
18997    new_path="$unix_path"
18998  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18999    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19000    new_path="$unix_path"
19001  fi
19002
19003    # remove trailing .exe if any
19004    new_path="${new_path/%.exe/}"
19005
19006    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19007    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19008  fi
19009
19010    else
19011      # We're on a unix platform. Hooray! :)
19012      # First separate the path from the arguments. This will split at the first
19013      # space.
19014      complete="$FOUND_MAKE"
19015      path="${complete%% *}"
19016      tmp="$complete EOL"
19017      arguments="${tmp#* }"
19018
19019      # Cannot rely on the command "which" here since it doesn't always work.
19020      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19021      if test -z "$is_absolute_path"; then
19022        # Path to executable is not absolute. Find it.
19023        IFS_save="$IFS"
19024        IFS=:
19025        for p in $PATH; do
19026          if test -f "$p/$path" && test -x "$p/$path"; then
19027            new_path="$p/$path"
19028            break
19029          fi
19030        done
19031        IFS="$IFS_save"
19032      else
19033        # This is an absolute path, we can use it without further modifications.
19034        new_path="$path"
19035      fi
19036
19037      if test "x$new_path" = x; then
19038        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19039$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19040        has_space=`$ECHO "$complete" | $GREP " "`
19041        if test "x$has_space" != x; then
19042          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19043$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19044        fi
19045        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19046      fi
19047    fi
19048
19049    # Now join together the path and the arguments once again
19050    if test "x$arguments" != xEOL; then
19051      new_complete="$new_path ${arguments% *}"
19052    else
19053      new_complete="$new_path"
19054    fi
19055
19056    if test "x$complete" != "x$new_complete"; then
19057      FOUND_MAKE="$new_complete"
19058      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19059$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19060    fi
19061  fi
19062
19063        fi
19064      fi
19065    fi
19066  fi
19067
19068        fi
19069        PATH=$OLD_PATH
19070      fi
19071    fi
19072
19073    if test "x$FOUND_MAKE" = x; then
19074      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
19075    fi
19076
19077  else
19078    # The variable is set, but is it from the command line or the environment?
19079
19080    # Try to remove the string !MAKE! from our list.
19081    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
19082    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19083      # If it failed, the variable was not from the command line. Ignore it,
19084      # but warn the user (except for BASH, which is always set by the calling BASH).
19085      if test "xMAKE" != xBASH; then
19086        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
19087$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
19088      fi
19089      # Try to locate tool using the code snippet
19090
19091    # Try our hardest to locate a correct version of GNU make
19092    for ac_prog in gmake
19093do
19094  # Extract the first word of "$ac_prog", so it can be a program name with args.
19095set dummy $ac_prog; ac_word=$2
19096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19097$as_echo_n "checking for $ac_word... " >&6; }
19098if ${ac_cv_path_CHECK_GMAKE+:} false; then :
19099  $as_echo_n "(cached) " >&6
19100else
19101  case $CHECK_GMAKE in
19102  [\\/]* | ?:[\\/]*)
19103  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
19104  ;;
19105  *)
19106  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19107for as_dir in $PATH
19108do
19109  IFS=$as_save_IFS
19110  test -z "$as_dir" && as_dir=.
19111    for ac_exec_ext in '' $ac_executable_extensions; do
19112  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19113    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19114    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19115    break 2
19116  fi
19117done
19118  done
19119IFS=$as_save_IFS
19120
19121  ;;
19122esac
19123fi
19124CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
19125if test -n "$CHECK_GMAKE"; then
19126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
19127$as_echo "$CHECK_GMAKE" >&6; }
19128else
19129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19130$as_echo "no" >&6; }
19131fi
19132
19133
19134  test -n "$CHECK_GMAKE" && break
19135done
19136
19137
19138  MAKE_CANDIDATE=""$CHECK_GMAKE""
19139  DESCRIPTION="gmake in PATH"
19140
19141  # On Cygwin, we require a newer version of make than on other platforms
19142  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19143    MAKE_VERSION_EXPR="-e 4\."
19144    MAKE_REQUIRED_VERSION="4.0"
19145   else
19146    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19147    MAKE_REQUIRED_VERSION="3.81"
19148  fi
19149
19150  if test "x$MAKE_CANDIDATE" != x; then
19151    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19152$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19153    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19154    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19155    if test "x$IS_GNU_MAKE" = x; then
19156      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19157$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19158    else
19159      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19160      if test "x$IS_MODERN_MAKE" = x; then
19161        { $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
19162$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;}
19163      else
19164        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19165          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19166            MAKE_EXPECTED_ENV='cygwin'
19167          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19168            MAKE_EXPECTED_ENV='msys'
19169          else
19170            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19171          fi
19172          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19173          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19174        else
19175          # Not relevant for non-Windows
19176          IS_MAKE_CORRECT_ENV=true
19177        fi
19178        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19179          { $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
19180$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;}
19181        else
19182          FOUND_MAKE=$MAKE_CANDIDATE
19183
19184  # Only process if variable expands to non-empty
19185
19186  if test "x$FOUND_MAKE" != x; then
19187    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19188
19189  # First separate the path from the arguments. This will split at the first
19190  # space.
19191  complete="$FOUND_MAKE"
19192  path="${complete%% *}"
19193  tmp="$complete EOL"
19194  arguments="${tmp#* }"
19195
19196  # Input might be given as Windows format, start by converting to
19197  # unix format.
19198  new_path=`$CYGPATH -u "$path"`
19199
19200  # Now try to locate executable using which
19201  new_path=`$WHICH "$new_path" 2> /dev/null`
19202  # bat and cmd files are not always considered executable in cygwin causing which
19203  # to not find them
19204  if test "x$new_path" = x \
19205      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19206      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19207    new_path=`$CYGPATH -u "$path"`
19208  fi
19209  if test "x$new_path" = x; then
19210    # Oops. Which didn't find the executable.
19211    # The splitting of arguments from the executable at a space might have been incorrect,
19212    # since paths with space are more likely in Windows. Give it another try with the whole
19213    # argument.
19214    path="$complete"
19215    arguments="EOL"
19216    new_path=`$CYGPATH -u "$path"`
19217    new_path=`$WHICH "$new_path" 2> /dev/null`
19218    # bat and cmd files are not always considered executable in cygwin causing which
19219    # to not find them
19220    if test "x$new_path" = x \
19221        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19222        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19223      new_path=`$CYGPATH -u "$path"`
19224    fi
19225    if test "x$new_path" = x; then
19226      # It's still not found. Now this is an unrecoverable error.
19227      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19228$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19229      has_space=`$ECHO "$complete" | $GREP " "`
19230      if test "x$has_space" != x; then
19231        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19232$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19233      fi
19234      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19235    fi
19236  fi
19237
19238  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19239  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19240  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19241  # "foo.exe" is OK but "foo" is an error.
19242  #
19243  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19244  # It is also a way to make sure we got the proper file name for the real test later on.
19245  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19246  if test "x$test_shortpath" = x; then
19247    # Short path failed, file does not exist as specified.
19248    # Try adding .exe or .cmd
19249    if test -f "${new_path}.exe"; then
19250      input_to_shortpath="${new_path}.exe"
19251    elif test -f "${new_path}.cmd"; then
19252      input_to_shortpath="${new_path}.cmd"
19253    else
19254      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19255$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19256      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19257$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19258      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19259    fi
19260  else
19261    input_to_shortpath="$new_path"
19262  fi
19263
19264  # Call helper function which possibly converts this using DOS-style short mode.
19265  # If so, the updated path is stored in $new_path.
19266  new_path="$input_to_shortpath"
19267
19268  input_path="$input_to_shortpath"
19269  # Check if we need to convert this using DOS-style short mode. If the path
19270  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19271  # take no chances and rewrite it.
19272  # Note: m4 eats our [], so we need to use [ and ] instead.
19273  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19274  if test "x$has_forbidden_chars" != x; then
19275    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19276    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19277    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19278    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19279      # Going to short mode and back again did indeed matter. Since short mode is
19280      # case insensitive, let's make it lowercase to improve readability.
19281      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19282      # Now convert it back to Unix-style (cygpath)
19283      input_path=`$CYGPATH -u "$shortmode_path"`
19284      new_path="$input_path"
19285    fi
19286  fi
19287
19288  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19289  if test "x$test_cygdrive_prefix" = x; then
19290    # As a simple fix, exclude /usr/bin since it's not a real path.
19291    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19292      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19293      # a path prefixed by /cygdrive for fixpath to work.
19294      new_path="$CYGWIN_ROOT_PATH$input_path"
19295    fi
19296  fi
19297
19298  # remove trailing .exe if any
19299  new_path="${new_path/%.exe/}"
19300
19301    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19302
19303  # First separate the path from the arguments. This will split at the first
19304  # space.
19305  complete="$FOUND_MAKE"
19306  path="${complete%% *}"
19307  tmp="$complete EOL"
19308  arguments="${tmp#* }"
19309
19310  # Input might be given as Windows format, start by converting to
19311  # unix format.
19312  new_path="$path"
19313
19314  windows_path="$new_path"
19315  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19316    unix_path=`$CYGPATH -u "$windows_path"`
19317    new_path="$unix_path"
19318  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19319    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19320    new_path="$unix_path"
19321  fi
19322
19323
19324  # Now try to locate executable using which
19325  new_path=`$WHICH "$new_path" 2> /dev/null`
19326
19327  if test "x$new_path" = x; then
19328    # Oops. Which didn't find the executable.
19329    # The splitting of arguments from the executable at a space might have been incorrect,
19330    # since paths with space are more likely in Windows. Give it another try with the whole
19331    # argument.
19332    path="$complete"
19333    arguments="EOL"
19334    new_path="$path"
19335
19336  windows_path="$new_path"
19337  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19338    unix_path=`$CYGPATH -u "$windows_path"`
19339    new_path="$unix_path"
19340  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19341    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19342    new_path="$unix_path"
19343  fi
19344
19345
19346    new_path=`$WHICH "$new_path" 2> /dev/null`
19347    # bat and cmd files are not always considered executable in MSYS causing which
19348    # to not find them
19349    if test "x$new_path" = x \
19350        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19351        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19352      new_path="$path"
19353
19354  windows_path="$new_path"
19355  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19356    unix_path=`$CYGPATH -u "$windows_path"`
19357    new_path="$unix_path"
19358  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19359    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19360    new_path="$unix_path"
19361  fi
19362
19363    fi
19364
19365    if test "x$new_path" = x; then
19366      # It's still not found. Now this is an unrecoverable error.
19367      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19368$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19369      has_space=`$ECHO "$complete" | $GREP " "`
19370      if test "x$has_space" != x; then
19371        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19372$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19373      fi
19374      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19375    fi
19376  fi
19377
19378  # Now new_path has a complete unix path to the binary
19379  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19380    # Keep paths in /bin as-is, but remove trailing .exe if any
19381    new_path="${new_path/%.exe/}"
19382    # Do not save /bin paths to all_fixpath_prefixes!
19383  else
19384    # Not in mixed or Windows style, start by that.
19385    new_path=`cmd //c echo $new_path`
19386
19387  input_path="$new_path"
19388  # Check if we need to convert this using DOS-style short mode. If the path
19389  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19390  # take no chances and rewrite it.
19391  # Note: m4 eats our [], so we need to use [ and ] instead.
19392  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19393  if test "x$has_forbidden_chars" != x; then
19394    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19395    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19396  fi
19397
19398    # Output is in $new_path
19399
19400  windows_path="$new_path"
19401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19402    unix_path=`$CYGPATH -u "$windows_path"`
19403    new_path="$unix_path"
19404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19405    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19406    new_path="$unix_path"
19407  fi
19408
19409    # remove trailing .exe if any
19410    new_path="${new_path/%.exe/}"
19411
19412    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19413    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19414  fi
19415
19416    else
19417      # We're on a unix platform. Hooray! :)
19418      # First separate the path from the arguments. This will split at the first
19419      # space.
19420      complete="$FOUND_MAKE"
19421      path="${complete%% *}"
19422      tmp="$complete EOL"
19423      arguments="${tmp#* }"
19424
19425      # Cannot rely on the command "which" here since it doesn't always work.
19426      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19427      if test -z "$is_absolute_path"; then
19428        # Path to executable is not absolute. Find it.
19429        IFS_save="$IFS"
19430        IFS=:
19431        for p in $PATH; do
19432          if test -f "$p/$path" && test -x "$p/$path"; then
19433            new_path="$p/$path"
19434            break
19435          fi
19436        done
19437        IFS="$IFS_save"
19438      else
19439        # This is an absolute path, we can use it without further modifications.
19440        new_path="$path"
19441      fi
19442
19443      if test "x$new_path" = x; then
19444        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19445$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19446        has_space=`$ECHO "$complete" | $GREP " "`
19447        if test "x$has_space" != x; then
19448          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19449$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19450        fi
19451        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19452      fi
19453    fi
19454
19455    # Now join together the path and the arguments once again
19456    if test "x$arguments" != xEOL; then
19457      new_complete="$new_path ${arguments% *}"
19458    else
19459      new_complete="$new_path"
19460    fi
19461
19462    if test "x$complete" != "x$new_complete"; then
19463      FOUND_MAKE="$new_complete"
19464      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19465$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19466    fi
19467  fi
19468
19469        fi
19470      fi
19471    fi
19472  fi
19473
19474
19475    if test "x$FOUND_MAKE" = x; then
19476      for ac_prog in make
19477do
19478  # Extract the first word of "$ac_prog", so it can be a program name with args.
19479set dummy $ac_prog; ac_word=$2
19480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19481$as_echo_n "checking for $ac_word... " >&6; }
19482if ${ac_cv_path_CHECK_MAKE+:} false; then :
19483  $as_echo_n "(cached) " >&6
19484else
19485  case $CHECK_MAKE in
19486  [\\/]* | ?:[\\/]*)
19487  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19488  ;;
19489  *)
19490  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19491for as_dir in $PATH
19492do
19493  IFS=$as_save_IFS
19494  test -z "$as_dir" && as_dir=.
19495    for ac_exec_ext in '' $ac_executable_extensions; do
19496  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19497    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19498    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19499    break 2
19500  fi
19501done
19502  done
19503IFS=$as_save_IFS
19504
19505  ;;
19506esac
19507fi
19508CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19509if test -n "$CHECK_MAKE"; then
19510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19511$as_echo "$CHECK_MAKE" >&6; }
19512else
19513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19514$as_echo "no" >&6; }
19515fi
19516
19517
19518  test -n "$CHECK_MAKE" && break
19519done
19520
19521
19522  MAKE_CANDIDATE=""$CHECK_MAKE""
19523  DESCRIPTION="make in PATH"
19524
19525  # On Cygwin, we require a newer version of make than on other platforms
19526  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19527    MAKE_VERSION_EXPR="-e 4\."
19528    MAKE_REQUIRED_VERSION="4.0"
19529   else
19530    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19531    MAKE_REQUIRED_VERSION="3.81"
19532  fi
19533
19534  if test "x$MAKE_CANDIDATE" != x; then
19535    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19536$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19537    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19538    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19539    if test "x$IS_GNU_MAKE" = x; then
19540      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19541$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19542    else
19543      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19544      if test "x$IS_MODERN_MAKE" = x; then
19545        { $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
19546$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;}
19547      else
19548        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19549          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19550            MAKE_EXPECTED_ENV='cygwin'
19551          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19552            MAKE_EXPECTED_ENV='msys'
19553          else
19554            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19555          fi
19556          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19557          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19558        else
19559          # Not relevant for non-Windows
19560          IS_MAKE_CORRECT_ENV=true
19561        fi
19562        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19563          { $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
19564$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;}
19565        else
19566          FOUND_MAKE=$MAKE_CANDIDATE
19567
19568  # Only process if variable expands to non-empty
19569
19570  if test "x$FOUND_MAKE" != x; then
19571    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19572
19573  # First separate the path from the arguments. This will split at the first
19574  # space.
19575  complete="$FOUND_MAKE"
19576  path="${complete%% *}"
19577  tmp="$complete EOL"
19578  arguments="${tmp#* }"
19579
19580  # Input might be given as Windows format, start by converting to
19581  # unix format.
19582  new_path=`$CYGPATH -u "$path"`
19583
19584  # Now try to locate executable using which
19585  new_path=`$WHICH "$new_path" 2> /dev/null`
19586  # bat and cmd files are not always considered executable in cygwin causing which
19587  # to not find them
19588  if test "x$new_path" = x \
19589      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19590      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19591    new_path=`$CYGPATH -u "$path"`
19592  fi
19593  if test "x$new_path" = x; then
19594    # Oops. Which didn't find the executable.
19595    # The splitting of arguments from the executable at a space might have been incorrect,
19596    # since paths with space are more likely in Windows. Give it another try with the whole
19597    # argument.
19598    path="$complete"
19599    arguments="EOL"
19600    new_path=`$CYGPATH -u "$path"`
19601    new_path=`$WHICH "$new_path" 2> /dev/null`
19602    # bat and cmd files are not always considered executable in cygwin causing which
19603    # to not find them
19604    if test "x$new_path" = x \
19605        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19606        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19607      new_path=`$CYGPATH -u "$path"`
19608    fi
19609    if test "x$new_path" = x; then
19610      # It's still not found. Now this is an unrecoverable error.
19611      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19612$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19613      has_space=`$ECHO "$complete" | $GREP " "`
19614      if test "x$has_space" != x; then
19615        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19616$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19617      fi
19618      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19619    fi
19620  fi
19621
19622  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19623  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19624  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19625  # "foo.exe" is OK but "foo" is an error.
19626  #
19627  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19628  # It is also a way to make sure we got the proper file name for the real test later on.
19629  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19630  if test "x$test_shortpath" = x; then
19631    # Short path failed, file does not exist as specified.
19632    # Try adding .exe or .cmd
19633    if test -f "${new_path}.exe"; then
19634      input_to_shortpath="${new_path}.exe"
19635    elif test -f "${new_path}.cmd"; then
19636      input_to_shortpath="${new_path}.cmd"
19637    else
19638      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19639$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19640      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19641$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19642      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19643    fi
19644  else
19645    input_to_shortpath="$new_path"
19646  fi
19647
19648  # Call helper function which possibly converts this using DOS-style short mode.
19649  # If so, the updated path is stored in $new_path.
19650  new_path="$input_to_shortpath"
19651
19652  input_path="$input_to_shortpath"
19653  # Check if we need to convert this using DOS-style short mode. If the path
19654  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19655  # take no chances and rewrite it.
19656  # Note: m4 eats our [], so we need to use [ and ] instead.
19657  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19658  if test "x$has_forbidden_chars" != x; then
19659    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19660    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19661    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19662    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19663      # Going to short mode and back again did indeed matter. Since short mode is
19664      # case insensitive, let's make it lowercase to improve readability.
19665      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19666      # Now convert it back to Unix-style (cygpath)
19667      input_path=`$CYGPATH -u "$shortmode_path"`
19668      new_path="$input_path"
19669    fi
19670  fi
19671
19672  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19673  if test "x$test_cygdrive_prefix" = x; then
19674    # As a simple fix, exclude /usr/bin since it's not a real path.
19675    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19676      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19677      # a path prefixed by /cygdrive for fixpath to work.
19678      new_path="$CYGWIN_ROOT_PATH$input_path"
19679    fi
19680  fi
19681
19682  # remove trailing .exe if any
19683  new_path="${new_path/%.exe/}"
19684
19685    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19686
19687  # First separate the path from the arguments. This will split at the first
19688  # space.
19689  complete="$FOUND_MAKE"
19690  path="${complete%% *}"
19691  tmp="$complete EOL"
19692  arguments="${tmp#* }"
19693
19694  # Input might be given as Windows format, start by converting to
19695  # unix format.
19696  new_path="$path"
19697
19698  windows_path="$new_path"
19699  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19700    unix_path=`$CYGPATH -u "$windows_path"`
19701    new_path="$unix_path"
19702  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19703    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19704    new_path="$unix_path"
19705  fi
19706
19707
19708  # Now try to locate executable using which
19709  new_path=`$WHICH "$new_path" 2> /dev/null`
19710
19711  if test "x$new_path" = x; then
19712    # Oops. Which didn't find the executable.
19713    # The splitting of arguments from the executable at a space might have been incorrect,
19714    # since paths with space are more likely in Windows. Give it another try with the whole
19715    # argument.
19716    path="$complete"
19717    arguments="EOL"
19718    new_path="$path"
19719
19720  windows_path="$new_path"
19721  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19722    unix_path=`$CYGPATH -u "$windows_path"`
19723    new_path="$unix_path"
19724  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19725    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19726    new_path="$unix_path"
19727  fi
19728
19729
19730    new_path=`$WHICH "$new_path" 2> /dev/null`
19731    # bat and cmd files are not always considered executable in MSYS causing which
19732    # to not find them
19733    if test "x$new_path" = x \
19734        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19735        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19736      new_path="$path"
19737
19738  windows_path="$new_path"
19739  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19740    unix_path=`$CYGPATH -u "$windows_path"`
19741    new_path="$unix_path"
19742  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19743    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19744    new_path="$unix_path"
19745  fi
19746
19747    fi
19748
19749    if test "x$new_path" = x; then
19750      # It's still not found. Now this is an unrecoverable error.
19751      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19752$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19753      has_space=`$ECHO "$complete" | $GREP " "`
19754      if test "x$has_space" != x; then
19755        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19756$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19757      fi
19758      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19759    fi
19760  fi
19761
19762  # Now new_path has a complete unix path to the binary
19763  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19764    # Keep paths in /bin as-is, but remove trailing .exe if any
19765    new_path="${new_path/%.exe/}"
19766    # Do not save /bin paths to all_fixpath_prefixes!
19767  else
19768    # Not in mixed or Windows style, start by that.
19769    new_path=`cmd //c echo $new_path`
19770
19771  input_path="$new_path"
19772  # Check if we need to convert this using DOS-style short mode. If the path
19773  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19774  # take no chances and rewrite it.
19775  # Note: m4 eats our [], so we need to use [ and ] instead.
19776  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19777  if test "x$has_forbidden_chars" != x; then
19778    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19779    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19780  fi
19781
19782    # Output is in $new_path
19783
19784  windows_path="$new_path"
19785  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19786    unix_path=`$CYGPATH -u "$windows_path"`
19787    new_path="$unix_path"
19788  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19789    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19790    new_path="$unix_path"
19791  fi
19792
19793    # remove trailing .exe if any
19794    new_path="${new_path/%.exe/}"
19795
19796    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19797    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19798  fi
19799
19800    else
19801      # We're on a unix platform. Hooray! :)
19802      # First separate the path from the arguments. This will split at the first
19803      # space.
19804      complete="$FOUND_MAKE"
19805      path="${complete%% *}"
19806      tmp="$complete EOL"
19807      arguments="${tmp#* }"
19808
19809      # Cannot rely on the command "which" here since it doesn't always work.
19810      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19811      if test -z "$is_absolute_path"; then
19812        # Path to executable is not absolute. Find it.
19813        IFS_save="$IFS"
19814        IFS=:
19815        for p in $PATH; do
19816          if test -f "$p/$path" && test -x "$p/$path"; then
19817            new_path="$p/$path"
19818            break
19819          fi
19820        done
19821        IFS="$IFS_save"
19822      else
19823        # This is an absolute path, we can use it without further modifications.
19824        new_path="$path"
19825      fi
19826
19827      if test "x$new_path" = x; then
19828        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19829$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19830        has_space=`$ECHO "$complete" | $GREP " "`
19831        if test "x$has_space" != x; then
19832          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19833$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19834        fi
19835        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19836      fi
19837    fi
19838
19839    # Now join together the path and the arguments once again
19840    if test "x$arguments" != xEOL; then
19841      new_complete="$new_path ${arguments% *}"
19842    else
19843      new_complete="$new_path"
19844    fi
19845
19846    if test "x$complete" != "x$new_complete"; then
19847      FOUND_MAKE="$new_complete"
19848      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19849$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19850    fi
19851  fi
19852
19853        fi
19854      fi
19855    fi
19856  fi
19857
19858    fi
19859
19860    if test "x$FOUND_MAKE" = x; then
19861      if test "x$TOOLCHAIN_PATH" != x; then
19862        # We have a toolchain path, check that as well before giving up.
19863        OLD_PATH=$PATH
19864        PATH=$TOOLCHAIN_PATH:$PATH
19865        for ac_prog in gmake
19866do
19867  # Extract the first word of "$ac_prog", so it can be a program name with args.
19868set dummy $ac_prog; ac_word=$2
19869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19870$as_echo_n "checking for $ac_word... " >&6; }
19871if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
19872  $as_echo_n "(cached) " >&6
19873else
19874  case $CHECK_TOOLSDIR_GMAKE in
19875  [\\/]* | ?:[\\/]*)
19876  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
19877  ;;
19878  *)
19879  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19880for as_dir in $PATH
19881do
19882  IFS=$as_save_IFS
19883  test -z "$as_dir" && as_dir=.
19884    for ac_exec_ext in '' $ac_executable_extensions; do
19885  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19886    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19887    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19888    break 2
19889  fi
19890done
19891  done
19892IFS=$as_save_IFS
19893
19894  ;;
19895esac
19896fi
19897CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
19898if test -n "$CHECK_TOOLSDIR_GMAKE"; then
19899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
19900$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
19901else
19902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19903$as_echo "no" >&6; }
19904fi
19905
19906
19907  test -n "$CHECK_TOOLSDIR_GMAKE" && break
19908done
19909
19910
19911  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
19912  DESCRIPTION="gmake in tools-dir"
19913
19914  # On Cygwin, we require a newer version of make than on other platforms
19915  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19916    MAKE_VERSION_EXPR="-e 4\."
19917    MAKE_REQUIRED_VERSION="4.0"
19918   else
19919    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19920    MAKE_REQUIRED_VERSION="3.81"
19921  fi
19922
19923  if test "x$MAKE_CANDIDATE" != x; then
19924    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19925$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19926    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19927    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19928    if test "x$IS_GNU_MAKE" = x; then
19929      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19930$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19931    else
19932      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19933      if test "x$IS_MODERN_MAKE" = x; then
19934        { $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
19935$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;}
19936      else
19937        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19938          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19939            MAKE_EXPECTED_ENV='cygwin'
19940          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19941            MAKE_EXPECTED_ENV='msys'
19942          else
19943            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19944          fi
19945          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19946          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19947        else
19948          # Not relevant for non-Windows
19949          IS_MAKE_CORRECT_ENV=true
19950        fi
19951        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19952          { $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
19953$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;}
19954        else
19955          FOUND_MAKE=$MAKE_CANDIDATE
19956
19957  # Only process if variable expands to non-empty
19958
19959  if test "x$FOUND_MAKE" != x; then
19960    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19961
19962  # First separate the path from the arguments. This will split at the first
19963  # space.
19964  complete="$FOUND_MAKE"
19965  path="${complete%% *}"
19966  tmp="$complete EOL"
19967  arguments="${tmp#* }"
19968
19969  # Input might be given as Windows format, start by converting to
19970  # unix format.
19971  new_path=`$CYGPATH -u "$path"`
19972
19973  # Now try to locate executable using which
19974  new_path=`$WHICH "$new_path" 2> /dev/null`
19975  # bat and cmd files are not always considered executable in cygwin causing which
19976  # to not find them
19977  if test "x$new_path" = x \
19978      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19979      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19980    new_path=`$CYGPATH -u "$path"`
19981  fi
19982  if test "x$new_path" = x; then
19983    # Oops. Which didn't find the executable.
19984    # The splitting of arguments from the executable at a space might have been incorrect,
19985    # since paths with space are more likely in Windows. Give it another try with the whole
19986    # argument.
19987    path="$complete"
19988    arguments="EOL"
19989    new_path=`$CYGPATH -u "$path"`
19990    new_path=`$WHICH "$new_path" 2> /dev/null`
19991    # bat and cmd files are not always considered executable in cygwin causing which
19992    # to not find them
19993    if test "x$new_path" = x \
19994        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19995        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19996      new_path=`$CYGPATH -u "$path"`
19997    fi
19998    if test "x$new_path" = x; then
19999      # It's still not found. Now this is an unrecoverable error.
20000      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20001$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20002      has_space=`$ECHO "$complete" | $GREP " "`
20003      if test "x$has_space" != x; then
20004        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20005$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20006      fi
20007      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20008    fi
20009  fi
20010
20011  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20012  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20013  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20014  # "foo.exe" is OK but "foo" is an error.
20015  #
20016  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20017  # It is also a way to make sure we got the proper file name for the real test later on.
20018  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20019  if test "x$test_shortpath" = x; then
20020    # Short path failed, file does not exist as specified.
20021    # Try adding .exe or .cmd
20022    if test -f "${new_path}.exe"; then
20023      input_to_shortpath="${new_path}.exe"
20024    elif test -f "${new_path}.cmd"; then
20025      input_to_shortpath="${new_path}.cmd"
20026    else
20027      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20028$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20029      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20030$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20031      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20032    fi
20033  else
20034    input_to_shortpath="$new_path"
20035  fi
20036
20037  # Call helper function which possibly converts this using DOS-style short mode.
20038  # If so, the updated path is stored in $new_path.
20039  new_path="$input_to_shortpath"
20040
20041  input_path="$input_to_shortpath"
20042  # Check if we need to convert this using DOS-style short mode. If the path
20043  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20044  # take no chances and rewrite it.
20045  # Note: m4 eats our [], so we need to use [ and ] instead.
20046  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20047  if test "x$has_forbidden_chars" != x; then
20048    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20049    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20050    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20051    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20052      # Going to short mode and back again did indeed matter. Since short mode is
20053      # case insensitive, let's make it lowercase to improve readability.
20054      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20055      # Now convert it back to Unix-style (cygpath)
20056      input_path=`$CYGPATH -u "$shortmode_path"`
20057      new_path="$input_path"
20058    fi
20059  fi
20060
20061  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20062  if test "x$test_cygdrive_prefix" = x; then
20063    # As a simple fix, exclude /usr/bin since it's not a real path.
20064    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20065      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20066      # a path prefixed by /cygdrive for fixpath to work.
20067      new_path="$CYGWIN_ROOT_PATH$input_path"
20068    fi
20069  fi
20070
20071  # remove trailing .exe if any
20072  new_path="${new_path/%.exe/}"
20073
20074    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20075
20076  # First separate the path from the arguments. This will split at the first
20077  # space.
20078  complete="$FOUND_MAKE"
20079  path="${complete%% *}"
20080  tmp="$complete EOL"
20081  arguments="${tmp#* }"
20082
20083  # Input might be given as Windows format, start by converting to
20084  # unix format.
20085  new_path="$path"
20086
20087  windows_path="$new_path"
20088  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20089    unix_path=`$CYGPATH -u "$windows_path"`
20090    new_path="$unix_path"
20091  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20092    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20093    new_path="$unix_path"
20094  fi
20095
20096
20097  # Now try to locate executable using which
20098  new_path=`$WHICH "$new_path" 2> /dev/null`
20099
20100  if test "x$new_path" = x; then
20101    # Oops. Which didn't find the executable.
20102    # The splitting of arguments from the executable at a space might have been incorrect,
20103    # since paths with space are more likely in Windows. Give it another try with the whole
20104    # argument.
20105    path="$complete"
20106    arguments="EOL"
20107    new_path="$path"
20108
20109  windows_path="$new_path"
20110  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20111    unix_path=`$CYGPATH -u "$windows_path"`
20112    new_path="$unix_path"
20113  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20114    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20115    new_path="$unix_path"
20116  fi
20117
20118
20119    new_path=`$WHICH "$new_path" 2> /dev/null`
20120    # bat and cmd files are not always considered executable in MSYS causing which
20121    # to not find them
20122    if test "x$new_path" = x \
20123        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20124        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20125      new_path="$path"
20126
20127  windows_path="$new_path"
20128  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20129    unix_path=`$CYGPATH -u "$windows_path"`
20130    new_path="$unix_path"
20131  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20132    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20133    new_path="$unix_path"
20134  fi
20135
20136    fi
20137
20138    if test "x$new_path" = x; then
20139      # It's still not found. Now this is an unrecoverable error.
20140      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20141$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20142      has_space=`$ECHO "$complete" | $GREP " "`
20143      if test "x$has_space" != x; then
20144        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20145$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20146      fi
20147      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20148    fi
20149  fi
20150
20151  # Now new_path has a complete unix path to the binary
20152  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20153    # Keep paths in /bin as-is, but remove trailing .exe if any
20154    new_path="${new_path/%.exe/}"
20155    # Do not save /bin paths to all_fixpath_prefixes!
20156  else
20157    # Not in mixed or Windows style, start by that.
20158    new_path=`cmd //c echo $new_path`
20159
20160  input_path="$new_path"
20161  # Check if we need to convert this using DOS-style short mode. If the path
20162  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20163  # take no chances and rewrite it.
20164  # Note: m4 eats our [], so we need to use [ and ] instead.
20165  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20166  if test "x$has_forbidden_chars" != x; then
20167    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20168    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20169  fi
20170
20171    # Output is in $new_path
20172
20173  windows_path="$new_path"
20174  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20175    unix_path=`$CYGPATH -u "$windows_path"`
20176    new_path="$unix_path"
20177  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20178    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20179    new_path="$unix_path"
20180  fi
20181
20182    # remove trailing .exe if any
20183    new_path="${new_path/%.exe/}"
20184
20185    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20186    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20187  fi
20188
20189    else
20190      # We're on a unix platform. Hooray! :)
20191      # First separate the path from the arguments. This will split at the first
20192      # space.
20193      complete="$FOUND_MAKE"
20194      path="${complete%% *}"
20195      tmp="$complete EOL"
20196      arguments="${tmp#* }"
20197
20198      # Cannot rely on the command "which" here since it doesn't always work.
20199      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20200      if test -z "$is_absolute_path"; then
20201        # Path to executable is not absolute. Find it.
20202        IFS_save="$IFS"
20203        IFS=:
20204        for p in $PATH; do
20205          if test -f "$p/$path" && test -x "$p/$path"; then
20206            new_path="$p/$path"
20207            break
20208          fi
20209        done
20210        IFS="$IFS_save"
20211      else
20212        # This is an absolute path, we can use it without further modifications.
20213        new_path="$path"
20214      fi
20215
20216      if test "x$new_path" = x; then
20217        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20218$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20219        has_space=`$ECHO "$complete" | $GREP " "`
20220        if test "x$has_space" != x; then
20221          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20222$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20223        fi
20224        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20225      fi
20226    fi
20227
20228    # Now join together the path and the arguments once again
20229    if test "x$arguments" != xEOL; then
20230      new_complete="$new_path ${arguments% *}"
20231    else
20232      new_complete="$new_path"
20233    fi
20234
20235    if test "x$complete" != "x$new_complete"; then
20236      FOUND_MAKE="$new_complete"
20237      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20238$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20239    fi
20240  fi
20241
20242        fi
20243      fi
20244    fi
20245  fi
20246
20247        if test "x$FOUND_MAKE" = x; then
20248          for ac_prog in make
20249do
20250  # Extract the first word of "$ac_prog", so it can be a program name with args.
20251set dummy $ac_prog; ac_word=$2
20252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20253$as_echo_n "checking for $ac_word... " >&6; }
20254if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
20255  $as_echo_n "(cached) " >&6
20256else
20257  case $CHECK_TOOLSDIR_MAKE in
20258  [\\/]* | ?:[\\/]*)
20259  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
20260  ;;
20261  *)
20262  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20263for as_dir in $PATH
20264do
20265  IFS=$as_save_IFS
20266  test -z "$as_dir" && as_dir=.
20267    for ac_exec_ext in '' $ac_executable_extensions; do
20268  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20269    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
20270    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20271    break 2
20272  fi
20273done
20274  done
20275IFS=$as_save_IFS
20276
20277  ;;
20278esac
20279fi
20280CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
20281if test -n "$CHECK_TOOLSDIR_MAKE"; then
20282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
20283$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
20284else
20285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20286$as_echo "no" >&6; }
20287fi
20288
20289
20290  test -n "$CHECK_TOOLSDIR_MAKE" && break
20291done
20292
20293
20294  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
20295  DESCRIPTION="make in tools-dir"
20296
20297  # On Cygwin, we require a newer version of make than on other platforms
20298  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20299    MAKE_VERSION_EXPR="-e 4\."
20300    MAKE_REQUIRED_VERSION="4.0"
20301   else
20302    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20303    MAKE_REQUIRED_VERSION="3.81"
20304  fi
20305
20306  if test "x$MAKE_CANDIDATE" != x; then
20307    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20308$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20309    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20310    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20311    if test "x$IS_GNU_MAKE" = x; then
20312      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20313$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20314    else
20315      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20316      if test "x$IS_MODERN_MAKE" = x; then
20317        { $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
20318$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;}
20319      else
20320        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20321          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20322            MAKE_EXPECTED_ENV='cygwin'
20323          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20324            MAKE_EXPECTED_ENV='msys'
20325          else
20326            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20327          fi
20328          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20329          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20330        else
20331          # Not relevant for non-Windows
20332          IS_MAKE_CORRECT_ENV=true
20333        fi
20334        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20335          { $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
20336$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;}
20337        else
20338          FOUND_MAKE=$MAKE_CANDIDATE
20339
20340  # Only process if variable expands to non-empty
20341
20342  if test "x$FOUND_MAKE" != x; then
20343    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20344
20345  # First separate the path from the arguments. This will split at the first
20346  # space.
20347  complete="$FOUND_MAKE"
20348  path="${complete%% *}"
20349  tmp="$complete EOL"
20350  arguments="${tmp#* }"
20351
20352  # Input might be given as Windows format, start by converting to
20353  # unix format.
20354  new_path=`$CYGPATH -u "$path"`
20355
20356  # Now try to locate executable using which
20357  new_path=`$WHICH "$new_path" 2> /dev/null`
20358  # bat and cmd files are not always considered executable in cygwin causing which
20359  # to not find them
20360  if test "x$new_path" = x \
20361      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20362      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20363    new_path=`$CYGPATH -u "$path"`
20364  fi
20365  if test "x$new_path" = x; then
20366    # Oops. Which didn't find the executable.
20367    # The splitting of arguments from the executable at a space might have been incorrect,
20368    # since paths with space are more likely in Windows. Give it another try with the whole
20369    # argument.
20370    path="$complete"
20371    arguments="EOL"
20372    new_path=`$CYGPATH -u "$path"`
20373    new_path=`$WHICH "$new_path" 2> /dev/null`
20374    # bat and cmd files are not always considered executable in cygwin causing which
20375    # to not find them
20376    if test "x$new_path" = x \
20377        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20378        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20379      new_path=`$CYGPATH -u "$path"`
20380    fi
20381    if test "x$new_path" = x; then
20382      # It's still not found. Now this is an unrecoverable error.
20383      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20384$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20385      has_space=`$ECHO "$complete" | $GREP " "`
20386      if test "x$has_space" != x; then
20387        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20388$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20389      fi
20390      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20391    fi
20392  fi
20393
20394  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20395  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20396  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20397  # "foo.exe" is OK but "foo" is an error.
20398  #
20399  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20400  # It is also a way to make sure we got the proper file name for the real test later on.
20401  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20402  if test "x$test_shortpath" = x; then
20403    # Short path failed, file does not exist as specified.
20404    # Try adding .exe or .cmd
20405    if test -f "${new_path}.exe"; then
20406      input_to_shortpath="${new_path}.exe"
20407    elif test -f "${new_path}.cmd"; then
20408      input_to_shortpath="${new_path}.cmd"
20409    else
20410      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20411$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20412      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20413$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20414      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20415    fi
20416  else
20417    input_to_shortpath="$new_path"
20418  fi
20419
20420  # Call helper function which possibly converts this using DOS-style short mode.
20421  # If so, the updated path is stored in $new_path.
20422  new_path="$input_to_shortpath"
20423
20424  input_path="$input_to_shortpath"
20425  # Check if we need to convert this using DOS-style short mode. If the path
20426  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20427  # take no chances and rewrite it.
20428  # Note: m4 eats our [], so we need to use [ and ] instead.
20429  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20430  if test "x$has_forbidden_chars" != x; then
20431    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20432    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20433    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20434    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20435      # Going to short mode and back again did indeed matter. Since short mode is
20436      # case insensitive, let's make it lowercase to improve readability.
20437      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20438      # Now convert it back to Unix-style (cygpath)
20439      input_path=`$CYGPATH -u "$shortmode_path"`
20440      new_path="$input_path"
20441    fi
20442  fi
20443
20444  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20445  if test "x$test_cygdrive_prefix" = x; then
20446    # As a simple fix, exclude /usr/bin since it's not a real path.
20447    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20448      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20449      # a path prefixed by /cygdrive for fixpath to work.
20450      new_path="$CYGWIN_ROOT_PATH$input_path"
20451    fi
20452  fi
20453
20454  # remove trailing .exe if any
20455  new_path="${new_path/%.exe/}"
20456
20457    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20458
20459  # First separate the path from the arguments. This will split at the first
20460  # space.
20461  complete="$FOUND_MAKE"
20462  path="${complete%% *}"
20463  tmp="$complete EOL"
20464  arguments="${tmp#* }"
20465
20466  # Input might be given as Windows format, start by converting to
20467  # unix format.
20468  new_path="$path"
20469
20470  windows_path="$new_path"
20471  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20472    unix_path=`$CYGPATH -u "$windows_path"`
20473    new_path="$unix_path"
20474  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20475    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20476    new_path="$unix_path"
20477  fi
20478
20479
20480  # Now try to locate executable using which
20481  new_path=`$WHICH "$new_path" 2> /dev/null`
20482
20483  if test "x$new_path" = x; then
20484    # Oops. Which didn't find the executable.
20485    # The splitting of arguments from the executable at a space might have been incorrect,
20486    # since paths with space are more likely in Windows. Give it another try with the whole
20487    # argument.
20488    path="$complete"
20489    arguments="EOL"
20490    new_path="$path"
20491
20492  windows_path="$new_path"
20493  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20494    unix_path=`$CYGPATH -u "$windows_path"`
20495    new_path="$unix_path"
20496  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20497    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20498    new_path="$unix_path"
20499  fi
20500
20501
20502    new_path=`$WHICH "$new_path" 2> /dev/null`
20503    # bat and cmd files are not always considered executable in MSYS causing which
20504    # to not find them
20505    if test "x$new_path" = x \
20506        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20507        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20508      new_path="$path"
20509
20510  windows_path="$new_path"
20511  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20512    unix_path=`$CYGPATH -u "$windows_path"`
20513    new_path="$unix_path"
20514  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20515    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20516    new_path="$unix_path"
20517  fi
20518
20519    fi
20520
20521    if test "x$new_path" = x; then
20522      # It's still not found. Now this is an unrecoverable error.
20523      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20524$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20525      has_space=`$ECHO "$complete" | $GREP " "`
20526      if test "x$has_space" != x; then
20527        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20528$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20529      fi
20530      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20531    fi
20532  fi
20533
20534  # Now new_path has a complete unix path to the binary
20535  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20536    # Keep paths in /bin as-is, but remove trailing .exe if any
20537    new_path="${new_path/%.exe/}"
20538    # Do not save /bin paths to all_fixpath_prefixes!
20539  else
20540    # Not in mixed or Windows style, start by that.
20541    new_path=`cmd //c echo $new_path`
20542
20543  input_path="$new_path"
20544  # Check if we need to convert this using DOS-style short mode. If the path
20545  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20546  # take no chances and rewrite it.
20547  # Note: m4 eats our [], so we need to use [ and ] instead.
20548  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20549  if test "x$has_forbidden_chars" != x; then
20550    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20551    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20552  fi
20553
20554    # Output is in $new_path
20555
20556  windows_path="$new_path"
20557  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20558    unix_path=`$CYGPATH -u "$windows_path"`
20559    new_path="$unix_path"
20560  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20561    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20562    new_path="$unix_path"
20563  fi
20564
20565    # remove trailing .exe if any
20566    new_path="${new_path/%.exe/}"
20567
20568    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20569    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20570  fi
20571
20572    else
20573      # We're on a unix platform. Hooray! :)
20574      # First separate the path from the arguments. This will split at the first
20575      # space.
20576      complete="$FOUND_MAKE"
20577      path="${complete%% *}"
20578      tmp="$complete EOL"
20579      arguments="${tmp#* }"
20580
20581      # Cannot rely on the command "which" here since it doesn't always work.
20582      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20583      if test -z "$is_absolute_path"; then
20584        # Path to executable is not absolute. Find it.
20585        IFS_save="$IFS"
20586        IFS=:
20587        for p in $PATH; do
20588          if test -f "$p/$path" && test -x "$p/$path"; then
20589            new_path="$p/$path"
20590            break
20591          fi
20592        done
20593        IFS="$IFS_save"
20594      else
20595        # This is an absolute path, we can use it without further modifications.
20596        new_path="$path"
20597      fi
20598
20599      if test "x$new_path" = x; then
20600        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20601$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20602        has_space=`$ECHO "$complete" | $GREP " "`
20603        if test "x$has_space" != x; then
20604          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20605$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20606        fi
20607        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20608      fi
20609    fi
20610
20611    # Now join together the path and the arguments once again
20612    if test "x$arguments" != xEOL; then
20613      new_complete="$new_path ${arguments% *}"
20614    else
20615      new_complete="$new_path"
20616    fi
20617
20618    if test "x$complete" != "x$new_complete"; then
20619      FOUND_MAKE="$new_complete"
20620      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20621$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20622    fi
20623  fi
20624
20625        fi
20626      fi
20627    fi
20628  fi
20629
20630        fi
20631        PATH=$OLD_PATH
20632      fi
20633    fi
20634
20635    if test "x$FOUND_MAKE" = x; then
20636      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
20637    fi
20638
20639    else
20640      # If it succeeded, then it was overridden by the user. We will use it
20641      # for the tool.
20642
20643      # First remove it from the list of overridden variables, so we can test
20644      # for unknown variables in the end.
20645      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20646
20647      # Check if we try to supply an empty value
20648      if test "x$MAKE" = x; then
20649        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20650$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20651        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20652$as_echo_n "checking for MAKE... " >&6; }
20653        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20654$as_echo "disabled" >&6; }
20655      else
20656        # Check if the provided tool contains a complete path.
20657        tool_specified="$MAKE"
20658        tool_basename="${tool_specified##*/}"
20659        if test "x$tool_basename" = "x$tool_specified"; then
20660          # A command without a complete path is provided, search $PATH.
20661          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20662$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20663          # Extract the first word of "$tool_basename", so it can be a program name with args.
20664set dummy $tool_basename; ac_word=$2
20665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20666$as_echo_n "checking for $ac_word... " >&6; }
20667if ${ac_cv_path_MAKE+:} false; then :
20668  $as_echo_n "(cached) " >&6
20669else
20670  case $MAKE in
20671  [\\/]* | ?:[\\/]*)
20672  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20673  ;;
20674  *)
20675  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20676for as_dir in $PATH
20677do
20678  IFS=$as_save_IFS
20679  test -z "$as_dir" && as_dir=.
20680    for ac_exec_ext in '' $ac_executable_extensions; do
20681  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20682    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
20683    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20684    break 2
20685  fi
20686done
20687  done
20688IFS=$as_save_IFS
20689
20690  ;;
20691esac
20692fi
20693MAKE=$ac_cv_path_MAKE
20694if test -n "$MAKE"; then
20695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
20696$as_echo "$MAKE" >&6; }
20697else
20698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20699$as_echo "no" >&6; }
20700fi
20701
20702
20703          if test "x$MAKE" = x; then
20704            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20705          fi
20706        else
20707          # Otherwise we believe it is a complete path. Use it as it is.
20708          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
20709$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
20710          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20711$as_echo_n "checking for MAKE... " >&6; }
20712          if test ! -x "$tool_specified"; then
20713            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20714$as_echo "not found" >&6; }
20715            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
20716          fi
20717          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20718$as_echo "$tool_specified" >&6; }
20719        fi
20720      fi
20721    fi
20722
20723    # If MAKE was set by user, verify the version
20724
20725  MAKE_CANDIDATE=""$MAKE""
20726  DESCRIPTION="user supplied MAKE=$MAKE"
20727
20728  # On Cygwin, we require a newer version of make than on other platforms
20729  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20730    MAKE_VERSION_EXPR="-e 4\."
20731    MAKE_REQUIRED_VERSION="4.0"
20732   else
20733    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20734    MAKE_REQUIRED_VERSION="3.81"
20735  fi
20736
20737  if test "x$MAKE_CANDIDATE" != x; then
20738    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20739$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20740    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20741    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20742    if test "x$IS_GNU_MAKE" = x; then
20743      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20744$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20745    else
20746      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20747      if test "x$IS_MODERN_MAKE" = x; then
20748        { $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
20749$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;}
20750      else
20751        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20752          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20753            MAKE_EXPECTED_ENV='cygwin'
20754          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20755            MAKE_EXPECTED_ENV='msys'
20756          else
20757            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20758          fi
20759          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20760          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20761        else
20762          # Not relevant for non-Windows
20763          IS_MAKE_CORRECT_ENV=true
20764        fi
20765        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20766          { $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
20767$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;}
20768        else
20769          FOUND_MAKE=$MAKE_CANDIDATE
20770
20771  # Only process if variable expands to non-empty
20772
20773  if test "x$FOUND_MAKE" != x; then
20774    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20775
20776  # First separate the path from the arguments. This will split at the first
20777  # space.
20778  complete="$FOUND_MAKE"
20779  path="${complete%% *}"
20780  tmp="$complete EOL"
20781  arguments="${tmp#* }"
20782
20783  # Input might be given as Windows format, start by converting to
20784  # unix format.
20785  new_path=`$CYGPATH -u "$path"`
20786
20787  # Now try to locate executable using which
20788  new_path=`$WHICH "$new_path" 2> /dev/null`
20789  # bat and cmd files are not always considered executable in cygwin causing which
20790  # to not find them
20791  if test "x$new_path" = x \
20792      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20793      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20794    new_path=`$CYGPATH -u "$path"`
20795  fi
20796  if test "x$new_path" = x; then
20797    # Oops. Which didn't find the executable.
20798    # The splitting of arguments from the executable at a space might have been incorrect,
20799    # since paths with space are more likely in Windows. Give it another try with the whole
20800    # argument.
20801    path="$complete"
20802    arguments="EOL"
20803    new_path=`$CYGPATH -u "$path"`
20804    new_path=`$WHICH "$new_path" 2> /dev/null`
20805    # bat and cmd files are not always considered executable in cygwin causing which
20806    # to not find them
20807    if test "x$new_path" = x \
20808        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20809        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20810      new_path=`$CYGPATH -u "$path"`
20811    fi
20812    if test "x$new_path" = x; then
20813      # It's still not found. Now this is an unrecoverable error.
20814      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20815$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20816      has_space=`$ECHO "$complete" | $GREP " "`
20817      if test "x$has_space" != x; then
20818        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20819$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20820      fi
20821      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20822    fi
20823  fi
20824
20825  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20826  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20827  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20828  # "foo.exe" is OK but "foo" is an error.
20829  #
20830  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20831  # It is also a way to make sure we got the proper file name for the real test later on.
20832  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20833  if test "x$test_shortpath" = x; then
20834    # Short path failed, file does not exist as specified.
20835    # Try adding .exe or .cmd
20836    if test -f "${new_path}.exe"; then
20837      input_to_shortpath="${new_path}.exe"
20838    elif test -f "${new_path}.cmd"; then
20839      input_to_shortpath="${new_path}.cmd"
20840    else
20841      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20842$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20843      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20844$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20845      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20846    fi
20847  else
20848    input_to_shortpath="$new_path"
20849  fi
20850
20851  # Call helper function which possibly converts this using DOS-style short mode.
20852  # If so, the updated path is stored in $new_path.
20853  new_path="$input_to_shortpath"
20854
20855  input_path="$input_to_shortpath"
20856  # Check if we need to convert this using DOS-style short mode. If the path
20857  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20858  # take no chances and rewrite it.
20859  # Note: m4 eats our [], so we need to use [ and ] instead.
20860  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20861  if test "x$has_forbidden_chars" != x; then
20862    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20863    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20864    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20865    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20866      # Going to short mode and back again did indeed matter. Since short mode is
20867      # case insensitive, let's make it lowercase to improve readability.
20868      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20869      # Now convert it back to Unix-style (cygpath)
20870      input_path=`$CYGPATH -u "$shortmode_path"`
20871      new_path="$input_path"
20872    fi
20873  fi
20874
20875  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20876  if test "x$test_cygdrive_prefix" = x; then
20877    # As a simple fix, exclude /usr/bin since it's not a real path.
20878    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20879      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20880      # a path prefixed by /cygdrive for fixpath to work.
20881      new_path="$CYGWIN_ROOT_PATH$input_path"
20882    fi
20883  fi
20884
20885  # remove trailing .exe if any
20886  new_path="${new_path/%.exe/}"
20887
20888    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20889
20890  # First separate the path from the arguments. This will split at the first
20891  # space.
20892  complete="$FOUND_MAKE"
20893  path="${complete%% *}"
20894  tmp="$complete EOL"
20895  arguments="${tmp#* }"
20896
20897  # Input might be given as Windows format, start by converting to
20898  # unix format.
20899  new_path="$path"
20900
20901  windows_path="$new_path"
20902  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20903    unix_path=`$CYGPATH -u "$windows_path"`
20904    new_path="$unix_path"
20905  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20906    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20907    new_path="$unix_path"
20908  fi
20909
20910
20911  # Now try to locate executable using which
20912  new_path=`$WHICH "$new_path" 2> /dev/null`
20913
20914  if test "x$new_path" = x; then
20915    # Oops. Which didn't find the executable.
20916    # The splitting of arguments from the executable at a space might have been incorrect,
20917    # since paths with space are more likely in Windows. Give it another try with the whole
20918    # argument.
20919    path="$complete"
20920    arguments="EOL"
20921    new_path="$path"
20922
20923  windows_path="$new_path"
20924  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20925    unix_path=`$CYGPATH -u "$windows_path"`
20926    new_path="$unix_path"
20927  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20928    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20929    new_path="$unix_path"
20930  fi
20931
20932
20933    new_path=`$WHICH "$new_path" 2> /dev/null`
20934    # bat and cmd files are not always considered executable in MSYS causing which
20935    # to not find them
20936    if test "x$new_path" = x \
20937        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20938        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20939      new_path="$path"
20940
20941  windows_path="$new_path"
20942  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20943    unix_path=`$CYGPATH -u "$windows_path"`
20944    new_path="$unix_path"
20945  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20946    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20947    new_path="$unix_path"
20948  fi
20949
20950    fi
20951
20952    if test "x$new_path" = x; then
20953      # It's still not found. Now this is an unrecoverable error.
20954      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20955$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20956      has_space=`$ECHO "$complete" | $GREP " "`
20957      if test "x$has_space" != x; then
20958        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20959$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20960      fi
20961      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20962    fi
20963  fi
20964
20965  # Now new_path has a complete unix path to the binary
20966  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20967    # Keep paths in /bin as-is, but remove trailing .exe if any
20968    new_path="${new_path/%.exe/}"
20969    # Do not save /bin paths to all_fixpath_prefixes!
20970  else
20971    # Not in mixed or Windows style, start by that.
20972    new_path=`cmd //c echo $new_path`
20973
20974  input_path="$new_path"
20975  # Check if we need to convert this using DOS-style short mode. If the path
20976  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20977  # take no chances and rewrite it.
20978  # Note: m4 eats our [], so we need to use [ and ] instead.
20979  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20980  if test "x$has_forbidden_chars" != x; then
20981    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20982    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20983  fi
20984
20985    # Output is in $new_path
20986
20987  windows_path="$new_path"
20988  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20989    unix_path=`$CYGPATH -u "$windows_path"`
20990    new_path="$unix_path"
20991  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20992    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20993    new_path="$unix_path"
20994  fi
20995
20996    # remove trailing .exe if any
20997    new_path="${new_path/%.exe/}"
20998
20999    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21000    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21001  fi
21002
21003    else
21004      # We're on a unix platform. Hooray! :)
21005      # First separate the path from the arguments. This will split at the first
21006      # space.
21007      complete="$FOUND_MAKE"
21008      path="${complete%% *}"
21009      tmp="$complete EOL"
21010      arguments="${tmp#* }"
21011
21012      # Cannot rely on the command "which" here since it doesn't always work.
21013      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21014      if test -z "$is_absolute_path"; then
21015        # Path to executable is not absolute. Find it.
21016        IFS_save="$IFS"
21017        IFS=:
21018        for p in $PATH; do
21019          if test -f "$p/$path" && test -x "$p/$path"; then
21020            new_path="$p/$path"
21021            break
21022          fi
21023        done
21024        IFS="$IFS_save"
21025      else
21026        # This is an absolute path, we can use it without further modifications.
21027        new_path="$path"
21028      fi
21029
21030      if test "x$new_path" = x; then
21031        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21032$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21033        has_space=`$ECHO "$complete" | $GREP " "`
21034        if test "x$has_space" != x; then
21035          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21036$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21037        fi
21038        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21039      fi
21040    fi
21041
21042    # Now join together the path and the arguments once again
21043    if test "x$arguments" != xEOL; then
21044      new_complete="$new_path ${arguments% *}"
21045    else
21046      new_complete="$new_path"
21047    fi
21048
21049    if test "x$complete" != "x$new_complete"; then
21050      FOUND_MAKE="$new_complete"
21051      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
21052$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
21053    fi
21054  fi
21055
21056        fi
21057      fi
21058    fi
21059  fi
21060
21061    if test "x$FOUND_MAKE" = x; then
21062      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
21063    fi
21064
21065  fi
21066
21067
21068  MAKE=$FOUND_MAKE
21069
21070  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
21071$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
21072
21073
21074  # Check if make supports the output sync option and if so, setup using it.
21075  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
21076$as_echo_n "checking if make --output-sync is supported... " >&6; }
21077  if $MAKE --version -O > /dev/null 2>&1; then
21078    OUTPUT_SYNC_SUPPORTED=true
21079    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21080$as_echo "yes" >&6; }
21081    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
21082$as_echo_n "checking for output-sync value... " >&6; }
21083
21084# Check whether --with-output-sync was given.
21085if test "${with_output_sync+set}" = set; then :
21086  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
21087fi
21088
21089    if test "x$OUTPUT_SYNC" = "x"; then
21090      OUTPUT_SYNC=none
21091    fi
21092    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
21093$as_echo "$OUTPUT_SYNC" >&6; }
21094    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
21095      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
21096    fi
21097  else
21098    OUTPUT_SYNC_SUPPORTED=false
21099    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21100$as_echo "no" >&6; }
21101  fi
21102
21103
21104
21105
21106
21107
21108  # Test if find supports -delete
21109  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
21110$as_echo_n "checking if find supports -delete... " >&6; }
21111  FIND_DELETE="-delete"
21112
21113  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
21114
21115  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
21116
21117  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
21118  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
21119    # No, it does not.
21120    $RM $DELETEDIR/TestIfFindSupportsDelete
21121    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21122      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
21123      FIND_DELETE="-print | $XARGS $RM"
21124    else
21125      FIND_DELETE="-exec $RM \{\} \+"
21126    fi
21127    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21128$as_echo "no" >&6; }
21129  else
21130    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21131$as_echo "yes" >&6; }
21132  fi
21133  $RMDIR $DELETEDIR
21134
21135
21136
21137  # Test which kind of tar was found
21138  if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then
21139    TAR_TYPE="gnu"
21140  elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
21141    TAR_TYPE="bsd"
21142  elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
21143    TAR_TYPE="solaris"
21144  fi
21145  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of tar was found" >&5
21146$as_echo_n "checking what type of tar was found... " >&6; }
21147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR_TYPE" >&5
21148$as_echo "$TAR_TYPE" >&6; }
21149
21150  TAR_CREATE_FILE_PARAM=""
21151
21152  if test "x$TAR_TYPE" = "xgnu"; then
21153    TAR_INCLUDE_PARAM="T"
21154    TAR_SUPPORTS_TRANSFORM="true"
21155    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
21156      # When using gnu tar for Solaris targets, need to use compatibility mode
21157      TAR_CREATE_EXTRA_PARAM="--format=ustar"
21158    fi
21159  else
21160    TAR_INCLUDE_PARAM="I"
21161    TAR_SUPPORTS_TRANSFORM="false"
21162  fi
21163
21164
21165
21166
21167
21168
21169  # These tools might not be installed by default,
21170  # need hint on how to install them.
21171
21172
21173
21174  # Publish this variable in the help.
21175
21176
21177  if [ -z "${UNZIP+x}" ]; then
21178    # The variable is not set by user, try to locate tool using the code snippet
21179    for ac_prog in unzip
21180do
21181  # Extract the first word of "$ac_prog", so it can be a program name with args.
21182set dummy $ac_prog; ac_word=$2
21183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21184$as_echo_n "checking for $ac_word... " >&6; }
21185if ${ac_cv_path_UNZIP+:} false; then :
21186  $as_echo_n "(cached) " >&6
21187else
21188  case $UNZIP in
21189  [\\/]* | ?:[\\/]*)
21190  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21191  ;;
21192  *)
21193  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21194for as_dir in $PATH
21195do
21196  IFS=$as_save_IFS
21197  test -z "$as_dir" && as_dir=.
21198    for ac_exec_ext in '' $ac_executable_extensions; do
21199  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21200    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21201    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21202    break 2
21203  fi
21204done
21205  done
21206IFS=$as_save_IFS
21207
21208  ;;
21209esac
21210fi
21211UNZIP=$ac_cv_path_UNZIP
21212if test -n "$UNZIP"; then
21213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21214$as_echo "$UNZIP" >&6; }
21215else
21216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21217$as_echo "no" >&6; }
21218fi
21219
21220
21221  test -n "$UNZIP" && break
21222done
21223
21224  else
21225    # The variable is set, but is it from the command line or the environment?
21226
21227    # Try to remove the string !UNZIP! from our list.
21228    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
21229    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21230      # If it failed, the variable was not from the command line. Ignore it,
21231      # but warn the user (except for BASH, which is always set by the calling BASH).
21232      if test "xUNZIP" != xBASH; then
21233        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
21234$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
21235      fi
21236      # Try to locate tool using the code snippet
21237      for ac_prog in unzip
21238do
21239  # Extract the first word of "$ac_prog", so it can be a program name with args.
21240set dummy $ac_prog; ac_word=$2
21241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21242$as_echo_n "checking for $ac_word... " >&6; }
21243if ${ac_cv_path_UNZIP+:} false; then :
21244  $as_echo_n "(cached) " >&6
21245else
21246  case $UNZIP in
21247  [\\/]* | ?:[\\/]*)
21248  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21249  ;;
21250  *)
21251  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21252for as_dir in $PATH
21253do
21254  IFS=$as_save_IFS
21255  test -z "$as_dir" && as_dir=.
21256    for ac_exec_ext in '' $ac_executable_extensions; do
21257  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21258    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21259    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21260    break 2
21261  fi
21262done
21263  done
21264IFS=$as_save_IFS
21265
21266  ;;
21267esac
21268fi
21269UNZIP=$ac_cv_path_UNZIP
21270if test -n "$UNZIP"; then
21271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21272$as_echo "$UNZIP" >&6; }
21273else
21274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21275$as_echo "no" >&6; }
21276fi
21277
21278
21279  test -n "$UNZIP" && break
21280done
21281
21282    else
21283      # If it succeeded, then it was overridden by the user. We will use it
21284      # for the tool.
21285
21286      # First remove it from the list of overridden variables, so we can test
21287      # for unknown variables in the end.
21288      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21289
21290      # Check if we try to supply an empty value
21291      if test "x$UNZIP" = x; then
21292        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
21293$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
21294        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21295$as_echo_n "checking for UNZIP... " >&6; }
21296        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21297$as_echo "disabled" >&6; }
21298      else
21299        # Check if the provided tool contains a complete path.
21300        tool_specified="$UNZIP"
21301        tool_basename="${tool_specified##*/}"
21302        if test "x$tool_basename" = "x$tool_specified"; then
21303          # A command without a complete path is provided, search $PATH.
21304          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
21305$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
21306          # Extract the first word of "$tool_basename", so it can be a program name with args.
21307set dummy $tool_basename; ac_word=$2
21308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21309$as_echo_n "checking for $ac_word... " >&6; }
21310if ${ac_cv_path_UNZIP+:} false; then :
21311  $as_echo_n "(cached) " >&6
21312else
21313  case $UNZIP in
21314  [\\/]* | ?:[\\/]*)
21315  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21316  ;;
21317  *)
21318  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21319for as_dir in $PATH
21320do
21321  IFS=$as_save_IFS
21322  test -z "$as_dir" && as_dir=.
21323    for ac_exec_ext in '' $ac_executable_extensions; do
21324  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21325    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21326    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21327    break 2
21328  fi
21329done
21330  done
21331IFS=$as_save_IFS
21332
21333  ;;
21334esac
21335fi
21336UNZIP=$ac_cv_path_UNZIP
21337if test -n "$UNZIP"; then
21338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21339$as_echo "$UNZIP" >&6; }
21340else
21341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21342$as_echo "no" >&6; }
21343fi
21344
21345
21346          if test "x$UNZIP" = x; then
21347            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21348          fi
21349        else
21350          # Otherwise we believe it is a complete path. Use it as it is.
21351          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
21352$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
21353          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21354$as_echo_n "checking for UNZIP... " >&6; }
21355          if test ! -x "$tool_specified"; then
21356            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21357$as_echo "not found" >&6; }
21358            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21359          fi
21360          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21361$as_echo "$tool_specified" >&6; }
21362        fi
21363      fi
21364    fi
21365
21366  fi
21367
21368
21369
21370  if test "x$UNZIP" = x; then
21371    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
21372  fi
21373
21374
21375
21376
21377
21378  # Publish this variable in the help.
21379
21380
21381  if [ -z "${ZIP+x}" ]; then
21382    # The variable is not set by user, try to locate tool using the code snippet
21383    for ac_prog in zip
21384do
21385  # Extract the first word of "$ac_prog", so it can be a program name with args.
21386set dummy $ac_prog; ac_word=$2
21387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21388$as_echo_n "checking for $ac_word... " >&6; }
21389if ${ac_cv_path_ZIP+:} false; then :
21390  $as_echo_n "(cached) " >&6
21391else
21392  case $ZIP in
21393  [\\/]* | ?:[\\/]*)
21394  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
21395  ;;
21396  *)
21397  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21398for as_dir in $PATH
21399do
21400  IFS=$as_save_IFS
21401  test -z "$as_dir" && as_dir=.
21402    for ac_exec_ext in '' $ac_executable_extensions; do
21403  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21404    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
21405    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21406    break 2
21407  fi
21408done
21409  done
21410IFS=$as_save_IFS
21411
21412  ;;
21413esac
21414fi
21415ZIP=$ac_cv_path_ZIP
21416if test -n "$ZIP"; then
21417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21418$as_echo "$ZIP" >&6; }
21419else
21420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21421$as_echo "no" >&6; }
21422fi
21423
21424
21425  test -n "$ZIP" && break
21426done
21427
21428  else
21429    # The variable is set, but is it from the command line or the environment?
21430
21431    # Try to remove the string !ZIP! from our list.
21432    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
21433    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21434      # If it failed, the variable was not from the command line. Ignore it,
21435      # but warn the user (except for BASH, which is always set by the calling BASH).
21436      if test "xZIP" != xBASH; then
21437        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
21438$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
21439      fi
21440      # Try to locate tool using the code snippet
21441      for ac_prog in zip
21442do
21443  # Extract the first word of "$ac_prog", so it can be a program name with args.
21444set dummy $ac_prog; ac_word=$2
21445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21446$as_echo_n "checking for $ac_word... " >&6; }
21447if ${ac_cv_path_ZIP+:} false; then :
21448  $as_echo_n "(cached) " >&6
21449else
21450  case $ZIP in
21451  [\\/]* | ?:[\\/]*)
21452  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
21453  ;;
21454  *)
21455  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21456for as_dir in $PATH
21457do
21458  IFS=$as_save_IFS
21459  test -z "$as_dir" && as_dir=.
21460    for ac_exec_ext in '' $ac_executable_extensions; do
21461  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21462    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
21463    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21464    break 2
21465  fi
21466done
21467  done
21468IFS=$as_save_IFS
21469
21470  ;;
21471esac
21472fi
21473ZIP=$ac_cv_path_ZIP
21474if test -n "$ZIP"; then
21475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21476$as_echo "$ZIP" >&6; }
21477else
21478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21479$as_echo "no" >&6; }
21480fi
21481
21482
21483  test -n "$ZIP" && break
21484done
21485
21486    else
21487      # If it succeeded, then it was overridden by the user. We will use it
21488      # for the tool.
21489
21490      # First remove it from the list of overridden variables, so we can test
21491      # for unknown variables in the end.
21492      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21493
21494      # Check if we try to supply an empty value
21495      if test "x$ZIP" = x; then
21496        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIP= (no value)" >&5
21497$as_echo "$as_me: Setting user supplied tool ZIP= (no value)" >&6;}
21498        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
21499$as_echo_n "checking for ZIP... " >&6; }
21500        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21501$as_echo "disabled" >&6; }
21502      else
21503        # Check if the provided tool contains a complete path.
21504        tool_specified="$ZIP"
21505        tool_basename="${tool_specified##*/}"
21506        if test "x$tool_basename" = "x$tool_specified"; then
21507          # A command without a complete path is provided, search $PATH.
21508          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
21509$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
21510          # Extract the first word of "$tool_basename", so it can be a program name with args.
21511set dummy $tool_basename; ac_word=$2
21512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21513$as_echo_n "checking for $ac_word... " >&6; }
21514if ${ac_cv_path_ZIP+:} false; then :
21515  $as_echo_n "(cached) " >&6
21516else
21517  case $ZIP in
21518  [\\/]* | ?:[\\/]*)
21519  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
21520  ;;
21521  *)
21522  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21523for as_dir in $PATH
21524do
21525  IFS=$as_save_IFS
21526  test -z "$as_dir" && as_dir=.
21527    for ac_exec_ext in '' $ac_executable_extensions; do
21528  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21529    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
21530    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21531    break 2
21532  fi
21533done
21534  done
21535IFS=$as_save_IFS
21536
21537  ;;
21538esac
21539fi
21540ZIP=$ac_cv_path_ZIP
21541if test -n "$ZIP"; then
21542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21543$as_echo "$ZIP" >&6; }
21544else
21545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21546$as_echo "no" >&6; }
21547fi
21548
21549
21550          if test "x$ZIP" = x; then
21551            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21552          fi
21553        else
21554          # Otherwise we believe it is a complete path. Use it as it is.
21555          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
21556$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
21557          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
21558$as_echo_n "checking for ZIP... " >&6; }
21559          if test ! -x "$tool_specified"; then
21560            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21561$as_echo "not found" >&6; }
21562            as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21563          fi
21564          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21565$as_echo "$tool_specified" >&6; }
21566        fi
21567      fi
21568    fi
21569
21570  fi
21571
21572
21573
21574  if test "x$ZIP" = x; then
21575    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
21576  fi
21577
21578
21579
21580  # Non-required basic tools
21581
21582
21583
21584  # Publish this variable in the help.
21585
21586
21587  if [ -z "${LDD+x}" ]; then
21588    # The variable is not set by user, try to locate tool using the code snippet
21589    for ac_prog in ldd
21590do
21591  # Extract the first word of "$ac_prog", so it can be a program name with args.
21592set dummy $ac_prog; ac_word=$2
21593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21594$as_echo_n "checking for $ac_word... " >&6; }
21595if ${ac_cv_path_LDD+:} false; then :
21596  $as_echo_n "(cached) " >&6
21597else
21598  case $LDD in
21599  [\\/]* | ?:[\\/]*)
21600  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21601  ;;
21602  *)
21603  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21604for as_dir in $PATH
21605do
21606  IFS=$as_save_IFS
21607  test -z "$as_dir" && as_dir=.
21608    for ac_exec_ext in '' $ac_executable_extensions; do
21609  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21610    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21611    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21612    break 2
21613  fi
21614done
21615  done
21616IFS=$as_save_IFS
21617
21618  ;;
21619esac
21620fi
21621LDD=$ac_cv_path_LDD
21622if test -n "$LDD"; then
21623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21624$as_echo "$LDD" >&6; }
21625else
21626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21627$as_echo "no" >&6; }
21628fi
21629
21630
21631  test -n "$LDD" && break
21632done
21633
21634  else
21635    # The variable is set, but is it from the command line or the environment?
21636
21637    # Try to remove the string !LDD! from our list.
21638    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
21639    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21640      # If it failed, the variable was not from the command line. Ignore it,
21641      # but warn the user (except for BASH, which is always set by the calling BASH).
21642      if test "xLDD" != xBASH; then
21643        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
21644$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
21645      fi
21646      # Try to locate tool using the code snippet
21647      for ac_prog in ldd
21648do
21649  # Extract the first word of "$ac_prog", so it can be a program name with args.
21650set dummy $ac_prog; ac_word=$2
21651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21652$as_echo_n "checking for $ac_word... " >&6; }
21653if ${ac_cv_path_LDD+:} false; then :
21654  $as_echo_n "(cached) " >&6
21655else
21656  case $LDD in
21657  [\\/]* | ?:[\\/]*)
21658  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21659  ;;
21660  *)
21661  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21662for as_dir in $PATH
21663do
21664  IFS=$as_save_IFS
21665  test -z "$as_dir" && as_dir=.
21666    for ac_exec_ext in '' $ac_executable_extensions; do
21667  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21668    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21669    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21670    break 2
21671  fi
21672done
21673  done
21674IFS=$as_save_IFS
21675
21676  ;;
21677esac
21678fi
21679LDD=$ac_cv_path_LDD
21680if test -n "$LDD"; then
21681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21682$as_echo "$LDD" >&6; }
21683else
21684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21685$as_echo "no" >&6; }
21686fi
21687
21688
21689  test -n "$LDD" && break
21690done
21691
21692    else
21693      # If it succeeded, then it was overridden by the user. We will use it
21694      # for the tool.
21695
21696      # First remove it from the list of overridden variables, so we can test
21697      # for unknown variables in the end.
21698      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21699
21700      # Check if we try to supply an empty value
21701      if test "x$LDD" = x; then
21702        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
21703$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
21704        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21705$as_echo_n "checking for LDD... " >&6; }
21706        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21707$as_echo "disabled" >&6; }
21708      else
21709        # Check if the provided tool contains a complete path.
21710        tool_specified="$LDD"
21711        tool_basename="${tool_specified##*/}"
21712        if test "x$tool_basename" = "x$tool_specified"; then
21713          # A command without a complete path is provided, search $PATH.
21714          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
21715$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
21716          # Extract the first word of "$tool_basename", so it can be a program name with args.
21717set dummy $tool_basename; ac_word=$2
21718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21719$as_echo_n "checking for $ac_word... " >&6; }
21720if ${ac_cv_path_LDD+:} false; then :
21721  $as_echo_n "(cached) " >&6
21722else
21723  case $LDD in
21724  [\\/]* | ?:[\\/]*)
21725  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21726  ;;
21727  *)
21728  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21729for as_dir in $PATH
21730do
21731  IFS=$as_save_IFS
21732  test -z "$as_dir" && as_dir=.
21733    for ac_exec_ext in '' $ac_executable_extensions; do
21734  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21735    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21736    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21737    break 2
21738  fi
21739done
21740  done
21741IFS=$as_save_IFS
21742
21743  ;;
21744esac
21745fi
21746LDD=$ac_cv_path_LDD
21747if test -n "$LDD"; then
21748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21749$as_echo "$LDD" >&6; }
21750else
21751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21752$as_echo "no" >&6; }
21753fi
21754
21755
21756          if test "x$LDD" = x; then
21757            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21758          fi
21759        else
21760          # Otherwise we believe it is a complete path. Use it as it is.
21761          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
21762$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
21763          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21764$as_echo_n "checking for LDD... " >&6; }
21765          if test ! -x "$tool_specified"; then
21766            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21767$as_echo "not found" >&6; }
21768            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
21769          fi
21770          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21771$as_echo "$tool_specified" >&6; }
21772        fi
21773      fi
21774    fi
21775
21776  fi
21777
21778
21779  if test "x$LDD" = "x"; then
21780    # List shared lib dependencies is used for
21781    # debug output and checking for forbidden dependencies.
21782    # We can build without it.
21783    LDD="true"
21784  fi
21785
21786
21787  # Publish this variable in the help.
21788
21789
21790  if [ -z "${OTOOL+x}" ]; then
21791    # The variable is not set by user, try to locate tool using the code snippet
21792    for ac_prog in otool
21793do
21794  # Extract the first word of "$ac_prog", so it can be a program name with args.
21795set dummy $ac_prog; ac_word=$2
21796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21797$as_echo_n "checking for $ac_word... " >&6; }
21798if ${ac_cv_path_OTOOL+:} false; then :
21799  $as_echo_n "(cached) " >&6
21800else
21801  case $OTOOL in
21802  [\\/]* | ?:[\\/]*)
21803  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21804  ;;
21805  *)
21806  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21807for as_dir in $PATH
21808do
21809  IFS=$as_save_IFS
21810  test -z "$as_dir" && as_dir=.
21811    for ac_exec_ext in '' $ac_executable_extensions; do
21812  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21813    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21814    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21815    break 2
21816  fi
21817done
21818  done
21819IFS=$as_save_IFS
21820
21821  ;;
21822esac
21823fi
21824OTOOL=$ac_cv_path_OTOOL
21825if test -n "$OTOOL"; then
21826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21827$as_echo "$OTOOL" >&6; }
21828else
21829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21830$as_echo "no" >&6; }
21831fi
21832
21833
21834  test -n "$OTOOL" && break
21835done
21836
21837  else
21838    # The variable is set, but is it from the command line or the environment?
21839
21840    # Try to remove the string !OTOOL! from our list.
21841    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
21842    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21843      # If it failed, the variable was not from the command line. Ignore it,
21844      # but warn the user (except for BASH, which is always set by the calling BASH).
21845      if test "xOTOOL" != xBASH; then
21846        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
21847$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
21848      fi
21849      # Try to locate tool using the code snippet
21850      for ac_prog in otool
21851do
21852  # Extract the first word of "$ac_prog", so it can be a program name with args.
21853set dummy $ac_prog; ac_word=$2
21854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21855$as_echo_n "checking for $ac_word... " >&6; }
21856if ${ac_cv_path_OTOOL+:} false; then :
21857  $as_echo_n "(cached) " >&6
21858else
21859  case $OTOOL in
21860  [\\/]* | ?:[\\/]*)
21861  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21862  ;;
21863  *)
21864  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21865for as_dir in $PATH
21866do
21867  IFS=$as_save_IFS
21868  test -z "$as_dir" && as_dir=.
21869    for ac_exec_ext in '' $ac_executable_extensions; do
21870  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21871    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21872    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21873    break 2
21874  fi
21875done
21876  done
21877IFS=$as_save_IFS
21878
21879  ;;
21880esac
21881fi
21882OTOOL=$ac_cv_path_OTOOL
21883if test -n "$OTOOL"; then
21884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21885$as_echo "$OTOOL" >&6; }
21886else
21887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21888$as_echo "no" >&6; }
21889fi
21890
21891
21892  test -n "$OTOOL" && break
21893done
21894
21895    else
21896      # If it succeeded, then it was overridden by the user. We will use it
21897      # for the tool.
21898
21899      # First remove it from the list of overridden variables, so we can test
21900      # for unknown variables in the end.
21901      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21902
21903      # Check if we try to supply an empty value
21904      if test "x$OTOOL" = x; then
21905        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
21906$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
21907        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21908$as_echo_n "checking for OTOOL... " >&6; }
21909        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21910$as_echo "disabled" >&6; }
21911      else
21912        # Check if the provided tool contains a complete path.
21913        tool_specified="$OTOOL"
21914        tool_basename="${tool_specified##*/}"
21915        if test "x$tool_basename" = "x$tool_specified"; then
21916          # A command without a complete path is provided, search $PATH.
21917          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
21918$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
21919          # Extract the first word of "$tool_basename", so it can be a program name with args.
21920set dummy $tool_basename; ac_word=$2
21921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21922$as_echo_n "checking for $ac_word... " >&6; }
21923if ${ac_cv_path_OTOOL+:} false; then :
21924  $as_echo_n "(cached) " >&6
21925else
21926  case $OTOOL in
21927  [\\/]* | ?:[\\/]*)
21928  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21929  ;;
21930  *)
21931  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21932for as_dir in $PATH
21933do
21934  IFS=$as_save_IFS
21935  test -z "$as_dir" && as_dir=.
21936    for ac_exec_ext in '' $ac_executable_extensions; do
21937  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21938    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21939    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21940    break 2
21941  fi
21942done
21943  done
21944IFS=$as_save_IFS
21945
21946  ;;
21947esac
21948fi
21949OTOOL=$ac_cv_path_OTOOL
21950if test -n "$OTOOL"; then
21951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21952$as_echo "$OTOOL" >&6; }
21953else
21954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21955$as_echo "no" >&6; }
21956fi
21957
21958
21959          if test "x$OTOOL" = x; then
21960            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21961          fi
21962        else
21963          # Otherwise we believe it is a complete path. Use it as it is.
21964          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
21965$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
21966          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21967$as_echo_n "checking for OTOOL... " >&6; }
21968          if test ! -x "$tool_specified"; then
21969            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21970$as_echo "not found" >&6; }
21971            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
21972          fi
21973          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21974$as_echo "$tool_specified" >&6; }
21975        fi
21976      fi
21977    fi
21978
21979  fi
21980
21981
21982  if test "x$OTOOL" = "x"; then
21983    OTOOL="true"
21984  fi
21985
21986
21987  # Publish this variable in the help.
21988
21989
21990  if [ -z "${READELF+x}" ]; then
21991    # The variable is not set by user, try to locate tool using the code snippet
21992    for ac_prog in greadelf readelf
21993do
21994  # Extract the first word of "$ac_prog", so it can be a program name with args.
21995set dummy $ac_prog; ac_word=$2
21996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21997$as_echo_n "checking for $ac_word... " >&6; }
21998if ${ac_cv_path_READELF+:} false; then :
21999  $as_echo_n "(cached) " >&6
22000else
22001  case $READELF in
22002  [\\/]* | ?:[\\/]*)
22003  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22004  ;;
22005  *)
22006  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22007for as_dir in $PATH
22008do
22009  IFS=$as_save_IFS
22010  test -z "$as_dir" && as_dir=.
22011    for ac_exec_ext in '' $ac_executable_extensions; do
22012  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22013    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22014    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22015    break 2
22016  fi
22017done
22018  done
22019IFS=$as_save_IFS
22020
22021  ;;
22022esac
22023fi
22024READELF=$ac_cv_path_READELF
22025if test -n "$READELF"; then
22026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22027$as_echo "$READELF" >&6; }
22028else
22029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22030$as_echo "no" >&6; }
22031fi
22032
22033
22034  test -n "$READELF" && break
22035done
22036
22037  else
22038    # The variable is set, but is it from the command line or the environment?
22039
22040    # Try to remove the string !READELF! from our list.
22041    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
22042    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22043      # If it failed, the variable was not from the command line. Ignore it,
22044      # but warn the user (except for BASH, which is always set by the calling BASH).
22045      if test "xREADELF" != xBASH; then
22046        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
22047$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
22048      fi
22049      # Try to locate tool using the code snippet
22050      for ac_prog in greadelf readelf
22051do
22052  # Extract the first word of "$ac_prog", so it can be a program name with args.
22053set dummy $ac_prog; ac_word=$2
22054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22055$as_echo_n "checking for $ac_word... " >&6; }
22056if ${ac_cv_path_READELF+:} false; then :
22057  $as_echo_n "(cached) " >&6
22058else
22059  case $READELF in
22060  [\\/]* | ?:[\\/]*)
22061  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22062  ;;
22063  *)
22064  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22065for as_dir in $PATH
22066do
22067  IFS=$as_save_IFS
22068  test -z "$as_dir" && as_dir=.
22069    for ac_exec_ext in '' $ac_executable_extensions; do
22070  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22071    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22072    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22073    break 2
22074  fi
22075done
22076  done
22077IFS=$as_save_IFS
22078
22079  ;;
22080esac
22081fi
22082READELF=$ac_cv_path_READELF
22083if test -n "$READELF"; then
22084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22085$as_echo "$READELF" >&6; }
22086else
22087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22088$as_echo "no" >&6; }
22089fi
22090
22091
22092  test -n "$READELF" && break
22093done
22094
22095    else
22096      # If it succeeded, then it was overridden by the user. We will use it
22097      # for the tool.
22098
22099      # First remove it from the list of overridden variables, so we can test
22100      # for unknown variables in the end.
22101      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22102
22103      # Check if we try to supply an empty value
22104      if test "x$READELF" = x; then
22105        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
22106$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
22107        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22108$as_echo_n "checking for READELF... " >&6; }
22109        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22110$as_echo "disabled" >&6; }
22111      else
22112        # Check if the provided tool contains a complete path.
22113        tool_specified="$READELF"
22114        tool_basename="${tool_specified##*/}"
22115        if test "x$tool_basename" = "x$tool_specified"; then
22116          # A command without a complete path is provided, search $PATH.
22117          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
22118$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
22119          # Extract the first word of "$tool_basename", so it can be a program name with args.
22120set dummy $tool_basename; ac_word=$2
22121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22122$as_echo_n "checking for $ac_word... " >&6; }
22123if ${ac_cv_path_READELF+:} false; then :
22124  $as_echo_n "(cached) " >&6
22125else
22126  case $READELF in
22127  [\\/]* | ?:[\\/]*)
22128  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22129  ;;
22130  *)
22131  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22132for as_dir in $PATH
22133do
22134  IFS=$as_save_IFS
22135  test -z "$as_dir" && as_dir=.
22136    for ac_exec_ext in '' $ac_executable_extensions; do
22137  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22138    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22139    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22140    break 2
22141  fi
22142done
22143  done
22144IFS=$as_save_IFS
22145
22146  ;;
22147esac
22148fi
22149READELF=$ac_cv_path_READELF
22150if test -n "$READELF"; then
22151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22152$as_echo "$READELF" >&6; }
22153else
22154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22155$as_echo "no" >&6; }
22156fi
22157
22158
22159          if test "x$READELF" = x; then
22160            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22161          fi
22162        else
22163          # Otherwise we believe it is a complete path. Use it as it is.
22164          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
22165$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
22166          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22167$as_echo_n "checking for READELF... " >&6; }
22168          if test ! -x "$tool_specified"; then
22169            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22170$as_echo "not found" >&6; }
22171            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
22172          fi
22173          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22174$as_echo "$tool_specified" >&6; }
22175        fi
22176      fi
22177    fi
22178
22179  fi
22180
22181
22182
22183
22184  # Publish this variable in the help.
22185
22186
22187  if [ -z "${HG+x}" ]; then
22188    # The variable is not set by user, try to locate tool using the code snippet
22189    for ac_prog in hg
22190do
22191  # Extract the first word of "$ac_prog", so it can be a program name with args.
22192set dummy $ac_prog; ac_word=$2
22193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22194$as_echo_n "checking for $ac_word... " >&6; }
22195if ${ac_cv_path_HG+:} false; then :
22196  $as_echo_n "(cached) " >&6
22197else
22198  case $HG in
22199  [\\/]* | ?:[\\/]*)
22200  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22201  ;;
22202  *)
22203  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22204for as_dir in $PATH
22205do
22206  IFS=$as_save_IFS
22207  test -z "$as_dir" && as_dir=.
22208    for ac_exec_ext in '' $ac_executable_extensions; do
22209  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22210    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22211    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22212    break 2
22213  fi
22214done
22215  done
22216IFS=$as_save_IFS
22217
22218  ;;
22219esac
22220fi
22221HG=$ac_cv_path_HG
22222if test -n "$HG"; then
22223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22224$as_echo "$HG" >&6; }
22225else
22226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22227$as_echo "no" >&6; }
22228fi
22229
22230
22231  test -n "$HG" && break
22232done
22233
22234  else
22235    # The variable is set, but is it from the command line or the environment?
22236
22237    # Try to remove the string !HG! from our list.
22238    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
22239    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22240      # If it failed, the variable was not from the command line. Ignore it,
22241      # but warn the user (except for BASH, which is always set by the calling BASH).
22242      if test "xHG" != xBASH; then
22243        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
22244$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
22245      fi
22246      # Try to locate tool using the code snippet
22247      for ac_prog in hg
22248do
22249  # Extract the first word of "$ac_prog", so it can be a program name with args.
22250set dummy $ac_prog; ac_word=$2
22251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22252$as_echo_n "checking for $ac_word... " >&6; }
22253if ${ac_cv_path_HG+:} false; then :
22254  $as_echo_n "(cached) " >&6
22255else
22256  case $HG in
22257  [\\/]* | ?:[\\/]*)
22258  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22259  ;;
22260  *)
22261  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22262for as_dir in $PATH
22263do
22264  IFS=$as_save_IFS
22265  test -z "$as_dir" && as_dir=.
22266    for ac_exec_ext in '' $ac_executable_extensions; do
22267  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22268    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22269    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22270    break 2
22271  fi
22272done
22273  done
22274IFS=$as_save_IFS
22275
22276  ;;
22277esac
22278fi
22279HG=$ac_cv_path_HG
22280if test -n "$HG"; then
22281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22282$as_echo "$HG" >&6; }
22283else
22284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22285$as_echo "no" >&6; }
22286fi
22287
22288
22289  test -n "$HG" && break
22290done
22291
22292    else
22293      # If it succeeded, then it was overridden by the user. We will use it
22294      # for the tool.
22295
22296      # First remove it from the list of overridden variables, so we can test
22297      # for unknown variables in the end.
22298      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22299
22300      # Check if we try to supply an empty value
22301      if test "x$HG" = x; then
22302        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
22303$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
22304        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22305$as_echo_n "checking for HG... " >&6; }
22306        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22307$as_echo "disabled" >&6; }
22308      else
22309        # Check if the provided tool contains a complete path.
22310        tool_specified="$HG"
22311        tool_basename="${tool_specified##*/}"
22312        if test "x$tool_basename" = "x$tool_specified"; then
22313          # A command without a complete path is provided, search $PATH.
22314          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
22315$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
22316          # Extract the first word of "$tool_basename", so it can be a program name with args.
22317set dummy $tool_basename; ac_word=$2
22318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22319$as_echo_n "checking for $ac_word... " >&6; }
22320if ${ac_cv_path_HG+:} false; then :
22321  $as_echo_n "(cached) " >&6
22322else
22323  case $HG in
22324  [\\/]* | ?:[\\/]*)
22325  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22326  ;;
22327  *)
22328  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22329for as_dir in $PATH
22330do
22331  IFS=$as_save_IFS
22332  test -z "$as_dir" && as_dir=.
22333    for ac_exec_ext in '' $ac_executable_extensions; do
22334  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22335    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22336    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22337    break 2
22338  fi
22339done
22340  done
22341IFS=$as_save_IFS
22342
22343  ;;
22344esac
22345fi
22346HG=$ac_cv_path_HG
22347if test -n "$HG"; then
22348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22349$as_echo "$HG" >&6; }
22350else
22351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22352$as_echo "no" >&6; }
22353fi
22354
22355
22356          if test "x$HG" = x; then
22357            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22358          fi
22359        else
22360          # Otherwise we believe it is a complete path. Use it as it is.
22361          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
22362$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
22363          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22364$as_echo_n "checking for HG... " >&6; }
22365          if test ! -x "$tool_specified"; then
22366            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22367$as_echo "not found" >&6; }
22368            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
22369          fi
22370          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22371$as_echo "$tool_specified" >&6; }
22372        fi
22373      fi
22374    fi
22375
22376  fi
22377
22378
22379
22380
22381  # Publish this variable in the help.
22382
22383
22384  if [ -z "${STAT+x}" ]; then
22385    # The variable is not set by user, try to locate tool using the code snippet
22386    for ac_prog in stat
22387do
22388  # Extract the first word of "$ac_prog", so it can be a program name with args.
22389set dummy $ac_prog; ac_word=$2
22390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22391$as_echo_n "checking for $ac_word... " >&6; }
22392if ${ac_cv_path_STAT+:} false; then :
22393  $as_echo_n "(cached) " >&6
22394else
22395  case $STAT in
22396  [\\/]* | ?:[\\/]*)
22397  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22398  ;;
22399  *)
22400  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22401for as_dir in $PATH
22402do
22403  IFS=$as_save_IFS
22404  test -z "$as_dir" && as_dir=.
22405    for ac_exec_ext in '' $ac_executable_extensions; do
22406  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22407    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22408    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22409    break 2
22410  fi
22411done
22412  done
22413IFS=$as_save_IFS
22414
22415  ;;
22416esac
22417fi
22418STAT=$ac_cv_path_STAT
22419if test -n "$STAT"; then
22420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22421$as_echo "$STAT" >&6; }
22422else
22423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22424$as_echo "no" >&6; }
22425fi
22426
22427
22428  test -n "$STAT" && break
22429done
22430
22431  else
22432    # The variable is set, but is it from the command line or the environment?
22433
22434    # Try to remove the string !STAT! from our list.
22435    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
22436    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22437      # If it failed, the variable was not from the command line. Ignore it,
22438      # but warn the user (except for BASH, which is always set by the calling BASH).
22439      if test "xSTAT" != xBASH; then
22440        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
22441$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
22442      fi
22443      # Try to locate tool using the code snippet
22444      for ac_prog in stat
22445do
22446  # Extract the first word of "$ac_prog", so it can be a program name with args.
22447set dummy $ac_prog; ac_word=$2
22448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22449$as_echo_n "checking for $ac_word... " >&6; }
22450if ${ac_cv_path_STAT+:} false; then :
22451  $as_echo_n "(cached) " >&6
22452else
22453  case $STAT in
22454  [\\/]* | ?:[\\/]*)
22455  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22456  ;;
22457  *)
22458  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22459for as_dir in $PATH
22460do
22461  IFS=$as_save_IFS
22462  test -z "$as_dir" && as_dir=.
22463    for ac_exec_ext in '' $ac_executable_extensions; do
22464  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22465    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22466    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22467    break 2
22468  fi
22469done
22470  done
22471IFS=$as_save_IFS
22472
22473  ;;
22474esac
22475fi
22476STAT=$ac_cv_path_STAT
22477if test -n "$STAT"; then
22478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22479$as_echo "$STAT" >&6; }
22480else
22481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22482$as_echo "no" >&6; }
22483fi
22484
22485
22486  test -n "$STAT" && break
22487done
22488
22489    else
22490      # If it succeeded, then it was overridden by the user. We will use it
22491      # for the tool.
22492
22493      # First remove it from the list of overridden variables, so we can test
22494      # for unknown variables in the end.
22495      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22496
22497      # Check if we try to supply an empty value
22498      if test "x$STAT" = x; then
22499        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
22500$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
22501        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22502$as_echo_n "checking for STAT... " >&6; }
22503        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22504$as_echo "disabled" >&6; }
22505      else
22506        # Check if the provided tool contains a complete path.
22507        tool_specified="$STAT"
22508        tool_basename="${tool_specified##*/}"
22509        if test "x$tool_basename" = "x$tool_specified"; then
22510          # A command without a complete path is provided, search $PATH.
22511          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
22512$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
22513          # Extract the first word of "$tool_basename", so it can be a program name with args.
22514set dummy $tool_basename; ac_word=$2
22515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22516$as_echo_n "checking for $ac_word... " >&6; }
22517if ${ac_cv_path_STAT+:} false; then :
22518  $as_echo_n "(cached) " >&6
22519else
22520  case $STAT in
22521  [\\/]* | ?:[\\/]*)
22522  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22523  ;;
22524  *)
22525  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22526for as_dir in $PATH
22527do
22528  IFS=$as_save_IFS
22529  test -z "$as_dir" && as_dir=.
22530    for ac_exec_ext in '' $ac_executable_extensions; do
22531  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22532    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22533    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22534    break 2
22535  fi
22536done
22537  done
22538IFS=$as_save_IFS
22539
22540  ;;
22541esac
22542fi
22543STAT=$ac_cv_path_STAT
22544if test -n "$STAT"; then
22545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22546$as_echo "$STAT" >&6; }
22547else
22548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22549$as_echo "no" >&6; }
22550fi
22551
22552
22553          if test "x$STAT" = x; then
22554            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22555          fi
22556        else
22557          # Otherwise we believe it is a complete path. Use it as it is.
22558          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
22559$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
22560          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22561$as_echo_n "checking for STAT... " >&6; }
22562          if test ! -x "$tool_specified"; then
22563            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22564$as_echo "not found" >&6; }
22565            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
22566          fi
22567          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22568$as_echo "$tool_specified" >&6; }
22569        fi
22570      fi
22571    fi
22572
22573  fi
22574
22575
22576
22577
22578  # Publish this variable in the help.
22579
22580
22581  if [ -z "${TIME+x}" ]; then
22582    # The variable is not set by user, try to locate tool using the code snippet
22583    for ac_prog in time
22584do
22585  # Extract the first word of "$ac_prog", so it can be a program name with args.
22586set dummy $ac_prog; ac_word=$2
22587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22588$as_echo_n "checking for $ac_word... " >&6; }
22589if ${ac_cv_path_TIME+:} false; then :
22590  $as_echo_n "(cached) " >&6
22591else
22592  case $TIME in
22593  [\\/]* | ?:[\\/]*)
22594  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22595  ;;
22596  *)
22597  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22598for as_dir in $PATH
22599do
22600  IFS=$as_save_IFS
22601  test -z "$as_dir" && as_dir=.
22602    for ac_exec_ext in '' $ac_executable_extensions; do
22603  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22604    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22605    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22606    break 2
22607  fi
22608done
22609  done
22610IFS=$as_save_IFS
22611
22612  ;;
22613esac
22614fi
22615TIME=$ac_cv_path_TIME
22616if test -n "$TIME"; then
22617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22618$as_echo "$TIME" >&6; }
22619else
22620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22621$as_echo "no" >&6; }
22622fi
22623
22624
22625  test -n "$TIME" && break
22626done
22627
22628  else
22629    # The variable is set, but is it from the command line or the environment?
22630
22631    # Try to remove the string !TIME! from our list.
22632    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
22633    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22634      # If it failed, the variable was not from the command line. Ignore it,
22635      # but warn the user (except for BASH, which is always set by the calling BASH).
22636      if test "xTIME" != xBASH; then
22637        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
22638$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
22639      fi
22640      # Try to locate tool using the code snippet
22641      for ac_prog in time
22642do
22643  # Extract the first word of "$ac_prog", so it can be a program name with args.
22644set dummy $ac_prog; ac_word=$2
22645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22646$as_echo_n "checking for $ac_word... " >&6; }
22647if ${ac_cv_path_TIME+:} false; then :
22648  $as_echo_n "(cached) " >&6
22649else
22650  case $TIME in
22651  [\\/]* | ?:[\\/]*)
22652  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22653  ;;
22654  *)
22655  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22656for as_dir in $PATH
22657do
22658  IFS=$as_save_IFS
22659  test -z "$as_dir" && as_dir=.
22660    for ac_exec_ext in '' $ac_executable_extensions; do
22661  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22662    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22663    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22664    break 2
22665  fi
22666done
22667  done
22668IFS=$as_save_IFS
22669
22670  ;;
22671esac
22672fi
22673TIME=$ac_cv_path_TIME
22674if test -n "$TIME"; then
22675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22676$as_echo "$TIME" >&6; }
22677else
22678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22679$as_echo "no" >&6; }
22680fi
22681
22682
22683  test -n "$TIME" && break
22684done
22685
22686    else
22687      # If it succeeded, then it was overridden by the user. We will use it
22688      # for the tool.
22689
22690      # First remove it from the list of overridden variables, so we can test
22691      # for unknown variables in the end.
22692      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22693
22694      # Check if we try to supply an empty value
22695      if test "x$TIME" = x; then
22696        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
22697$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
22698        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22699$as_echo_n "checking for TIME... " >&6; }
22700        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22701$as_echo "disabled" >&6; }
22702      else
22703        # Check if the provided tool contains a complete path.
22704        tool_specified="$TIME"
22705        tool_basename="${tool_specified##*/}"
22706        if test "x$tool_basename" = "x$tool_specified"; then
22707          # A command without a complete path is provided, search $PATH.
22708          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
22709$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
22710          # Extract the first word of "$tool_basename", so it can be a program name with args.
22711set dummy $tool_basename; ac_word=$2
22712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22713$as_echo_n "checking for $ac_word... " >&6; }
22714if ${ac_cv_path_TIME+:} false; then :
22715  $as_echo_n "(cached) " >&6
22716else
22717  case $TIME in
22718  [\\/]* | ?:[\\/]*)
22719  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22720  ;;
22721  *)
22722  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22723for as_dir in $PATH
22724do
22725  IFS=$as_save_IFS
22726  test -z "$as_dir" && as_dir=.
22727    for ac_exec_ext in '' $ac_executable_extensions; do
22728  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22729    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22730    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22731    break 2
22732  fi
22733done
22734  done
22735IFS=$as_save_IFS
22736
22737  ;;
22738esac
22739fi
22740TIME=$ac_cv_path_TIME
22741if test -n "$TIME"; then
22742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22743$as_echo "$TIME" >&6; }
22744else
22745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22746$as_echo "no" >&6; }
22747fi
22748
22749
22750          if test "x$TIME" = x; then
22751            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22752          fi
22753        else
22754          # Otherwise we believe it is a complete path. Use it as it is.
22755          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
22756$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
22757          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22758$as_echo_n "checking for TIME... " >&6; }
22759          if test ! -x "$tool_specified"; then
22760            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22761$as_echo "not found" >&6; }
22762            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
22763          fi
22764          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22765$as_echo "$tool_specified" >&6; }
22766        fi
22767      fi
22768    fi
22769
22770  fi
22771
22772
22773
22774
22775  # Publish this variable in the help.
22776
22777
22778  if [ -z "${DTRACE+x}" ]; then
22779    # The variable is not set by user, try to locate tool using the code snippet
22780    for ac_prog in dtrace
22781do
22782  # Extract the first word of "$ac_prog", so it can be a program name with args.
22783set dummy $ac_prog; ac_word=$2
22784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22785$as_echo_n "checking for $ac_word... " >&6; }
22786if ${ac_cv_path_DTRACE+:} false; then :
22787  $as_echo_n "(cached) " >&6
22788else
22789  case $DTRACE in
22790  [\\/]* | ?:[\\/]*)
22791  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22792  ;;
22793  *)
22794  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22795for as_dir in $PATH
22796do
22797  IFS=$as_save_IFS
22798  test -z "$as_dir" && as_dir=.
22799    for ac_exec_ext in '' $ac_executable_extensions; do
22800  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22801    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22802    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22803    break 2
22804  fi
22805done
22806  done
22807IFS=$as_save_IFS
22808
22809  ;;
22810esac
22811fi
22812DTRACE=$ac_cv_path_DTRACE
22813if test -n "$DTRACE"; then
22814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22815$as_echo "$DTRACE" >&6; }
22816else
22817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22818$as_echo "no" >&6; }
22819fi
22820
22821
22822  test -n "$DTRACE" && break
22823done
22824
22825  else
22826    # The variable is set, but is it from the command line or the environment?
22827
22828    # Try to remove the string !DTRACE! from our list.
22829    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
22830    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22831      # If it failed, the variable was not from the command line. Ignore it,
22832      # but warn the user (except for BASH, which is always set by the calling BASH).
22833      if test "xDTRACE" != xBASH; then
22834        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
22835$as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
22836      fi
22837      # Try to locate tool using the code snippet
22838      for ac_prog in dtrace
22839do
22840  # Extract the first word of "$ac_prog", so it can be a program name with args.
22841set dummy $ac_prog; ac_word=$2
22842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22843$as_echo_n "checking for $ac_word... " >&6; }
22844if ${ac_cv_path_DTRACE+:} false; then :
22845  $as_echo_n "(cached) " >&6
22846else
22847  case $DTRACE in
22848  [\\/]* | ?:[\\/]*)
22849  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22850  ;;
22851  *)
22852  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22853for as_dir in $PATH
22854do
22855  IFS=$as_save_IFS
22856  test -z "$as_dir" && as_dir=.
22857    for ac_exec_ext in '' $ac_executable_extensions; do
22858  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22859    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22860    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22861    break 2
22862  fi
22863done
22864  done
22865IFS=$as_save_IFS
22866
22867  ;;
22868esac
22869fi
22870DTRACE=$ac_cv_path_DTRACE
22871if test -n "$DTRACE"; then
22872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22873$as_echo "$DTRACE" >&6; }
22874else
22875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22876$as_echo "no" >&6; }
22877fi
22878
22879
22880  test -n "$DTRACE" && break
22881done
22882
22883    else
22884      # If it succeeded, then it was overridden by the user. We will use it
22885      # for the tool.
22886
22887      # First remove it from the list of overridden variables, so we can test
22888      # for unknown variables in the end.
22889      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22890
22891      # Check if we try to supply an empty value
22892      if test "x$DTRACE" = x; then
22893        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
22894$as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
22895        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22896$as_echo_n "checking for DTRACE... " >&6; }
22897        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22898$as_echo "disabled" >&6; }
22899      else
22900        # Check if the provided tool contains a complete path.
22901        tool_specified="$DTRACE"
22902        tool_basename="${tool_specified##*/}"
22903        if test "x$tool_basename" = "x$tool_specified"; then
22904          # A command without a complete path is provided, search $PATH.
22905          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
22906$as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
22907          # Extract the first word of "$tool_basename", so it can be a program name with args.
22908set dummy $tool_basename; ac_word=$2
22909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22910$as_echo_n "checking for $ac_word... " >&6; }
22911if ${ac_cv_path_DTRACE+:} false; then :
22912  $as_echo_n "(cached) " >&6
22913else
22914  case $DTRACE in
22915  [\\/]* | ?:[\\/]*)
22916  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22917  ;;
22918  *)
22919  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22920for as_dir in $PATH
22921do
22922  IFS=$as_save_IFS
22923  test -z "$as_dir" && as_dir=.
22924    for ac_exec_ext in '' $ac_executable_extensions; do
22925  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22926    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22927    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22928    break 2
22929  fi
22930done
22931  done
22932IFS=$as_save_IFS
22933
22934  ;;
22935esac
22936fi
22937DTRACE=$ac_cv_path_DTRACE
22938if test -n "$DTRACE"; then
22939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22940$as_echo "$DTRACE" >&6; }
22941else
22942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22943$as_echo "no" >&6; }
22944fi
22945
22946
22947          if test "x$DTRACE" = x; then
22948            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22949          fi
22950        else
22951          # Otherwise we believe it is a complete path. Use it as it is.
22952          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
22953$as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
22954          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22955$as_echo_n "checking for DTRACE... " >&6; }
22956          if test ! -x "$tool_specified"; then
22957            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22958$as_echo "not found" >&6; }
22959            as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
22960          fi
22961          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22962$as_echo "$tool_specified" >&6; }
22963        fi
22964      fi
22965    fi
22966
22967  fi
22968
22969
22970
22971
22972  # Publish this variable in the help.
22973
22974
22975  if [ -z "${PATCH+x}" ]; then
22976    # The variable is not set by user, try to locate tool using the code snippet
22977    for ac_prog in gpatch patch
22978do
22979  # Extract the first word of "$ac_prog", so it can be a program name with args.
22980set dummy $ac_prog; ac_word=$2
22981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22982$as_echo_n "checking for $ac_word... " >&6; }
22983if ${ac_cv_path_PATCH+:} false; then :
22984  $as_echo_n "(cached) " >&6
22985else
22986  case $PATCH in
22987  [\\/]* | ?:[\\/]*)
22988  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22989  ;;
22990  *)
22991  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22992for as_dir in $PATH
22993do
22994  IFS=$as_save_IFS
22995  test -z "$as_dir" && as_dir=.
22996    for ac_exec_ext in '' $ac_executable_extensions; do
22997  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22998    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22999    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23000    break 2
23001  fi
23002done
23003  done
23004IFS=$as_save_IFS
23005
23006  ;;
23007esac
23008fi
23009PATCH=$ac_cv_path_PATCH
23010if test -n "$PATCH"; then
23011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23012$as_echo "$PATCH" >&6; }
23013else
23014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23015$as_echo "no" >&6; }
23016fi
23017
23018
23019  test -n "$PATCH" && break
23020done
23021
23022  else
23023    # The variable is set, but is it from the command line or the environment?
23024
23025    # Try to remove the string !PATCH! from our list.
23026    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
23027    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23028      # If it failed, the variable was not from the command line. Ignore it,
23029      # but warn the user (except for BASH, which is always set by the calling BASH).
23030      if test "xPATCH" != xBASH; then
23031        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
23032$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
23033      fi
23034      # Try to locate tool using the code snippet
23035      for ac_prog in gpatch patch
23036do
23037  # Extract the first word of "$ac_prog", so it can be a program name with args.
23038set dummy $ac_prog; ac_word=$2
23039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23040$as_echo_n "checking for $ac_word... " >&6; }
23041if ${ac_cv_path_PATCH+:} false; then :
23042  $as_echo_n "(cached) " >&6
23043else
23044  case $PATCH in
23045  [\\/]* | ?:[\\/]*)
23046  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23047  ;;
23048  *)
23049  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23050for as_dir in $PATH
23051do
23052  IFS=$as_save_IFS
23053  test -z "$as_dir" && as_dir=.
23054    for ac_exec_ext in '' $ac_executable_extensions; do
23055  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23056    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23057    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23058    break 2
23059  fi
23060done
23061  done
23062IFS=$as_save_IFS
23063
23064  ;;
23065esac
23066fi
23067PATCH=$ac_cv_path_PATCH
23068if test -n "$PATCH"; then
23069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23070$as_echo "$PATCH" >&6; }
23071else
23072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23073$as_echo "no" >&6; }
23074fi
23075
23076
23077  test -n "$PATCH" && break
23078done
23079
23080    else
23081      # If it succeeded, then it was overridden by the user. We will use it
23082      # for the tool.
23083
23084      # First remove it from the list of overridden variables, so we can test
23085      # for unknown variables in the end.
23086      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23087
23088      # Check if we try to supply an empty value
23089      if test "x$PATCH" = x; then
23090        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
23091$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
23092        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23093$as_echo_n "checking for PATCH... " >&6; }
23094        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23095$as_echo "disabled" >&6; }
23096      else
23097        # Check if the provided tool contains a complete path.
23098        tool_specified="$PATCH"
23099        tool_basename="${tool_specified##*/}"
23100        if test "x$tool_basename" = "x$tool_specified"; then
23101          # A command without a complete path is provided, search $PATH.
23102          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
23103$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
23104          # Extract the first word of "$tool_basename", so it can be a program name with args.
23105set dummy $tool_basename; ac_word=$2
23106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23107$as_echo_n "checking for $ac_word... " >&6; }
23108if ${ac_cv_path_PATCH+:} false; then :
23109  $as_echo_n "(cached) " >&6
23110else
23111  case $PATCH in
23112  [\\/]* | ?:[\\/]*)
23113  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23114  ;;
23115  *)
23116  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23117for as_dir in $PATH
23118do
23119  IFS=$as_save_IFS
23120  test -z "$as_dir" && as_dir=.
23121    for ac_exec_ext in '' $ac_executable_extensions; do
23122  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23123    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23124    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23125    break 2
23126  fi
23127done
23128  done
23129IFS=$as_save_IFS
23130
23131  ;;
23132esac
23133fi
23134PATCH=$ac_cv_path_PATCH
23135if test -n "$PATCH"; then
23136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23137$as_echo "$PATCH" >&6; }
23138else
23139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23140$as_echo "no" >&6; }
23141fi
23142
23143
23144          if test "x$PATCH" = x; then
23145            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23146          fi
23147        else
23148          # Otherwise we believe it is a complete path. Use it as it is.
23149          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
23150$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
23151          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23152$as_echo_n "checking for PATCH... " >&6; }
23153          if test ! -x "$tool_specified"; then
23154            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23155$as_echo "not found" >&6; }
23156            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
23157          fi
23158          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23159$as_echo "$tool_specified" >&6; }
23160        fi
23161      fi
23162    fi
23163
23164  fi
23165
23166
23167  # Check if it's GNU time
23168  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
23169  if test "x$IS_GNU_TIME" != x; then
23170    IS_GNU_TIME=yes
23171  else
23172    IS_GNU_TIME=no
23173  fi
23174
23175
23176  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
23177
23178
23179
23180  # Publish this variable in the help.
23181
23182
23183  if [ -z "${DSYMUTIL+x}" ]; then
23184    # The variable is not set by user, try to locate tool using the code snippet
23185    for ac_prog in dsymutil
23186do
23187  # Extract the first word of "$ac_prog", so it can be a program name with args.
23188set dummy $ac_prog; ac_word=$2
23189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23190$as_echo_n "checking for $ac_word... " >&6; }
23191if ${ac_cv_path_DSYMUTIL+:} false; then :
23192  $as_echo_n "(cached) " >&6
23193else
23194  case $DSYMUTIL in
23195  [\\/]* | ?:[\\/]*)
23196  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23197  ;;
23198  *)
23199  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23200for as_dir in $PATH
23201do
23202  IFS=$as_save_IFS
23203  test -z "$as_dir" && as_dir=.
23204    for ac_exec_ext in '' $ac_executable_extensions; do
23205  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23206    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23207    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23208    break 2
23209  fi
23210done
23211  done
23212IFS=$as_save_IFS
23213
23214  ;;
23215esac
23216fi
23217DSYMUTIL=$ac_cv_path_DSYMUTIL
23218if test -n "$DSYMUTIL"; then
23219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23220$as_echo "$DSYMUTIL" >&6; }
23221else
23222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23223$as_echo "no" >&6; }
23224fi
23225
23226
23227  test -n "$DSYMUTIL" && break
23228done
23229
23230  else
23231    # The variable is set, but is it from the command line or the environment?
23232
23233    # Try to remove the string !DSYMUTIL! from our list.
23234    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
23235    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23236      # If it failed, the variable was not from the command line. Ignore it,
23237      # but warn the user (except for BASH, which is always set by the calling BASH).
23238      if test "xDSYMUTIL" != xBASH; then
23239        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
23240$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
23241      fi
23242      # Try to locate tool using the code snippet
23243      for ac_prog in dsymutil
23244do
23245  # Extract the first word of "$ac_prog", so it can be a program name with args.
23246set dummy $ac_prog; ac_word=$2
23247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23248$as_echo_n "checking for $ac_word... " >&6; }
23249if ${ac_cv_path_DSYMUTIL+:} false; then :
23250  $as_echo_n "(cached) " >&6
23251else
23252  case $DSYMUTIL in
23253  [\\/]* | ?:[\\/]*)
23254  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23255  ;;
23256  *)
23257  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23258for as_dir in $PATH
23259do
23260  IFS=$as_save_IFS
23261  test -z "$as_dir" && as_dir=.
23262    for ac_exec_ext in '' $ac_executable_extensions; do
23263  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23264    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23265    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23266    break 2
23267  fi
23268done
23269  done
23270IFS=$as_save_IFS
23271
23272  ;;
23273esac
23274fi
23275DSYMUTIL=$ac_cv_path_DSYMUTIL
23276if test -n "$DSYMUTIL"; then
23277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23278$as_echo "$DSYMUTIL" >&6; }
23279else
23280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23281$as_echo "no" >&6; }
23282fi
23283
23284
23285  test -n "$DSYMUTIL" && break
23286done
23287
23288    else
23289      # If it succeeded, then it was overridden by the user. We will use it
23290      # for the tool.
23291
23292      # First remove it from the list of overridden variables, so we can test
23293      # for unknown variables in the end.
23294      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23295
23296      # Check if we try to supply an empty value
23297      if test "x$DSYMUTIL" = x; then
23298        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
23299$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
23300        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23301$as_echo_n "checking for DSYMUTIL... " >&6; }
23302        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23303$as_echo "disabled" >&6; }
23304      else
23305        # Check if the provided tool contains a complete path.
23306        tool_specified="$DSYMUTIL"
23307        tool_basename="${tool_specified##*/}"
23308        if test "x$tool_basename" = "x$tool_specified"; then
23309          # A command without a complete path is provided, search $PATH.
23310          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
23311$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
23312          # Extract the first word of "$tool_basename", so it can be a program name with args.
23313set dummy $tool_basename; ac_word=$2
23314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23315$as_echo_n "checking for $ac_word... " >&6; }
23316if ${ac_cv_path_DSYMUTIL+:} false; then :
23317  $as_echo_n "(cached) " >&6
23318else
23319  case $DSYMUTIL in
23320  [\\/]* | ?:[\\/]*)
23321  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23322  ;;
23323  *)
23324  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23325for as_dir in $PATH
23326do
23327  IFS=$as_save_IFS
23328  test -z "$as_dir" && as_dir=.
23329    for ac_exec_ext in '' $ac_executable_extensions; do
23330  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23331    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23332    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23333    break 2
23334  fi
23335done
23336  done
23337IFS=$as_save_IFS
23338
23339  ;;
23340esac
23341fi
23342DSYMUTIL=$ac_cv_path_DSYMUTIL
23343if test -n "$DSYMUTIL"; then
23344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23345$as_echo "$DSYMUTIL" >&6; }
23346else
23347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23348$as_echo "no" >&6; }
23349fi
23350
23351
23352          if test "x$DSYMUTIL" = x; then
23353            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23354          fi
23355        else
23356          # Otherwise we believe it is a complete path. Use it as it is.
23357          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
23358$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
23359          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23360$as_echo_n "checking for DSYMUTIL... " >&6; }
23361          if test ! -x "$tool_specified"; then
23362            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23363$as_echo "not found" >&6; }
23364            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
23365          fi
23366          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23367$as_echo "$tool_specified" >&6; }
23368        fi
23369      fi
23370    fi
23371
23372  fi
23373
23374
23375
23376  if test "x$DSYMUTIL" = x; then
23377    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
23378  fi
23379
23380
23381
23382
23383
23384  # Publish this variable in the help.
23385
23386
23387  if [ -z "${XATTR+x}" ]; then
23388    # The variable is not set by user, try to locate tool using the code snippet
23389    for ac_prog in xattr
23390do
23391  # Extract the first word of "$ac_prog", so it can be a program name with args.
23392set dummy $ac_prog; ac_word=$2
23393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23394$as_echo_n "checking for $ac_word... " >&6; }
23395if ${ac_cv_path_XATTR+:} false; then :
23396  $as_echo_n "(cached) " >&6
23397else
23398  case $XATTR in
23399  [\\/]* | ?:[\\/]*)
23400  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23401  ;;
23402  *)
23403  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23404for as_dir in $PATH
23405do
23406  IFS=$as_save_IFS
23407  test -z "$as_dir" && as_dir=.
23408    for ac_exec_ext in '' $ac_executable_extensions; do
23409  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23410    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23411    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23412    break 2
23413  fi
23414done
23415  done
23416IFS=$as_save_IFS
23417
23418  ;;
23419esac
23420fi
23421XATTR=$ac_cv_path_XATTR
23422if test -n "$XATTR"; then
23423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23424$as_echo "$XATTR" >&6; }
23425else
23426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23427$as_echo "no" >&6; }
23428fi
23429
23430
23431  test -n "$XATTR" && break
23432done
23433
23434  else
23435    # The variable is set, but is it from the command line or the environment?
23436
23437    # Try to remove the string !XATTR! from our list.
23438    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
23439    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23440      # If it failed, the variable was not from the command line. Ignore it,
23441      # but warn the user (except for BASH, which is always set by the calling BASH).
23442      if test "xXATTR" != xBASH; then
23443        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
23444$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
23445      fi
23446      # Try to locate tool using the code snippet
23447      for ac_prog in xattr
23448do
23449  # Extract the first word of "$ac_prog", so it can be a program name with args.
23450set dummy $ac_prog; ac_word=$2
23451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23452$as_echo_n "checking for $ac_word... " >&6; }
23453if ${ac_cv_path_XATTR+:} false; then :
23454  $as_echo_n "(cached) " >&6
23455else
23456  case $XATTR in
23457  [\\/]* | ?:[\\/]*)
23458  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23459  ;;
23460  *)
23461  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23462for as_dir in $PATH
23463do
23464  IFS=$as_save_IFS
23465  test -z "$as_dir" && as_dir=.
23466    for ac_exec_ext in '' $ac_executable_extensions; do
23467  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23468    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23469    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23470    break 2
23471  fi
23472done
23473  done
23474IFS=$as_save_IFS
23475
23476  ;;
23477esac
23478fi
23479XATTR=$ac_cv_path_XATTR
23480if test -n "$XATTR"; then
23481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23482$as_echo "$XATTR" >&6; }
23483else
23484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23485$as_echo "no" >&6; }
23486fi
23487
23488
23489  test -n "$XATTR" && break
23490done
23491
23492    else
23493      # If it succeeded, then it was overridden by the user. We will use it
23494      # for the tool.
23495
23496      # First remove it from the list of overridden variables, so we can test
23497      # for unknown variables in the end.
23498      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23499
23500      # Check if we try to supply an empty value
23501      if test "x$XATTR" = x; then
23502        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
23503$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
23504        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23505$as_echo_n "checking for XATTR... " >&6; }
23506        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23507$as_echo "disabled" >&6; }
23508      else
23509        # Check if the provided tool contains a complete path.
23510        tool_specified="$XATTR"
23511        tool_basename="${tool_specified##*/}"
23512        if test "x$tool_basename" = "x$tool_specified"; then
23513          # A command without a complete path is provided, search $PATH.
23514          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
23515$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
23516          # Extract the first word of "$tool_basename", so it can be a program name with args.
23517set dummy $tool_basename; ac_word=$2
23518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23519$as_echo_n "checking for $ac_word... " >&6; }
23520if ${ac_cv_path_XATTR+:} false; then :
23521  $as_echo_n "(cached) " >&6
23522else
23523  case $XATTR in
23524  [\\/]* | ?:[\\/]*)
23525  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23526  ;;
23527  *)
23528  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23529for as_dir in $PATH
23530do
23531  IFS=$as_save_IFS
23532  test -z "$as_dir" && as_dir=.
23533    for ac_exec_ext in '' $ac_executable_extensions; do
23534  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23535    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23536    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23537    break 2
23538  fi
23539done
23540  done
23541IFS=$as_save_IFS
23542
23543  ;;
23544esac
23545fi
23546XATTR=$ac_cv_path_XATTR
23547if test -n "$XATTR"; then
23548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23549$as_echo "$XATTR" >&6; }
23550else
23551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23552$as_echo "no" >&6; }
23553fi
23554
23555
23556          if test "x$XATTR" = x; then
23557            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23558          fi
23559        else
23560          # Otherwise we believe it is a complete path. Use it as it is.
23561          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
23562$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
23563          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23564$as_echo_n "checking for XATTR... " >&6; }
23565          if test ! -x "$tool_specified"; then
23566            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23567$as_echo "not found" >&6; }
23568            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
23569          fi
23570          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23571$as_echo "$tool_specified" >&6; }
23572        fi
23573      fi
23574    fi
23575
23576  fi
23577
23578
23579
23580  if test "x$XATTR" = x; then
23581    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
23582  fi
23583
23584
23585
23586
23587  # Publish this variable in the help.
23588
23589
23590  if [ -z "${CODESIGN+x}" ]; then
23591    # The variable is not set by user, try to locate tool using the code snippet
23592    for ac_prog in codesign
23593do
23594  # Extract the first word of "$ac_prog", so it can be a program name with args.
23595set dummy $ac_prog; ac_word=$2
23596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23597$as_echo_n "checking for $ac_word... " >&6; }
23598if ${ac_cv_path_CODESIGN+:} false; then :
23599  $as_echo_n "(cached) " >&6
23600else
23601  case $CODESIGN in
23602  [\\/]* | ?:[\\/]*)
23603  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23604  ;;
23605  *)
23606  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23607for as_dir in $PATH
23608do
23609  IFS=$as_save_IFS
23610  test -z "$as_dir" && as_dir=.
23611    for ac_exec_ext in '' $ac_executable_extensions; do
23612  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23613    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23614    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23615    break 2
23616  fi
23617done
23618  done
23619IFS=$as_save_IFS
23620
23621  ;;
23622esac
23623fi
23624CODESIGN=$ac_cv_path_CODESIGN
23625if test -n "$CODESIGN"; then
23626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23627$as_echo "$CODESIGN" >&6; }
23628else
23629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23630$as_echo "no" >&6; }
23631fi
23632
23633
23634  test -n "$CODESIGN" && break
23635done
23636
23637  else
23638    # The variable is set, but is it from the command line or the environment?
23639
23640    # Try to remove the string !CODESIGN! from our list.
23641    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
23642    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23643      # If it failed, the variable was not from the command line. Ignore it,
23644      # but warn the user (except for BASH, which is always set by the calling BASH).
23645      if test "xCODESIGN" != xBASH; then
23646        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
23647$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
23648      fi
23649      # Try to locate tool using the code snippet
23650      for ac_prog in codesign
23651do
23652  # Extract the first word of "$ac_prog", so it can be a program name with args.
23653set dummy $ac_prog; ac_word=$2
23654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23655$as_echo_n "checking for $ac_word... " >&6; }
23656if ${ac_cv_path_CODESIGN+:} false; then :
23657  $as_echo_n "(cached) " >&6
23658else
23659  case $CODESIGN in
23660  [\\/]* | ?:[\\/]*)
23661  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23662  ;;
23663  *)
23664  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23665for as_dir in $PATH
23666do
23667  IFS=$as_save_IFS
23668  test -z "$as_dir" && as_dir=.
23669    for ac_exec_ext in '' $ac_executable_extensions; do
23670  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23671    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23672    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23673    break 2
23674  fi
23675done
23676  done
23677IFS=$as_save_IFS
23678
23679  ;;
23680esac
23681fi
23682CODESIGN=$ac_cv_path_CODESIGN
23683if test -n "$CODESIGN"; then
23684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23685$as_echo "$CODESIGN" >&6; }
23686else
23687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23688$as_echo "no" >&6; }
23689fi
23690
23691
23692  test -n "$CODESIGN" && break
23693done
23694
23695    else
23696      # If it succeeded, then it was overridden by the user. We will use it
23697      # for the tool.
23698
23699      # First remove it from the list of overridden variables, so we can test
23700      # for unknown variables in the end.
23701      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23702
23703      # Check if we try to supply an empty value
23704      if test "x$CODESIGN" = x; then
23705        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
23706$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
23707        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23708$as_echo_n "checking for CODESIGN... " >&6; }
23709        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23710$as_echo "disabled" >&6; }
23711      else
23712        # Check if the provided tool contains a complete path.
23713        tool_specified="$CODESIGN"
23714        tool_basename="${tool_specified##*/}"
23715        if test "x$tool_basename" = "x$tool_specified"; then
23716          # A command without a complete path is provided, search $PATH.
23717          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
23718$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
23719          # Extract the first word of "$tool_basename", so it can be a program name with args.
23720set dummy $tool_basename; ac_word=$2
23721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23722$as_echo_n "checking for $ac_word... " >&6; }
23723if ${ac_cv_path_CODESIGN+:} false; then :
23724  $as_echo_n "(cached) " >&6
23725else
23726  case $CODESIGN in
23727  [\\/]* | ?:[\\/]*)
23728  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23729  ;;
23730  *)
23731  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23732for as_dir in $PATH
23733do
23734  IFS=$as_save_IFS
23735  test -z "$as_dir" && as_dir=.
23736    for ac_exec_ext in '' $ac_executable_extensions; do
23737  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23738    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23739    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23740    break 2
23741  fi
23742done
23743  done
23744IFS=$as_save_IFS
23745
23746  ;;
23747esac
23748fi
23749CODESIGN=$ac_cv_path_CODESIGN
23750if test -n "$CODESIGN"; then
23751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23752$as_echo "$CODESIGN" >&6; }
23753else
23754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23755$as_echo "no" >&6; }
23756fi
23757
23758
23759          if test "x$CODESIGN" = x; then
23760            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23761          fi
23762        else
23763          # Otherwise we believe it is a complete path. Use it as it is.
23764          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
23765$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
23766          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23767$as_echo_n "checking for CODESIGN... " >&6; }
23768          if test ! -x "$tool_specified"; then
23769            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23770$as_echo "not found" >&6; }
23771            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
23772          fi
23773          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23774$as_echo "$tool_specified" >&6; }
23775        fi
23776      fi
23777    fi
23778
23779  fi
23780
23781
23782    if test "x$CODESIGN" != "x"; then
23783      # Verify that the openjdk_codesign certificate is present
23784      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
23785$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
23786      $RM codesign-testfile
23787      $TOUCH codesign-testfile
23788      $CODESIGN -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
23789      $RM codesign-testfile
23790      if test "x$CODESIGN" = x; then
23791        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23792$as_echo "no" >&6; }
23793      else
23794        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23795$as_echo "yes" >&6; }
23796      fi
23797    fi
23798
23799
23800
23801  # Publish this variable in the help.
23802
23803
23804  if [ -z "${SETFILE+x}" ]; then
23805    # The variable is not set by user, try to locate tool using the code snippet
23806    for ac_prog in SetFile
23807do
23808  # Extract the first word of "$ac_prog", so it can be a program name with args.
23809set dummy $ac_prog; ac_word=$2
23810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23811$as_echo_n "checking for $ac_word... " >&6; }
23812if ${ac_cv_path_SETFILE+:} false; then :
23813  $as_echo_n "(cached) " >&6
23814else
23815  case $SETFILE in
23816  [\\/]* | ?:[\\/]*)
23817  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23818  ;;
23819  *)
23820  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23821for as_dir in $PATH
23822do
23823  IFS=$as_save_IFS
23824  test -z "$as_dir" && as_dir=.
23825    for ac_exec_ext in '' $ac_executable_extensions; do
23826  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23827    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23828    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23829    break 2
23830  fi
23831done
23832  done
23833IFS=$as_save_IFS
23834
23835  ;;
23836esac
23837fi
23838SETFILE=$ac_cv_path_SETFILE
23839if test -n "$SETFILE"; then
23840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23841$as_echo "$SETFILE" >&6; }
23842else
23843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23844$as_echo "no" >&6; }
23845fi
23846
23847
23848  test -n "$SETFILE" && break
23849done
23850
23851  else
23852    # The variable is set, but is it from the command line or the environment?
23853
23854    # Try to remove the string !SETFILE! from our list.
23855    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
23856    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23857      # If it failed, the variable was not from the command line. Ignore it,
23858      # but warn the user (except for BASH, which is always set by the calling BASH).
23859      if test "xSETFILE" != xBASH; then
23860        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
23861$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
23862      fi
23863      # Try to locate tool using the code snippet
23864      for ac_prog in SetFile
23865do
23866  # Extract the first word of "$ac_prog", so it can be a program name with args.
23867set dummy $ac_prog; ac_word=$2
23868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23869$as_echo_n "checking for $ac_word... " >&6; }
23870if ${ac_cv_path_SETFILE+:} false; then :
23871  $as_echo_n "(cached) " >&6
23872else
23873  case $SETFILE in
23874  [\\/]* | ?:[\\/]*)
23875  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23876  ;;
23877  *)
23878  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23879for as_dir in $PATH
23880do
23881  IFS=$as_save_IFS
23882  test -z "$as_dir" && as_dir=.
23883    for ac_exec_ext in '' $ac_executable_extensions; do
23884  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23885    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23886    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23887    break 2
23888  fi
23889done
23890  done
23891IFS=$as_save_IFS
23892
23893  ;;
23894esac
23895fi
23896SETFILE=$ac_cv_path_SETFILE
23897if test -n "$SETFILE"; then
23898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23899$as_echo "$SETFILE" >&6; }
23900else
23901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23902$as_echo "no" >&6; }
23903fi
23904
23905
23906  test -n "$SETFILE" && break
23907done
23908
23909    else
23910      # If it succeeded, then it was overridden by the user. We will use it
23911      # for the tool.
23912
23913      # First remove it from the list of overridden variables, so we can test
23914      # for unknown variables in the end.
23915      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23916
23917      # Check if we try to supply an empty value
23918      if test "x$SETFILE" = x; then
23919        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
23920$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
23921        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23922$as_echo_n "checking for SETFILE... " >&6; }
23923        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23924$as_echo "disabled" >&6; }
23925      else
23926        # Check if the provided tool contains a complete path.
23927        tool_specified="$SETFILE"
23928        tool_basename="${tool_specified##*/}"
23929        if test "x$tool_basename" = "x$tool_specified"; then
23930          # A command without a complete path is provided, search $PATH.
23931          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
23932$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
23933          # Extract the first word of "$tool_basename", so it can be a program name with args.
23934set dummy $tool_basename; ac_word=$2
23935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23936$as_echo_n "checking for $ac_word... " >&6; }
23937if ${ac_cv_path_SETFILE+:} false; then :
23938  $as_echo_n "(cached) " >&6
23939else
23940  case $SETFILE in
23941  [\\/]* | ?:[\\/]*)
23942  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23943  ;;
23944  *)
23945  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23946for as_dir in $PATH
23947do
23948  IFS=$as_save_IFS
23949  test -z "$as_dir" && as_dir=.
23950    for ac_exec_ext in '' $ac_executable_extensions; do
23951  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23952    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23953    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23954    break 2
23955  fi
23956done
23957  done
23958IFS=$as_save_IFS
23959
23960  ;;
23961esac
23962fi
23963SETFILE=$ac_cv_path_SETFILE
23964if test -n "$SETFILE"; then
23965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23966$as_echo "$SETFILE" >&6; }
23967else
23968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23969$as_echo "no" >&6; }
23970fi
23971
23972
23973          if test "x$SETFILE" = x; then
23974            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23975          fi
23976        else
23977          # Otherwise we believe it is a complete path. Use it as it is.
23978          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
23979$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
23980          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23981$as_echo_n "checking for SETFILE... " >&6; }
23982          if test ! -x "$tool_specified"; then
23983            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23984$as_echo "not found" >&6; }
23985            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
23986          fi
23987          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23988$as_echo "$tool_specified" >&6; }
23989        fi
23990      fi
23991    fi
23992
23993  fi
23994
23995
23996
23997  if test "x$SETFILE" = x; then
23998    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
23999  fi
24000
24001
24002  fi
24003
24004
24005  # Test if bash supports pipefail.
24006  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
24007$as_echo_n "checking if bash supports pipefail... " >&6; }
24008  if ${BASH} -c 'set -o pipefail'; then
24009    BASH_ARGS="$BASH_ARGS -o pipefail"
24010    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24011$as_echo "yes" >&6; }
24012  else
24013    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24014$as_echo "no" >&6; }
24015  fi
24016
24017  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
24018$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
24019  if ${BASH} -e -c 'true'; then
24020    BASH_ARGS="$BASH_ARGS -e"
24021    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24022$as_echo "yes" >&6; }
24023  else
24024    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24025$as_echo "no" >&6; }
24026  fi
24027
24028
24029
24030
24031# Check if pkg-config is available.
24032
24033
24034if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
24035	if test -n "$ac_tool_prefix"; then
24036  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24037set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24039$as_echo_n "checking for $ac_word... " >&6; }
24040if ${ac_cv_path_PKG_CONFIG+:} false; then :
24041  $as_echo_n "(cached) " >&6
24042else
24043  case $PKG_CONFIG in
24044  [\\/]* | ?:[\\/]*)
24045  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
24046  ;;
24047  *)
24048  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24049for as_dir in $PATH
24050do
24051  IFS=$as_save_IFS
24052  test -z "$as_dir" && as_dir=.
24053    for ac_exec_ext in '' $ac_executable_extensions; do
24054  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24055    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24056    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24057    break 2
24058  fi
24059done
24060  done
24061IFS=$as_save_IFS
24062
24063  ;;
24064esac
24065fi
24066PKG_CONFIG=$ac_cv_path_PKG_CONFIG
24067if test -n "$PKG_CONFIG"; then
24068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
24069$as_echo "$PKG_CONFIG" >&6; }
24070else
24071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24072$as_echo "no" >&6; }
24073fi
24074
24075
24076fi
24077if test -z "$ac_cv_path_PKG_CONFIG"; then
24078  ac_pt_PKG_CONFIG=$PKG_CONFIG
24079  # Extract the first word of "pkg-config", so it can be a program name with args.
24080set dummy pkg-config; ac_word=$2
24081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24082$as_echo_n "checking for $ac_word... " >&6; }
24083if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
24084  $as_echo_n "(cached) " >&6
24085else
24086  case $ac_pt_PKG_CONFIG in
24087  [\\/]* | ?:[\\/]*)
24088  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
24089  ;;
24090  *)
24091  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24092for as_dir in $PATH
24093do
24094  IFS=$as_save_IFS
24095  test -z "$as_dir" && as_dir=.
24096    for ac_exec_ext in '' $ac_executable_extensions; do
24097  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24098    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24099    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24100    break 2
24101  fi
24102done
24103  done
24104IFS=$as_save_IFS
24105
24106  ;;
24107esac
24108fi
24109ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
24110if test -n "$ac_pt_PKG_CONFIG"; then
24111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
24112$as_echo "$ac_pt_PKG_CONFIG" >&6; }
24113else
24114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24115$as_echo "no" >&6; }
24116fi
24117
24118  if test "x$ac_pt_PKG_CONFIG" = x; then
24119    PKG_CONFIG=""
24120  else
24121    case $cross_compiling:$ac_tool_warned in
24122yes:)
24123{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24124$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24125ac_tool_warned=yes ;;
24126esac
24127    PKG_CONFIG=$ac_pt_PKG_CONFIG
24128  fi
24129else
24130  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
24131fi
24132
24133fi
24134if test -n "$PKG_CONFIG"; then
24135	_pkg_min_version=0.9.0
24136	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
24137$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
24138	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
24139		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24140$as_echo "yes" >&6; }
24141	else
24142		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24143$as_echo "no" >&6; }
24144		PKG_CONFIG=""
24145	fi
24146
24147fi
24148
24149# After basic tools have been setup, we can check build os specific details.
24150
24151  ###############################################################################
24152
24153  # Note that this is the build platform OS version!
24154
24155  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
24156  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
24157  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
24158  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
24159
24160
24161
24162
24163
24164# Misc basic settings
24165
24166
24167# Check whether --with-default-make-target was given.
24168if test "${with_default_make_target+set}" = set; then :
24169  withval=$with_default_make_target;
24170fi
24171
24172  if test "x$with_default_make_target" = "x" \
24173      || test "x$with_default_make_target" = "xyes"; then
24174    DEFAULT_MAKE_TARGET="exploded-image"
24175  elif test "x$with_default_make_target" = "xno"; then
24176    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
24177  else
24178    DEFAULT_MAKE_TARGET="$with_default_make_target"
24179  fi
24180
24181
24182
24183
24184###############################################################################
24185#
24186# Determine OpenJDK variants, options and version numbers.
24187#
24188###############################################################################
24189
24190# We need build & target for this.
24191
24192  # Should we build a JDK without a graphical UI?
24193  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headless only" >&5
24194$as_echo_n "checking headless only... " >&6; }
24195  # Check whether --enable-headless-only was given.
24196if test "${enable_headless_only+set}" = set; then :
24197  enableval=$enable_headless_only;
24198fi
24199
24200
24201  if test "x$enable_headless_only" = "xyes"; then
24202    ENABLE_HEADLESS_ONLY="true"
24203    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24204$as_echo "yes" >&6; }
24205  elif test "x$enable_headless_only" = "xno"; then
24206    ENABLE_HEADLESS_ONLY="false"
24207    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24208$as_echo "no" >&6; }
24209  elif test "x$enable_headless_only" = "x"; then
24210    ENABLE_HEADLESS_ONLY="false"
24211    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24212$as_echo "no" >&6; }
24213  else
24214    as_fn_error $? "--enable-headless-only can only take yes or no" "$LINENO" 5
24215  fi
24216
24217
24218
24219  # Choose cacerts source file
24220
24221# Check whether --with-cacerts-file was given.
24222if test "${with_cacerts_file+set}" = set; then :
24223  withval=$with_cacerts_file;
24224fi
24225
24226  if test "x$with_cacerts_file" != x; then
24227    CACERTS_FILE=$with_cacerts_file
24228  fi
24229
24230
24231  # Enable or disable unlimited crypto
24232  # Check whether --enable-unlimited-crypto was given.
24233if test "${enable_unlimited_crypto+set}" = set; then :
24234  enableval=$enable_unlimited_crypto;
24235else
24236  enable_unlimited_crypto=no
24237fi
24238
24239  if test "x$enable_unlimited_crypto" = "xyes"; then
24240    UNLIMITED_CRYPTO=true
24241  else
24242    UNLIMITED_CRYPTO=false
24243  fi
24244
24245
24246  # Should we build the serviceability agent (SA)?
24247  INCLUDE_SA=true
24248  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
24249    INCLUDE_SA=false
24250  fi
24251  if test "x$OPENJDK_TARGET_OS" = xaix ; then
24252    INCLUDE_SA=false
24253  fi
24254
24255
24256  # Compress jars
24257  COMPRESS_JARS=false
24258
24259
24260
24261  # Setup default copyright year. Mostly overridden when building close to a new year.
24262
24263# Check whether --with-copyright-year was given.
24264if test "${with_copyright_year+set}" = set; then :
24265  withval=$with_copyright_year;
24266fi
24267
24268  if test "x$with_copyright_year" = xyes; then
24269    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
24270  elif test "x$with_copyright_year" != x; then
24271    COPYRIGHT_YEAR="$with_copyright_year"
24272  else
24273    COPYRIGHT_YEAR=`$DATE +'%Y'`
24274  fi
24275
24276
24277
24278  # Check whether --enable-keep-packaged-modules was given.
24279if test "${enable_keep_packaged_modules+set}" = set; then :
24280  enableval=$enable_keep_packaged_modules;
24281fi
24282
24283
24284  if test "x$enable_keep_packaged_modules" = "xyes"; then
24285    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24286$as_echo_n "checking if packaged modules are kept... " >&6; }
24287    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24288$as_echo "yes" >&6; }
24289    JLINK_KEEP_PACKAGED_MODULES=true
24290  elif test "x$enable_keep_packaged_modules" = "xno"; then
24291    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24292$as_echo_n "checking if packaged modules are kept... " >&6; }
24293    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24294$as_echo "no" >&6; }
24295    JLINK_KEEP_PACKAGED_MODULES=false
24296  elif test "x$enable_keep_packaged_modules" = "x"; then
24297    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
24298$as_echo "yes (default)" >&6; }
24299    JLINK_KEEP_PACKAGED_MODULES=true
24300  else
24301    as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
24302  fi
24303
24304
24305
24306
24307  # Warn user that old version arguments are deprecated.
24308
24309
24310# Check whether --with-milestone was given.
24311if test "${with_milestone+set}" = set; then :
24312  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
24313$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
24314fi
24315
24316
24317
24318
24319# Check whether --with-update-version was given.
24320if test "${with_update_version+set}" = set; then :
24321  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
24322$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
24323fi
24324
24325
24326
24327
24328# Check whether --with-user-release-suffix was given.
24329if test "${with_user_release_suffix+set}" = set; then :
24330  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
24331$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
24332fi
24333
24334
24335
24336
24337# Check whether --with-build-number was given.
24338if test "${with_build_number+set}" = set; then :
24339  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
24340$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
24341fi
24342
24343
24344
24345  # Source the version numbers file
24346  . $AUTOCONF_DIR/version-numbers
24347
24348  # Some non-version number information is set in that file
24349
24350
24351
24352
24353
24354
24355
24356
24357
24358  # Override version from arguments
24359
24360  # If --with-version-string is set, process it first. It is possible to
24361  # override parts with more specific flags, since these are processed later.
24362
24363# Check whether --with-version-string was given.
24364if test "${with_version_string+set}" = set; then :
24365  withval=$with_version_string;
24366fi
24367
24368  if test "x$with_version_string" = xyes; then
24369    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
24370  elif test "x$with_version_string" != x; then
24371    # Additional [] needed to keep m4 from mangling shell constructs.
24372    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
24373      VERSION_MAJOR=${BASH_REMATCH[1]}
24374      VERSION_MINOR=${BASH_REMATCH[3]}
24375      VERSION_SECURITY=${BASH_REMATCH[5]}
24376      VERSION_PATCH=${BASH_REMATCH[7]}
24377      VERSION_PRE=${BASH_REMATCH[9]}
24378      version_plus_separator=${BASH_REMATCH[11]}
24379      VERSION_BUILD=${BASH_REMATCH[12]}
24380      VERSION_OPT=${BASH_REMATCH[14]}
24381      # Unspecified numerical fields are interpreted as 0.
24382      if test "x$VERSION_MINOR" = x; then
24383        VERSION_MINOR=0
24384      fi
24385      if test "x$VERSION_SECURITY" = x; then
24386        VERSION_SECURITY=0
24387      fi
24388      if test "x$VERSION_PATCH" = x; then
24389        VERSION_PATCH=0
24390      fi
24391      if test "x$version_plus_separator" != x \
24392          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
24393        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
24394      fi
24395      # Stop the version part process from setting default values.
24396      # We still allow them to explicitely override though.
24397      NO_DEFAULT_VERSION_PARTS=true
24398    else
24399      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
24400    fi
24401  fi
24402
24403
24404# Check whether --with-version-pre was given.
24405if test "${with_version_pre+set}" = set; then :
24406  withval=$with_version_pre; with_version_pre_present=true
24407else
24408  with_version_pre_present=false
24409fi
24410
24411
24412  if test "x$with_version_pre_present" = xtrue; then
24413    if test "x$with_version_pre" = xyes; then
24414      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
24415    elif test "x$with_version_pre" = xno; then
24416      # Interpret --without-* as empty string instead of the literal "no"
24417      VERSION_PRE=
24418    else
24419      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
24420       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
24421      if test "x$VERSION_PRE" != "x$with_version_pre"; then
24422        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
24423$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
24424      fi
24425    fi
24426  else
24427    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24428      # Default is to use "internal" as pre
24429      VERSION_PRE="internal"
24430    fi
24431  fi
24432
24433
24434# Check whether --with-version-opt was given.
24435if test "${with_version_opt+set}" = set; then :
24436  withval=$with_version_opt; with_version_opt_present=true
24437else
24438  with_version_opt_present=false
24439fi
24440
24441
24442  if test "x$with_version_opt_present" = xtrue; then
24443    if test "x$with_version_opt" = xyes; then
24444      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
24445    elif test "x$with_version_opt" = xno; then
24446      # Interpret --without-* as empty string instead of the literal "no"
24447      VERSION_OPT=
24448    else
24449      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
24450       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
24451      if test "x$VERSION_OPT" != "x$with_version_opt"; then
24452        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
24453$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
24454      fi
24455    fi
24456  else
24457    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24458      # Default is to calculate a string like this <timestamp>.<username>.<base dir name>
24459      timestamp=`$DATE '+%Y-%m-%d-%H%M%S'`
24460      # Outer [ ] to quote m4.
24461       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
24462      VERSION_OPT="$timestamp.$USERNAME.$basedirname"
24463    fi
24464  fi
24465
24466
24467# Check whether --with-version-build was given.
24468if test "${with_version_build+set}" = set; then :
24469  withval=$with_version_build; with_version_build_present=true
24470else
24471  with_version_build_present=false
24472fi
24473
24474
24475  if test "x$with_version_build_present" = xtrue; then
24476    if test "x$with_version_build" = xyes; then
24477      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
24478    elif test "x$with_version_build" = xno; then
24479      # Interpret --without-* as empty string instead of the literal "no"
24480      VERSION_BUILD=
24481    elif test "x$with_version_build" = x; then
24482      VERSION_BUILD=
24483    else
24484
24485  # Additional [] needed to keep m4 from mangling shell constructs.
24486  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24487    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
24488  fi
24489  # Extract the version number without leading zeros.
24490  cleaned_value=${BASH_REMATCH[1]}
24491  if test "x$cleaned_value" = x; then
24492    # Special case for zero
24493    cleaned_value=${BASH_REMATCH[2]}
24494  fi
24495
24496  if test $cleaned_value -gt 255; then
24497    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
24498  fi
24499  if test "x$cleaned_value" != "x$with_version_build"; then
24500    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
24501$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
24502  fi
24503  VERSION_BUILD=$cleaned_value
24504
24505    fi
24506  else
24507    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24508      # Default is to not have a build number.
24509      VERSION_BUILD=""
24510      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
24511      VERSION_BUILD=0
24512    fi
24513  fi
24514
24515
24516# Check whether --with-version-major was given.
24517if test "${with_version_major+set}" = set; then :
24518  withval=$with_version_major; with_version_major_present=true
24519else
24520  with_version_major_present=false
24521fi
24522
24523
24524  if test "x$with_version_major_present" = xtrue; then
24525    if test "x$with_version_major" = xyes; then
24526      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
24527    else
24528
24529  # Additional [] needed to keep m4 from mangling shell constructs.
24530  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24531    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
24532  fi
24533  # Extract the version number without leading zeros.
24534  cleaned_value=${BASH_REMATCH[1]}
24535  if test "x$cleaned_value" = x; then
24536    # Special case for zero
24537    cleaned_value=${BASH_REMATCH[2]}
24538  fi
24539
24540  if test $cleaned_value -gt 255; then
24541    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
24542  fi
24543  if test "x$cleaned_value" != "x$with_version_major"; then
24544    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
24545$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
24546  fi
24547  VERSION_MAJOR=$cleaned_value
24548
24549    fi
24550  else
24551    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24552      # Default is to get value from version-numbers
24553      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
24554    fi
24555  fi
24556
24557
24558# Check whether --with-version-minor was given.
24559if test "${with_version_minor+set}" = set; then :
24560  withval=$with_version_minor; with_version_minor_present=true
24561else
24562  with_version_minor_present=false
24563fi
24564
24565
24566  if test "x$with_version_minor_present" = xtrue; then
24567    if test "x$with_version_minor" = xyes; then
24568      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
24569    elif test "x$with_version_minor" = xno; then
24570      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24571      VERSION_MINOR=0
24572    elif test "x$with_version_minor" = x; then
24573      VERSION_MINOR=0
24574    else
24575
24576  # Additional [] needed to keep m4 from mangling shell constructs.
24577  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24578    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
24579  fi
24580  # Extract the version number without leading zeros.
24581  cleaned_value=${BASH_REMATCH[1]}
24582  if test "x$cleaned_value" = x; then
24583    # Special case for zero
24584    cleaned_value=${BASH_REMATCH[2]}
24585  fi
24586
24587  if test $cleaned_value -gt 255; then
24588    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
24589  fi
24590  if test "x$cleaned_value" != "x$with_version_minor"; then
24591    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
24592$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
24593  fi
24594  VERSION_MINOR=$cleaned_value
24595
24596    fi
24597  else
24598    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24599      # Default is 0, if unspecified
24600      VERSION_MINOR=0
24601    fi
24602  fi
24603
24604
24605# Check whether --with-version-security was given.
24606if test "${with_version_security+set}" = set; then :
24607  withval=$with_version_security; with_version_security_present=true
24608else
24609  with_version_security_present=false
24610fi
24611
24612
24613  if test "x$with_version_security_present" = xtrue; then
24614    if test "x$with_version_security" = xyes; then
24615      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
24616    elif test "x$with_version_security" = xno; then
24617      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24618      VERSION_SECURITY=0
24619    elif test "x$with_version_security" = x; then
24620      VERSION_SECURITY=0
24621    else
24622
24623  # Additional [] needed to keep m4 from mangling shell constructs.
24624  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24625    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
24626  fi
24627  # Extract the version number without leading zeros.
24628  cleaned_value=${BASH_REMATCH[1]}
24629  if test "x$cleaned_value" = x; then
24630    # Special case for zero
24631    cleaned_value=${BASH_REMATCH[2]}
24632  fi
24633
24634  if test $cleaned_value -gt 255; then
24635    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
24636  fi
24637  if test "x$cleaned_value" != "x$with_version_security"; then
24638    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
24639$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
24640  fi
24641  VERSION_SECURITY=$cleaned_value
24642
24643    fi
24644  else
24645    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24646      # Default is 0, if unspecified
24647      VERSION_SECURITY=0
24648    fi
24649  fi
24650
24651
24652# Check whether --with-version-patch was given.
24653if test "${with_version_patch+set}" = set; then :
24654  withval=$with_version_patch; with_version_patch_present=true
24655else
24656  with_version_patch_present=false
24657fi
24658
24659
24660  if test "x$with_version_patch_present" = xtrue; then
24661    if test "x$with_version_patch" = xyes; then
24662      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
24663    elif test "x$with_version_patch" = xno; then
24664      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24665      VERSION_PATCH=0
24666    elif test "x$with_version_patch" = x; then
24667      VERSION_PATCH=0
24668    else
24669
24670  # Additional [] needed to keep m4 from mangling shell constructs.
24671  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24672    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
24673  fi
24674  # Extract the version number without leading zeros.
24675  cleaned_value=${BASH_REMATCH[1]}
24676  if test "x$cleaned_value" = x; then
24677    # Special case for zero
24678    cleaned_value=${BASH_REMATCH[2]}
24679  fi
24680
24681  if test $cleaned_value -gt 255; then
24682    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
24683  fi
24684  if test "x$cleaned_value" != "x$with_version_patch"; then
24685    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
24686$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
24687  fi
24688  VERSION_PATCH=$cleaned_value
24689
24690    fi
24691  else
24692    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24693      # Default is 0, if unspecified
24694      VERSION_PATCH=0
24695    fi
24696  fi
24697
24698  # Calculate derived version properties
24699
24700  # Set VERSION_IS_GA based on if VERSION_PRE has a value
24701  if test "x$VERSION_PRE" = x; then
24702    VERSION_IS_GA=true
24703  else
24704    VERSION_IS_GA=false
24705  fi
24706
24707  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
24708  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
24709
24710  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
24711  # Strip trailing zeroes from stripped_version_number
24712  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
24713  VERSION_NUMBER=$stripped_version_number
24714
24715  # The complete version string, with additional build information
24716  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
24717    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24718  else
24719    # If either build or opt is set, we need a + separator
24720    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
24721  fi
24722
24723  # The short version string, just VERSION_NUMBER and PRE, if present.
24724  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24725
24726  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
24727$as_echo_n "checking for version string... " >&6; }
24728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
24729$as_echo "$VERSION_STRING" >&6; }
24730
24731
24732
24733
24734
24735
24736
24737
24738
24739
24740
24741
24742
24743
24744
24745###############################################################################
24746#
24747# Setup BootJDK, used to bootstrap the build.
24748#
24749###############################################################################
24750
24751
24752  BOOT_JDK_FOUND=no
24753
24754# Check whether --with-boot-jdk was given.
24755if test "${with_boot_jdk+set}" = set; then :
24756  withval=$with_boot_jdk;
24757fi
24758
24759
24760  # We look for the Boot JDK through various means, going from more certain to
24761  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
24762  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
24763  # must check if this is indeed valid; otherwise we'll continue looking.
24764
24765  # Test: Is bootjdk explicitely set by command line arguments?
24766
24767  if test "x$BOOT_JDK_FOUND" = xno; then
24768    # Now execute the test
24769
24770  if test "x$with_boot_jdk" != x; then
24771    BOOT_JDK=$with_boot_jdk
24772    BOOT_JDK_FOUND=maybe
24773    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
24774$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
24775  fi
24776
24777
24778    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24779    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24780      # Do we have a bin/java?
24781      if test ! -x "$BOOT_JDK/bin/java"; then
24782        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24783$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24784        BOOT_JDK_FOUND=no
24785      else
24786        # Do we have a bin/javac?
24787        if test ! -x "$BOOT_JDK/bin/javac"; then
24788          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24789$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24790          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24791$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24792          BOOT_JDK_FOUND=no
24793        else
24794          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24795          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
24796
24797          # Extra M4 quote needed to protect [] in grep expression.
24798          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24799          if test "x$FOUND_CORRECT_VERSION" = x; then
24800            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24801$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24802            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24803$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24804            BOOT_JDK_FOUND=no
24805          else
24806            # We're done! :-)
24807            BOOT_JDK_FOUND=yes
24808
24809  # Only process if variable expands to non-empty
24810
24811  if test "x$BOOT_JDK" != x; then
24812    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24813
24814  # Input might be given as Windows format, start by converting to
24815  # unix format.
24816  path="$BOOT_JDK"
24817  new_path=`$CYGPATH -u "$path"`
24818
24819  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24820  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24821  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24822  # "foo.exe" is OK but "foo" is an error.
24823  #
24824  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24825  # It is also a way to make sure we got the proper file name for the real test later on.
24826  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24827  if test "x$test_shortpath" = x; then
24828    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24829$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24830    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24831  fi
24832
24833  # Call helper function which possibly converts this using DOS-style short mode.
24834  # If so, the updated path is stored in $new_path.
24835
24836  input_path="$new_path"
24837  # Check if we need to convert this using DOS-style short mode. If the path
24838  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24839  # take no chances and rewrite it.
24840  # Note: m4 eats our [], so we need to use [ and ] instead.
24841  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24842  if test "x$has_forbidden_chars" != x; then
24843    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24844    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24845    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24846    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24847      # Going to short mode and back again did indeed matter. Since short mode is
24848      # case insensitive, let's make it lowercase to improve readability.
24849      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24850      # Now convert it back to Unix-style (cygpath)
24851      input_path=`$CYGPATH -u "$shortmode_path"`
24852      new_path="$input_path"
24853    fi
24854  fi
24855
24856  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24857  if test "x$test_cygdrive_prefix" = x; then
24858    # As a simple fix, exclude /usr/bin since it's not a real path.
24859    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24860      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24861      # a path prefixed by /cygdrive for fixpath to work.
24862      new_path="$CYGWIN_ROOT_PATH$input_path"
24863    fi
24864  fi
24865
24866
24867  if test "x$path" != "x$new_path"; then
24868    BOOT_JDK="$new_path"
24869    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24870$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24871  fi
24872
24873    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24874
24875  path="$BOOT_JDK"
24876  has_colon=`$ECHO $path | $GREP ^.:`
24877  new_path="$path"
24878  if test "x$has_colon" = x; then
24879    # Not in mixed or Windows style, start by that.
24880    new_path=`cmd //c echo $path`
24881  fi
24882
24883
24884  input_path="$new_path"
24885  # Check if we need to convert this using DOS-style short mode. If the path
24886  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24887  # take no chances and rewrite it.
24888  # Note: m4 eats our [], so we need to use [ and ] instead.
24889  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24890  if test "x$has_forbidden_chars" != x; then
24891    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24892    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24893  fi
24894
24895
24896  windows_path="$new_path"
24897  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24898    unix_path=`$CYGPATH -u "$windows_path"`
24899    new_path="$unix_path"
24900  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24901    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24902    new_path="$unix_path"
24903  fi
24904
24905  if test "x$path" != "x$new_path"; then
24906    BOOT_JDK="$new_path"
24907    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24908$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24909  fi
24910
24911  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24912  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24913
24914    else
24915      # We're on a unix platform. Hooray! :)
24916      path="$BOOT_JDK"
24917      has_space=`$ECHO "$path" | $GREP " "`
24918      if test "x$has_space" != x; then
24919        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24920$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24921        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24922      fi
24923
24924      # Use eval to expand a potential ~
24925      eval path="$path"
24926      if test ! -f "$path" && test ! -d "$path"; then
24927        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24928      fi
24929
24930      if test -d "$path"; then
24931        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24932      else
24933        dir="`$DIRNAME "$path"`"
24934        base="`$BASENAME "$path"`"
24935        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24936      fi
24937    fi
24938  fi
24939
24940            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24941$as_echo_n "checking for Boot JDK... " >&6; }
24942            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24943$as_echo "$BOOT_JDK" >&6; }
24944            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24945$as_echo_n "checking Boot JDK version... " >&6; }
24946            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24947            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24948$as_echo "$BOOT_JDK_VERSION" >&6; }
24949          fi # end check jdk version
24950        fi # end check javac
24951      fi # end check java
24952    fi # end check boot jdk found
24953  fi
24954
24955  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
24956    # Having specified an argument which is incorrect will produce an instant failure;
24957    # we should not go on looking
24958    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
24959  fi
24960
24961  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
24962
24963  if test "x$BOOT_JDK_FOUND" = xno; then
24964    # Now execute the test
24965
24966  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
24967    # First check at user selected default
24968
24969  if test "x$BOOT_JDK_FOUND" = xno; then
24970    # Now execute the test
24971
24972  if test -x /usr/libexec/java_home; then
24973    BOOT_JDK=`/usr/libexec/java_home `
24974    BOOT_JDK_FOUND=maybe
24975    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
24976$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
24977  fi
24978
24979
24980    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24981    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24982      # Do we have a bin/java?
24983      if test ! -x "$BOOT_JDK/bin/java"; then
24984        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24985$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24986        BOOT_JDK_FOUND=no
24987      else
24988        # Do we have a bin/javac?
24989        if test ! -x "$BOOT_JDK/bin/javac"; then
24990          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24991$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24992          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24993$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24994          BOOT_JDK_FOUND=no
24995        else
24996          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24997          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
24998
24999          # Extra M4 quote needed to protect [] in grep expression.
25000          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25001          if test "x$FOUND_CORRECT_VERSION" = x; then
25002            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25003$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25004            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25005$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25006            BOOT_JDK_FOUND=no
25007          else
25008            # We're done! :-)
25009            BOOT_JDK_FOUND=yes
25010
25011  # Only process if variable expands to non-empty
25012
25013  if test "x$BOOT_JDK" != x; then
25014    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25015
25016  # Input might be given as Windows format, start by converting to
25017  # unix format.
25018  path="$BOOT_JDK"
25019  new_path=`$CYGPATH -u "$path"`
25020
25021  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25022  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25023  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25024  # "foo.exe" is OK but "foo" is an error.
25025  #
25026  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25027  # It is also a way to make sure we got the proper file name for the real test later on.
25028  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25029  if test "x$test_shortpath" = x; then
25030    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25031$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25032    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25033  fi
25034
25035  # Call helper function which possibly converts this using DOS-style short mode.
25036  # If so, the updated path is stored in $new_path.
25037
25038  input_path="$new_path"
25039  # Check if we need to convert this using DOS-style short mode. If the path
25040  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25041  # take no chances and rewrite it.
25042  # Note: m4 eats our [], so we need to use [ and ] instead.
25043  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25044  if test "x$has_forbidden_chars" != x; then
25045    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25046    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25047    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25048    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25049      # Going to short mode and back again did indeed matter. Since short mode is
25050      # case insensitive, let's make it lowercase to improve readability.
25051      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25052      # Now convert it back to Unix-style (cygpath)
25053      input_path=`$CYGPATH -u "$shortmode_path"`
25054      new_path="$input_path"
25055    fi
25056  fi
25057
25058  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25059  if test "x$test_cygdrive_prefix" = x; then
25060    # As a simple fix, exclude /usr/bin since it's not a real path.
25061    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25062      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25063      # a path prefixed by /cygdrive for fixpath to work.
25064      new_path="$CYGWIN_ROOT_PATH$input_path"
25065    fi
25066  fi
25067
25068
25069  if test "x$path" != "x$new_path"; then
25070    BOOT_JDK="$new_path"
25071    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25072$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25073  fi
25074
25075    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25076
25077  path="$BOOT_JDK"
25078  has_colon=`$ECHO $path | $GREP ^.:`
25079  new_path="$path"
25080  if test "x$has_colon" = x; then
25081    # Not in mixed or Windows style, start by that.
25082    new_path=`cmd //c echo $path`
25083  fi
25084
25085
25086  input_path="$new_path"
25087  # Check if we need to convert this using DOS-style short mode. If the path
25088  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25089  # take no chances and rewrite it.
25090  # Note: m4 eats our [], so we need to use [ and ] instead.
25091  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25092  if test "x$has_forbidden_chars" != x; then
25093    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25094    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25095  fi
25096
25097
25098  windows_path="$new_path"
25099  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25100    unix_path=`$CYGPATH -u "$windows_path"`
25101    new_path="$unix_path"
25102  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25103    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25104    new_path="$unix_path"
25105  fi
25106
25107  if test "x$path" != "x$new_path"; then
25108    BOOT_JDK="$new_path"
25109    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25110$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25111  fi
25112
25113  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25114  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25115
25116    else
25117      # We're on a unix platform. Hooray! :)
25118      path="$BOOT_JDK"
25119      has_space=`$ECHO "$path" | $GREP " "`
25120      if test "x$has_space" != x; then
25121        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25122$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25123        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25124      fi
25125
25126      # Use eval to expand a potential ~
25127      eval path="$path"
25128      if test ! -f "$path" && test ! -d "$path"; then
25129        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25130      fi
25131
25132      if test -d "$path"; then
25133        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25134      else
25135        dir="`$DIRNAME "$path"`"
25136        base="`$BASENAME "$path"`"
25137        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25138      fi
25139    fi
25140  fi
25141
25142            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25143$as_echo_n "checking for Boot JDK... " >&6; }
25144            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25145$as_echo "$BOOT_JDK" >&6; }
25146            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25147$as_echo_n "checking Boot JDK version... " >&6; }
25148            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25149            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25150$as_echo "$BOOT_JDK_VERSION" >&6; }
25151          fi # end check jdk version
25152        fi # end check javac
25153      fi # end check java
25154    fi # end check boot jdk found
25155  fi
25156
25157    # If that did not work out (e.g. too old), try explicit versions instead
25158
25159  if test "x$BOOT_JDK_FOUND" = xno; then
25160    # Now execute the test
25161
25162  if test -x /usr/libexec/java_home; then
25163    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
25164    BOOT_JDK_FOUND=maybe
25165    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
25166$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
25167  fi
25168
25169
25170    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25171    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25172      # Do we have a bin/java?
25173      if test ! -x "$BOOT_JDK/bin/java"; then
25174        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25175$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25176        BOOT_JDK_FOUND=no
25177      else
25178        # Do we have a bin/javac?
25179        if test ! -x "$BOOT_JDK/bin/javac"; then
25180          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25181$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25182          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25183$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25184          BOOT_JDK_FOUND=no
25185        else
25186          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25187          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25188
25189          # Extra M4 quote needed to protect [] in grep expression.
25190          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25191          if test "x$FOUND_CORRECT_VERSION" = x; then
25192            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25193$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25194            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25195$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25196            BOOT_JDK_FOUND=no
25197          else
25198            # We're done! :-)
25199            BOOT_JDK_FOUND=yes
25200
25201  # Only process if variable expands to non-empty
25202
25203  if test "x$BOOT_JDK" != x; then
25204    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25205
25206  # Input might be given as Windows format, start by converting to
25207  # unix format.
25208  path="$BOOT_JDK"
25209  new_path=`$CYGPATH -u "$path"`
25210
25211  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25212  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25213  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25214  # "foo.exe" is OK but "foo" is an error.
25215  #
25216  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25217  # It is also a way to make sure we got the proper file name for the real test later on.
25218  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25219  if test "x$test_shortpath" = x; then
25220    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25221$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25222    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25223  fi
25224
25225  # Call helper function which possibly converts this using DOS-style short mode.
25226  # If so, the updated path is stored in $new_path.
25227
25228  input_path="$new_path"
25229  # Check if we need to convert this using DOS-style short mode. If the path
25230  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25231  # take no chances and rewrite it.
25232  # Note: m4 eats our [], so we need to use [ and ] instead.
25233  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25234  if test "x$has_forbidden_chars" != x; then
25235    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25236    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25237    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25238    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25239      # Going to short mode and back again did indeed matter. Since short mode is
25240      # case insensitive, let's make it lowercase to improve readability.
25241      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25242      # Now convert it back to Unix-style (cygpath)
25243      input_path=`$CYGPATH -u "$shortmode_path"`
25244      new_path="$input_path"
25245    fi
25246  fi
25247
25248  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25249  if test "x$test_cygdrive_prefix" = x; then
25250    # As a simple fix, exclude /usr/bin since it's not a real path.
25251    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25252      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25253      # a path prefixed by /cygdrive for fixpath to work.
25254      new_path="$CYGWIN_ROOT_PATH$input_path"
25255    fi
25256  fi
25257
25258
25259  if test "x$path" != "x$new_path"; then
25260    BOOT_JDK="$new_path"
25261    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25262$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25263  fi
25264
25265    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25266
25267  path="$BOOT_JDK"
25268  has_colon=`$ECHO $path | $GREP ^.:`
25269  new_path="$path"
25270  if test "x$has_colon" = x; then
25271    # Not in mixed or Windows style, start by that.
25272    new_path=`cmd //c echo $path`
25273  fi
25274
25275
25276  input_path="$new_path"
25277  # Check if we need to convert this using DOS-style short mode. If the path
25278  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25279  # take no chances and rewrite it.
25280  # Note: m4 eats our [], so we need to use [ and ] instead.
25281  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25282  if test "x$has_forbidden_chars" != x; then
25283    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25284    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25285  fi
25286
25287
25288  windows_path="$new_path"
25289  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25290    unix_path=`$CYGPATH -u "$windows_path"`
25291    new_path="$unix_path"
25292  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25293    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25294    new_path="$unix_path"
25295  fi
25296
25297  if test "x$path" != "x$new_path"; then
25298    BOOT_JDK="$new_path"
25299    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25300$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25301  fi
25302
25303  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25304  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25305
25306    else
25307      # We're on a unix platform. Hooray! :)
25308      path="$BOOT_JDK"
25309      has_space=`$ECHO "$path" | $GREP " "`
25310      if test "x$has_space" != x; then
25311        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25312$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25313        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25314      fi
25315
25316      # Use eval to expand a potential ~
25317      eval path="$path"
25318      if test ! -f "$path" && test ! -d "$path"; then
25319        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25320      fi
25321
25322      if test -d "$path"; then
25323        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25324      else
25325        dir="`$DIRNAME "$path"`"
25326        base="`$BASENAME "$path"`"
25327        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25328      fi
25329    fi
25330  fi
25331
25332            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25333$as_echo_n "checking for Boot JDK... " >&6; }
25334            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25335$as_echo "$BOOT_JDK" >&6; }
25336            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25337$as_echo_n "checking Boot JDK version... " >&6; }
25338            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25339            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25340$as_echo "$BOOT_JDK_VERSION" >&6; }
25341          fi # end check jdk version
25342        fi # end check javac
25343      fi # end check java
25344    fi # end check boot jdk found
25345  fi
25346
25347
25348  if test "x$BOOT_JDK_FOUND" = xno; then
25349    # Now execute the test
25350
25351  if test -x /usr/libexec/java_home; then
25352    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
25353    BOOT_JDK_FOUND=maybe
25354    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
25355$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
25356  fi
25357
25358
25359    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25360    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25361      # Do we have a bin/java?
25362      if test ! -x "$BOOT_JDK/bin/java"; then
25363        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25364$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25365        BOOT_JDK_FOUND=no
25366      else
25367        # Do we have a bin/javac?
25368        if test ! -x "$BOOT_JDK/bin/javac"; then
25369          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25370$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25371          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25372$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25373          BOOT_JDK_FOUND=no
25374        else
25375          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25376          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25377
25378          # Extra M4 quote needed to protect [] in grep expression.
25379          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25380          if test "x$FOUND_CORRECT_VERSION" = x; then
25381            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25382$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25383            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25384$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25385            BOOT_JDK_FOUND=no
25386          else
25387            # We're done! :-)
25388            BOOT_JDK_FOUND=yes
25389
25390  # Only process if variable expands to non-empty
25391
25392  if test "x$BOOT_JDK" != x; then
25393    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25394
25395  # Input might be given as Windows format, start by converting to
25396  # unix format.
25397  path="$BOOT_JDK"
25398  new_path=`$CYGPATH -u "$path"`
25399
25400  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25401  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25402  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25403  # "foo.exe" is OK but "foo" is an error.
25404  #
25405  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25406  # It is also a way to make sure we got the proper file name for the real test later on.
25407  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25408  if test "x$test_shortpath" = x; then
25409    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25410$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25411    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25412  fi
25413
25414  # Call helper function which possibly converts this using DOS-style short mode.
25415  # If so, the updated path is stored in $new_path.
25416
25417  input_path="$new_path"
25418  # Check if we need to convert this using DOS-style short mode. If the path
25419  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25420  # take no chances and rewrite it.
25421  # Note: m4 eats our [], so we need to use [ and ] instead.
25422  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25423  if test "x$has_forbidden_chars" != x; then
25424    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25425    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25426    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25427    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25428      # Going to short mode and back again did indeed matter. Since short mode is
25429      # case insensitive, let's make it lowercase to improve readability.
25430      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25431      # Now convert it back to Unix-style (cygpath)
25432      input_path=`$CYGPATH -u "$shortmode_path"`
25433      new_path="$input_path"
25434    fi
25435  fi
25436
25437  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25438  if test "x$test_cygdrive_prefix" = x; then
25439    # As a simple fix, exclude /usr/bin since it's not a real path.
25440    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25441      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25442      # a path prefixed by /cygdrive for fixpath to work.
25443      new_path="$CYGWIN_ROOT_PATH$input_path"
25444    fi
25445  fi
25446
25447
25448  if test "x$path" != "x$new_path"; then
25449    BOOT_JDK="$new_path"
25450    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25451$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25452  fi
25453
25454    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25455
25456  path="$BOOT_JDK"
25457  has_colon=`$ECHO $path | $GREP ^.:`
25458  new_path="$path"
25459  if test "x$has_colon" = x; then
25460    # Not in mixed or Windows style, start by that.
25461    new_path=`cmd //c echo $path`
25462  fi
25463
25464
25465  input_path="$new_path"
25466  # Check if we need to convert this using DOS-style short mode. If the path
25467  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25468  # take no chances and rewrite it.
25469  # Note: m4 eats our [], so we need to use [ and ] instead.
25470  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25471  if test "x$has_forbidden_chars" != x; then
25472    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25473    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25474  fi
25475
25476
25477  windows_path="$new_path"
25478  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25479    unix_path=`$CYGPATH -u "$windows_path"`
25480    new_path="$unix_path"
25481  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25482    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25483    new_path="$unix_path"
25484  fi
25485
25486  if test "x$path" != "x$new_path"; then
25487    BOOT_JDK="$new_path"
25488    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25489$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25490  fi
25491
25492  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25493  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25494
25495    else
25496      # We're on a unix platform. Hooray! :)
25497      path="$BOOT_JDK"
25498      has_space=`$ECHO "$path" | $GREP " "`
25499      if test "x$has_space" != x; then
25500        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25501$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25502        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25503      fi
25504
25505      # Use eval to expand a potential ~
25506      eval path="$path"
25507      if test ! -f "$path" && test ! -d "$path"; then
25508        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25509      fi
25510
25511      if test -d "$path"; then
25512        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25513      else
25514        dir="`$DIRNAME "$path"`"
25515        base="`$BASENAME "$path"`"
25516        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25517      fi
25518    fi
25519  fi
25520
25521            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25522$as_echo_n "checking for Boot JDK... " >&6; }
25523            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25524$as_echo "$BOOT_JDK" >&6; }
25525            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25526$as_echo_n "checking Boot JDK version... " >&6; }
25527            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25528            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25529$as_echo "$BOOT_JDK_VERSION" >&6; }
25530          fi # end check jdk version
25531        fi # end check javac
25532      fi # end check java
25533    fi # end check boot jdk found
25534  fi
25535
25536
25537  if test "x$BOOT_JDK_FOUND" = xno; then
25538    # Now execute the test
25539
25540  if test -x /usr/libexec/java_home; then
25541    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
25542    BOOT_JDK_FOUND=maybe
25543    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
25544$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
25545  fi
25546
25547
25548    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25549    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25550      # Do we have a bin/java?
25551      if test ! -x "$BOOT_JDK/bin/java"; then
25552        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25553$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25554        BOOT_JDK_FOUND=no
25555      else
25556        # Do we have a bin/javac?
25557        if test ! -x "$BOOT_JDK/bin/javac"; then
25558          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25559$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25560          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25561$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25562          BOOT_JDK_FOUND=no
25563        else
25564          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25565          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25566
25567          # Extra M4 quote needed to protect [] in grep expression.
25568          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25569          if test "x$FOUND_CORRECT_VERSION" = x; then
25570            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25571$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25572            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25573$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25574            BOOT_JDK_FOUND=no
25575          else
25576            # We're done! :-)
25577            BOOT_JDK_FOUND=yes
25578
25579  # Only process if variable expands to non-empty
25580
25581  if test "x$BOOT_JDK" != x; then
25582    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25583
25584  # Input might be given as Windows format, start by converting to
25585  # unix format.
25586  path="$BOOT_JDK"
25587  new_path=`$CYGPATH -u "$path"`
25588
25589  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25590  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25591  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25592  # "foo.exe" is OK but "foo" is an error.
25593  #
25594  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25595  # It is also a way to make sure we got the proper file name for the real test later on.
25596  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25597  if test "x$test_shortpath" = x; then
25598    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25599$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25600    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25601  fi
25602
25603  # Call helper function which possibly converts this using DOS-style short mode.
25604  # If so, the updated path is stored in $new_path.
25605
25606  input_path="$new_path"
25607  # Check if we need to convert this using DOS-style short mode. If the path
25608  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25609  # take no chances and rewrite it.
25610  # Note: m4 eats our [], so we need to use [ and ] instead.
25611  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25612  if test "x$has_forbidden_chars" != x; then
25613    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25614    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25615    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25616    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25617      # Going to short mode and back again did indeed matter. Since short mode is
25618      # case insensitive, let's make it lowercase to improve readability.
25619      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25620      # Now convert it back to Unix-style (cygpath)
25621      input_path=`$CYGPATH -u "$shortmode_path"`
25622      new_path="$input_path"
25623    fi
25624  fi
25625
25626  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25627  if test "x$test_cygdrive_prefix" = x; then
25628    # As a simple fix, exclude /usr/bin since it's not a real path.
25629    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25630      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25631      # a path prefixed by /cygdrive for fixpath to work.
25632      new_path="$CYGWIN_ROOT_PATH$input_path"
25633    fi
25634  fi
25635
25636
25637  if test "x$path" != "x$new_path"; then
25638    BOOT_JDK="$new_path"
25639    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25640$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25641  fi
25642
25643    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25644
25645  path="$BOOT_JDK"
25646  has_colon=`$ECHO $path | $GREP ^.:`
25647  new_path="$path"
25648  if test "x$has_colon" = x; then
25649    # Not in mixed or Windows style, start by that.
25650    new_path=`cmd //c echo $path`
25651  fi
25652
25653
25654  input_path="$new_path"
25655  # Check if we need to convert this using DOS-style short mode. If the path
25656  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25657  # take no chances and rewrite it.
25658  # Note: m4 eats our [], so we need to use [ and ] instead.
25659  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25660  if test "x$has_forbidden_chars" != x; then
25661    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25662    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25663  fi
25664
25665
25666  windows_path="$new_path"
25667  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25668    unix_path=`$CYGPATH -u "$windows_path"`
25669    new_path="$unix_path"
25670  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25671    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25672    new_path="$unix_path"
25673  fi
25674
25675  if test "x$path" != "x$new_path"; then
25676    BOOT_JDK="$new_path"
25677    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25678$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25679  fi
25680
25681  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25682  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25683
25684    else
25685      # We're on a unix platform. Hooray! :)
25686      path="$BOOT_JDK"
25687      has_space=`$ECHO "$path" | $GREP " "`
25688      if test "x$has_space" != x; then
25689        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25690$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25691        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25692      fi
25693
25694      # Use eval to expand a potential ~
25695      eval path="$path"
25696      if test ! -f "$path" && test ! -d "$path"; then
25697        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25698      fi
25699
25700      if test -d "$path"; then
25701        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25702      else
25703        dir="`$DIRNAME "$path"`"
25704        base="`$BASENAME "$path"`"
25705        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25706      fi
25707    fi
25708  fi
25709
25710            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25711$as_echo_n "checking for Boot JDK... " >&6; }
25712            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25713$as_echo "$BOOT_JDK" >&6; }
25714            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25715$as_echo_n "checking Boot JDK version... " >&6; }
25716            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25717            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25718$as_echo "$BOOT_JDK_VERSION" >&6; }
25719          fi # end check jdk version
25720        fi # end check javac
25721      fi # end check java
25722    fi # end check boot jdk found
25723  fi
25724
25725  fi
25726
25727
25728    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25729    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25730      # Do we have a bin/java?
25731      if test ! -x "$BOOT_JDK/bin/java"; then
25732        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25733$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25734        BOOT_JDK_FOUND=no
25735      else
25736        # Do we have a bin/javac?
25737        if test ! -x "$BOOT_JDK/bin/javac"; then
25738          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25739$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25740          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25741$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25742          BOOT_JDK_FOUND=no
25743        else
25744          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25745          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25746
25747          # Extra M4 quote needed to protect [] in grep expression.
25748          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25749          if test "x$FOUND_CORRECT_VERSION" = x; then
25750            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25751$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25752            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25753$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25754            BOOT_JDK_FOUND=no
25755          else
25756            # We're done! :-)
25757            BOOT_JDK_FOUND=yes
25758
25759  # Only process if variable expands to non-empty
25760
25761  if test "x$BOOT_JDK" != x; then
25762    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25763
25764  # Input might be given as Windows format, start by converting to
25765  # unix format.
25766  path="$BOOT_JDK"
25767  new_path=`$CYGPATH -u "$path"`
25768
25769  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25770  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25771  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25772  # "foo.exe" is OK but "foo" is an error.
25773  #
25774  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25775  # It is also a way to make sure we got the proper file name for the real test later on.
25776  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25777  if test "x$test_shortpath" = x; then
25778    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25779$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25780    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25781  fi
25782
25783  # Call helper function which possibly converts this using DOS-style short mode.
25784  # If so, the updated path is stored in $new_path.
25785
25786  input_path="$new_path"
25787  # Check if we need to convert this using DOS-style short mode. If the path
25788  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25789  # take no chances and rewrite it.
25790  # Note: m4 eats our [], so we need to use [ and ] instead.
25791  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25792  if test "x$has_forbidden_chars" != x; then
25793    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25794    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25795    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25796    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25797      # Going to short mode and back again did indeed matter. Since short mode is
25798      # case insensitive, let's make it lowercase to improve readability.
25799      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25800      # Now convert it back to Unix-style (cygpath)
25801      input_path=`$CYGPATH -u "$shortmode_path"`
25802      new_path="$input_path"
25803    fi
25804  fi
25805
25806  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25807  if test "x$test_cygdrive_prefix" = x; then
25808    # As a simple fix, exclude /usr/bin since it's not a real path.
25809    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25810      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25811      # a path prefixed by /cygdrive for fixpath to work.
25812      new_path="$CYGWIN_ROOT_PATH$input_path"
25813    fi
25814  fi
25815
25816
25817  if test "x$path" != "x$new_path"; then
25818    BOOT_JDK="$new_path"
25819    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25820$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25821  fi
25822
25823    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25824
25825  path="$BOOT_JDK"
25826  has_colon=`$ECHO $path | $GREP ^.:`
25827  new_path="$path"
25828  if test "x$has_colon" = x; then
25829    # Not in mixed or Windows style, start by that.
25830    new_path=`cmd //c echo $path`
25831  fi
25832
25833
25834  input_path="$new_path"
25835  # Check if we need to convert this using DOS-style short mode. If the path
25836  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25837  # take no chances and rewrite it.
25838  # Note: m4 eats our [], so we need to use [ and ] instead.
25839  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25840  if test "x$has_forbidden_chars" != x; then
25841    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25842    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25843  fi
25844
25845
25846  windows_path="$new_path"
25847  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25848    unix_path=`$CYGPATH -u "$windows_path"`
25849    new_path="$unix_path"
25850  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25851    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25852    new_path="$unix_path"
25853  fi
25854
25855  if test "x$path" != "x$new_path"; then
25856    BOOT_JDK="$new_path"
25857    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25858$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25859  fi
25860
25861  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25862  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25863
25864    else
25865      # We're on a unix platform. Hooray! :)
25866      path="$BOOT_JDK"
25867      has_space=`$ECHO "$path" | $GREP " "`
25868      if test "x$has_space" != x; then
25869        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25870$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25871        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25872      fi
25873
25874      # Use eval to expand a potential ~
25875      eval path="$path"
25876      if test ! -f "$path" && test ! -d "$path"; then
25877        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25878      fi
25879
25880      if test -d "$path"; then
25881        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25882      else
25883        dir="`$DIRNAME "$path"`"
25884        base="`$BASENAME "$path"`"
25885        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25886      fi
25887    fi
25888  fi
25889
25890            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25891$as_echo_n "checking for Boot JDK... " >&6; }
25892            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25893$as_echo "$BOOT_JDK" >&6; }
25894            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25895$as_echo_n "checking Boot JDK version... " >&6; }
25896            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25897            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25898$as_echo "$BOOT_JDK_VERSION" >&6; }
25899          fi # end check jdk version
25900        fi # end check javac
25901      fi # end check java
25902    fi # end check boot jdk found
25903  fi
25904
25905
25906  # Test: Is $JAVA_HOME set?
25907
25908  if test "x$BOOT_JDK_FOUND" = xno; then
25909    # Now execute the test
25910
25911  if test "x$JAVA_HOME" != x; then
25912    JAVA_HOME_PROCESSED="$JAVA_HOME"
25913
25914  # Only process if variable expands to non-empty
25915
25916  if test "x$JAVA_HOME_PROCESSED" != x; then
25917    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25918
25919  # Input might be given as Windows format, start by converting to
25920  # unix format.
25921  path="$JAVA_HOME_PROCESSED"
25922  new_path=`$CYGPATH -u "$path"`
25923
25924  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25925  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25926  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25927  # "foo.exe" is OK but "foo" is an error.
25928  #
25929  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25930  # It is also a way to make sure we got the proper file name for the real test later on.
25931  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25932  if test "x$test_shortpath" = x; then
25933    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
25934$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
25935    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
25936  fi
25937
25938  # Call helper function which possibly converts this using DOS-style short mode.
25939  # If so, the updated path is stored in $new_path.
25940
25941  input_path="$new_path"
25942  # Check if we need to convert this using DOS-style short mode. If the path
25943  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25944  # take no chances and rewrite it.
25945  # Note: m4 eats our [], so we need to use [ and ] instead.
25946  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25947  if test "x$has_forbidden_chars" != x; then
25948    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25949    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25950    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25951    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25952      # Going to short mode and back again did indeed matter. Since short mode is
25953      # case insensitive, let's make it lowercase to improve readability.
25954      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25955      # Now convert it back to Unix-style (cygpath)
25956      input_path=`$CYGPATH -u "$shortmode_path"`
25957      new_path="$input_path"
25958    fi
25959  fi
25960
25961  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25962  if test "x$test_cygdrive_prefix" = x; then
25963    # As a simple fix, exclude /usr/bin since it's not a real path.
25964    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25965      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25966      # a path prefixed by /cygdrive for fixpath to work.
25967      new_path="$CYGWIN_ROOT_PATH$input_path"
25968    fi
25969  fi
25970
25971
25972  if test "x$path" != "x$new_path"; then
25973    JAVA_HOME_PROCESSED="$new_path"
25974    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
25975$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
25976  fi
25977
25978    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25979
25980  path="$JAVA_HOME_PROCESSED"
25981  has_colon=`$ECHO $path | $GREP ^.:`
25982  new_path="$path"
25983  if test "x$has_colon" = x; then
25984    # Not in mixed or Windows style, start by that.
25985    new_path=`cmd //c echo $path`
25986  fi
25987
25988
25989  input_path="$new_path"
25990  # Check if we need to convert this using DOS-style short mode. If the path
25991  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25992  # take no chances and rewrite it.
25993  # Note: m4 eats our [], so we need to use [ and ] instead.
25994  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25995  if test "x$has_forbidden_chars" != x; then
25996    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25997    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25998  fi
25999
26000
26001  windows_path="$new_path"
26002  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26003    unix_path=`$CYGPATH -u "$windows_path"`
26004    new_path="$unix_path"
26005  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26006    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26007    new_path="$unix_path"
26008  fi
26009
26010  if test "x$path" != "x$new_path"; then
26011    JAVA_HOME_PROCESSED="$new_path"
26012    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26013$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26014  fi
26015
26016  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26017  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26018
26019    else
26020      # We're on a unix platform. Hooray! :)
26021      path="$JAVA_HOME_PROCESSED"
26022      has_space=`$ECHO "$path" | $GREP " "`
26023      if test "x$has_space" != x; then
26024        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26025$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26026        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26027      fi
26028
26029      # Use eval to expand a potential ~
26030      eval path="$path"
26031      if test ! -f "$path" && test ! -d "$path"; then
26032        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
26033      fi
26034
26035      if test -d "$path"; then
26036        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
26037      else
26038        dir="`$DIRNAME "$path"`"
26039        base="`$BASENAME "$path"`"
26040        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
26041      fi
26042    fi
26043  fi
26044
26045    if test ! -d "$JAVA_HOME_PROCESSED"; then
26046      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
26047$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
26048    else
26049      # Aha, the user has set a JAVA_HOME
26050      # let us use that as the Boot JDK.
26051      BOOT_JDK="$JAVA_HOME_PROCESSED"
26052      BOOT_JDK_FOUND=maybe
26053      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
26054$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
26055    fi
26056  fi
26057
26058
26059    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26060    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26061      # Do we have a bin/java?
26062      if test ! -x "$BOOT_JDK/bin/java"; then
26063        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26064$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26065        BOOT_JDK_FOUND=no
26066      else
26067        # Do we have a bin/javac?
26068        if test ! -x "$BOOT_JDK/bin/javac"; then
26069          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26070$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26071          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26072$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26073          BOOT_JDK_FOUND=no
26074        else
26075          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26076          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26077
26078          # Extra M4 quote needed to protect [] in grep expression.
26079          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26080          if test "x$FOUND_CORRECT_VERSION" = x; then
26081            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26082$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26083            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26084$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26085            BOOT_JDK_FOUND=no
26086          else
26087            # We're done! :-)
26088            BOOT_JDK_FOUND=yes
26089
26090  # Only process if variable expands to non-empty
26091
26092  if test "x$BOOT_JDK" != x; then
26093    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26094
26095  # Input might be given as Windows format, start by converting to
26096  # unix format.
26097  path="$BOOT_JDK"
26098  new_path=`$CYGPATH -u "$path"`
26099
26100  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26101  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26102  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26103  # "foo.exe" is OK but "foo" is an error.
26104  #
26105  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26106  # It is also a way to make sure we got the proper file name for the real test later on.
26107  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26108  if test "x$test_shortpath" = x; then
26109    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26110$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26111    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26112  fi
26113
26114  # Call helper function which possibly converts this using DOS-style short mode.
26115  # If so, the updated path is stored in $new_path.
26116
26117  input_path="$new_path"
26118  # Check if we need to convert this using DOS-style short mode. If the path
26119  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26120  # take no chances and rewrite it.
26121  # Note: m4 eats our [], so we need to use [ and ] instead.
26122  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26123  if test "x$has_forbidden_chars" != x; then
26124    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26125    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26126    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26127    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26128      # Going to short mode and back again did indeed matter. Since short mode is
26129      # case insensitive, let's make it lowercase to improve readability.
26130      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26131      # Now convert it back to Unix-style (cygpath)
26132      input_path=`$CYGPATH -u "$shortmode_path"`
26133      new_path="$input_path"
26134    fi
26135  fi
26136
26137  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26138  if test "x$test_cygdrive_prefix" = x; then
26139    # As a simple fix, exclude /usr/bin since it's not a real path.
26140    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26141      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26142      # a path prefixed by /cygdrive for fixpath to work.
26143      new_path="$CYGWIN_ROOT_PATH$input_path"
26144    fi
26145  fi
26146
26147
26148  if test "x$path" != "x$new_path"; then
26149    BOOT_JDK="$new_path"
26150    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26151$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26152  fi
26153
26154    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26155
26156  path="$BOOT_JDK"
26157  has_colon=`$ECHO $path | $GREP ^.:`
26158  new_path="$path"
26159  if test "x$has_colon" = x; then
26160    # Not in mixed or Windows style, start by that.
26161    new_path=`cmd //c echo $path`
26162  fi
26163
26164
26165  input_path="$new_path"
26166  # Check if we need to convert this using DOS-style short mode. If the path
26167  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26168  # take no chances and rewrite it.
26169  # Note: m4 eats our [], so we need to use [ and ] instead.
26170  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26171  if test "x$has_forbidden_chars" != x; then
26172    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26173    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26174  fi
26175
26176
26177  windows_path="$new_path"
26178  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26179    unix_path=`$CYGPATH -u "$windows_path"`
26180    new_path="$unix_path"
26181  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26182    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26183    new_path="$unix_path"
26184  fi
26185
26186  if test "x$path" != "x$new_path"; then
26187    BOOT_JDK="$new_path"
26188    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26189$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26190  fi
26191
26192  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26193  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26194
26195    else
26196      # We're on a unix platform. Hooray! :)
26197      path="$BOOT_JDK"
26198      has_space=`$ECHO "$path" | $GREP " "`
26199      if test "x$has_space" != x; then
26200        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26201$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26202        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26203      fi
26204
26205      # Use eval to expand a potential ~
26206      eval path="$path"
26207      if test ! -f "$path" && test ! -d "$path"; then
26208        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26209      fi
26210
26211      if test -d "$path"; then
26212        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26213      else
26214        dir="`$DIRNAME "$path"`"
26215        base="`$BASENAME "$path"`"
26216        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26217      fi
26218    fi
26219  fi
26220
26221            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26222$as_echo_n "checking for Boot JDK... " >&6; }
26223            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26224$as_echo "$BOOT_JDK" >&6; }
26225            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26226$as_echo_n "checking Boot JDK version... " >&6; }
26227            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26228            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26229$as_echo "$BOOT_JDK_VERSION" >&6; }
26230          fi # end check jdk version
26231        fi # end check javac
26232      fi # end check java
26233    fi # end check boot jdk found
26234  fi
26235
26236
26237  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
26238
26239  if test "x$BOOT_JDK_FOUND" = xno; then
26240    # Now execute the test
26241
26242  # Extract the first word of "javac", so it can be a program name with args.
26243set dummy javac; ac_word=$2
26244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26245$as_echo_n "checking for $ac_word... " >&6; }
26246if ${ac_cv_path_JAVAC_CHECK+:} false; then :
26247  $as_echo_n "(cached) " >&6
26248else
26249  case $JAVAC_CHECK in
26250  [\\/]* | ?:[\\/]*)
26251  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
26252  ;;
26253  *)
26254  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26255for as_dir in $PATH
26256do
26257  IFS=$as_save_IFS
26258  test -z "$as_dir" && as_dir=.
26259    for ac_exec_ext in '' $ac_executable_extensions; do
26260  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26261    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
26262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26263    break 2
26264  fi
26265done
26266  done
26267IFS=$as_save_IFS
26268
26269  ;;
26270esac
26271fi
26272JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
26273if test -n "$JAVAC_CHECK"; then
26274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
26275$as_echo "$JAVAC_CHECK" >&6; }
26276else
26277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26278$as_echo "no" >&6; }
26279fi
26280
26281
26282  # Extract the first word of "java", so it can be a program name with args.
26283set dummy java; ac_word=$2
26284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26285$as_echo_n "checking for $ac_word... " >&6; }
26286if ${ac_cv_path_JAVA_CHECK+:} false; then :
26287  $as_echo_n "(cached) " >&6
26288else
26289  case $JAVA_CHECK in
26290  [\\/]* | ?:[\\/]*)
26291  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
26292  ;;
26293  *)
26294  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26295for as_dir in $PATH
26296do
26297  IFS=$as_save_IFS
26298  test -z "$as_dir" && as_dir=.
26299    for ac_exec_ext in '' $ac_executable_extensions; do
26300  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26301    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
26302    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26303    break 2
26304  fi
26305done
26306  done
26307IFS=$as_save_IFS
26308
26309  ;;
26310esac
26311fi
26312JAVA_CHECK=$ac_cv_path_JAVA_CHECK
26313if test -n "$JAVA_CHECK"; then
26314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
26315$as_echo "$JAVA_CHECK" >&6; }
26316else
26317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26318$as_echo "no" >&6; }
26319fi
26320
26321
26322  BINARY="$JAVAC_CHECK"
26323  if test "x$JAVAC_CHECK" = x; then
26324    BINARY="$JAVA_CHECK"
26325  fi
26326  if test "x$BINARY" != x; then
26327    # So there is a java(c) binary, it might be part of a JDK.
26328    # Lets find the JDK/JRE directory by following symbolic links.
26329    # Linux/GNU systems often have links from /usr/bin/java to
26330    # /etc/alternatives/java to the real JDK binary.
26331
26332  if test "x$OPENJDK_BUILD_OS" != xwindows; then
26333    # Follow a chain of symbolic links. Use readlink
26334    # where it exists, else fall back to horribly
26335    # complicated shell code.
26336    if test "x$READLINK_TESTED" != yes; then
26337      # On MacOSX there is a readlink tool with a different
26338      # purpose than the GNU readlink tool. Check the found readlink.
26339      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
26340      if test "x$ISGNU" = x; then
26341        # A readlink that we do not know how to use.
26342        # Are there other non-GNU readlinks out there?
26343        READLINK_TESTED=yes
26344        READLINK=
26345      fi
26346    fi
26347
26348    if test "x$READLINK" != x; then
26349      BINARY=`$READLINK -f $BINARY`
26350    else
26351      # Save the current directory for restoring afterwards
26352      STARTDIR=$PWD
26353      COUNTER=0
26354      sym_link_dir=`$DIRNAME $BINARY`
26355      sym_link_file=`$BASENAME $BINARY`
26356      cd $sym_link_dir
26357      # Use -P flag to resolve symlinks in directories.
26358      cd `$THEPWDCMD -P`
26359      sym_link_dir=`$THEPWDCMD -P`
26360      # Resolve file symlinks
26361      while test $COUNTER -lt 20; do
26362        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
26363        if test "x$ISLINK" == x; then
26364          # This is not a symbolic link! We are done!
26365          break
26366        fi
26367        # Again resolve directory symlinks since the target of the just found
26368        # link could be in a different directory
26369        cd `$DIRNAME $ISLINK`
26370        sym_link_dir=`$THEPWDCMD -P`
26371        sym_link_file=`$BASENAME $ISLINK`
26372        let COUNTER=COUNTER+1
26373      done
26374      cd $STARTDIR
26375      BINARY=$sym_link_dir/$sym_link_file
26376    fi
26377  fi
26378
26379    BOOT_JDK=`dirname "$BINARY"`
26380    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
26381    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
26382      # Looks like we found ourselves an JDK
26383      BOOT_JDK_FOUND=maybe
26384      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
26385$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
26386    fi
26387  fi
26388
26389
26390    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26391    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26392      # Do we have a bin/java?
26393      if test ! -x "$BOOT_JDK/bin/java"; then
26394        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26395$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26396        BOOT_JDK_FOUND=no
26397      else
26398        # Do we have a bin/javac?
26399        if test ! -x "$BOOT_JDK/bin/javac"; then
26400          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26401$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26402          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26403$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26404          BOOT_JDK_FOUND=no
26405        else
26406          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26407          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26408
26409          # Extra M4 quote needed to protect [] in grep expression.
26410          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26411          if test "x$FOUND_CORRECT_VERSION" = x; then
26412            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26413$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26414            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26415$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26416            BOOT_JDK_FOUND=no
26417          else
26418            # We're done! :-)
26419            BOOT_JDK_FOUND=yes
26420
26421  # Only process if variable expands to non-empty
26422
26423  if test "x$BOOT_JDK" != x; then
26424    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26425
26426  # Input might be given as Windows format, start by converting to
26427  # unix format.
26428  path="$BOOT_JDK"
26429  new_path=`$CYGPATH -u "$path"`
26430
26431  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26432  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26433  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26434  # "foo.exe" is OK but "foo" is an error.
26435  #
26436  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26437  # It is also a way to make sure we got the proper file name for the real test later on.
26438  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26439  if test "x$test_shortpath" = x; then
26440    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26441$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26442    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26443  fi
26444
26445  # Call helper function which possibly converts this using DOS-style short mode.
26446  # If so, the updated path is stored in $new_path.
26447
26448  input_path="$new_path"
26449  # Check if we need to convert this using DOS-style short mode. If the path
26450  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26451  # take no chances and rewrite it.
26452  # Note: m4 eats our [], so we need to use [ and ] instead.
26453  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26454  if test "x$has_forbidden_chars" != x; then
26455    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26456    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26457    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26458    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26459      # Going to short mode and back again did indeed matter. Since short mode is
26460      # case insensitive, let's make it lowercase to improve readability.
26461      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26462      # Now convert it back to Unix-style (cygpath)
26463      input_path=`$CYGPATH -u "$shortmode_path"`
26464      new_path="$input_path"
26465    fi
26466  fi
26467
26468  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26469  if test "x$test_cygdrive_prefix" = x; then
26470    # As a simple fix, exclude /usr/bin since it's not a real path.
26471    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26472      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26473      # a path prefixed by /cygdrive for fixpath to work.
26474      new_path="$CYGWIN_ROOT_PATH$input_path"
26475    fi
26476  fi
26477
26478
26479  if test "x$path" != "x$new_path"; then
26480    BOOT_JDK="$new_path"
26481    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26482$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26483  fi
26484
26485    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26486
26487  path="$BOOT_JDK"
26488  has_colon=`$ECHO $path | $GREP ^.:`
26489  new_path="$path"
26490  if test "x$has_colon" = x; then
26491    # Not in mixed or Windows style, start by that.
26492    new_path=`cmd //c echo $path`
26493  fi
26494
26495
26496  input_path="$new_path"
26497  # Check if we need to convert this using DOS-style short mode. If the path
26498  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26499  # take no chances and rewrite it.
26500  # Note: m4 eats our [], so we need to use [ and ] instead.
26501  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26502  if test "x$has_forbidden_chars" != x; then
26503    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26504    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26505  fi
26506
26507
26508  windows_path="$new_path"
26509  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26510    unix_path=`$CYGPATH -u "$windows_path"`
26511    new_path="$unix_path"
26512  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26513    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26514    new_path="$unix_path"
26515  fi
26516
26517  if test "x$path" != "x$new_path"; then
26518    BOOT_JDK="$new_path"
26519    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26520$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26521  fi
26522
26523  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26524  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26525
26526    else
26527      # We're on a unix platform. Hooray! :)
26528      path="$BOOT_JDK"
26529      has_space=`$ECHO "$path" | $GREP " "`
26530      if test "x$has_space" != x; then
26531        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26532$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26533        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26534      fi
26535
26536      # Use eval to expand a potential ~
26537      eval path="$path"
26538      if test ! -f "$path" && test ! -d "$path"; then
26539        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26540      fi
26541
26542      if test -d "$path"; then
26543        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26544      else
26545        dir="`$DIRNAME "$path"`"
26546        base="`$BASENAME "$path"`"
26547        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26548      fi
26549    fi
26550  fi
26551
26552            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26553$as_echo_n "checking for Boot JDK... " >&6; }
26554            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26555$as_echo "$BOOT_JDK" >&6; }
26556            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26557$as_echo_n "checking Boot JDK version... " >&6; }
26558            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26559            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26560$as_echo "$BOOT_JDK_VERSION" >&6; }
26561          fi # end check jdk version
26562        fi # end check javac
26563      fi # end check java
26564    fi # end check boot jdk found
26565  fi
26566
26567
26568  # Test: Is there a JDK installed in default, well-known locations?
26569
26570  if test "x$BOOT_JDK_FOUND" = xno; then
26571    # Now execute the test
26572
26573  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26574
26575  if test "x$BOOT_JDK_FOUND" = xno; then
26576    # Now execute the test
26577
26578  if test "x$ProgramW6432" != x; then
26579    VIRTUAL_DIR="$ProgramW6432/Java"
26580
26581  windows_path="$VIRTUAL_DIR"
26582  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26583    unix_path=`$CYGPATH -u "$windows_path"`
26584    VIRTUAL_DIR="$unix_path"
26585  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26586    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26587    VIRTUAL_DIR="$unix_path"
26588  fi
26589
26590
26591  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26592  BOOT_JDK_SUFFIX=""
26593  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26594  if test "x$ALL_JDKS_FOUND" != x; then
26595    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26596
26597  if test "x$BOOT_JDK_FOUND" = xno; then
26598    # Now execute the test
26599
26600        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26601        if test -d "$BOOT_JDK"; then
26602          BOOT_JDK_FOUND=maybe
26603          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26604$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26605        fi
26606
26607
26608    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26609    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26610      # Do we have a bin/java?
26611      if test ! -x "$BOOT_JDK/bin/java"; then
26612        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26613$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26614        BOOT_JDK_FOUND=no
26615      else
26616        # Do we have a bin/javac?
26617        if test ! -x "$BOOT_JDK/bin/javac"; then
26618          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26619$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26620          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26621$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26622          BOOT_JDK_FOUND=no
26623        else
26624          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26625          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26626
26627          # Extra M4 quote needed to protect [] in grep expression.
26628          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26629          if test "x$FOUND_CORRECT_VERSION" = x; then
26630            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26631$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26632            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26633$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26634            BOOT_JDK_FOUND=no
26635          else
26636            # We're done! :-)
26637            BOOT_JDK_FOUND=yes
26638
26639  # Only process if variable expands to non-empty
26640
26641  if test "x$BOOT_JDK" != x; then
26642    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26643
26644  # Input might be given as Windows format, start by converting to
26645  # unix format.
26646  path="$BOOT_JDK"
26647  new_path=`$CYGPATH -u "$path"`
26648
26649  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26650  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26651  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26652  # "foo.exe" is OK but "foo" is an error.
26653  #
26654  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26655  # It is also a way to make sure we got the proper file name for the real test later on.
26656  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26657  if test "x$test_shortpath" = x; then
26658    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26659$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26660    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26661  fi
26662
26663  # Call helper function which possibly converts this using DOS-style short mode.
26664  # If so, the updated path is stored in $new_path.
26665
26666  input_path="$new_path"
26667  # Check if we need to convert this using DOS-style short mode. If the path
26668  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26669  # take no chances and rewrite it.
26670  # Note: m4 eats our [], so we need to use [ and ] instead.
26671  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26672  if test "x$has_forbidden_chars" != x; then
26673    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26674    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26675    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26676    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26677      # Going to short mode and back again did indeed matter. Since short mode is
26678      # case insensitive, let's make it lowercase to improve readability.
26679      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26680      # Now convert it back to Unix-style (cygpath)
26681      input_path=`$CYGPATH -u "$shortmode_path"`
26682      new_path="$input_path"
26683    fi
26684  fi
26685
26686  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26687  if test "x$test_cygdrive_prefix" = x; then
26688    # As a simple fix, exclude /usr/bin since it's not a real path.
26689    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26690      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26691      # a path prefixed by /cygdrive for fixpath to work.
26692      new_path="$CYGWIN_ROOT_PATH$input_path"
26693    fi
26694  fi
26695
26696
26697  if test "x$path" != "x$new_path"; then
26698    BOOT_JDK="$new_path"
26699    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26700$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26701  fi
26702
26703    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26704
26705  path="$BOOT_JDK"
26706  has_colon=`$ECHO $path | $GREP ^.:`
26707  new_path="$path"
26708  if test "x$has_colon" = x; then
26709    # Not in mixed or Windows style, start by that.
26710    new_path=`cmd //c echo $path`
26711  fi
26712
26713
26714  input_path="$new_path"
26715  # Check if we need to convert this using DOS-style short mode. If the path
26716  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26717  # take no chances and rewrite it.
26718  # Note: m4 eats our [], so we need to use [ and ] instead.
26719  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26720  if test "x$has_forbidden_chars" != x; then
26721    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26722    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26723  fi
26724
26725
26726  windows_path="$new_path"
26727  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26728    unix_path=`$CYGPATH -u "$windows_path"`
26729    new_path="$unix_path"
26730  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26731    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26732    new_path="$unix_path"
26733  fi
26734
26735  if test "x$path" != "x$new_path"; then
26736    BOOT_JDK="$new_path"
26737    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26738$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26739  fi
26740
26741  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26742  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26743
26744    else
26745      # We're on a unix platform. Hooray! :)
26746      path="$BOOT_JDK"
26747      has_space=`$ECHO "$path" | $GREP " "`
26748      if test "x$has_space" != x; then
26749        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26750$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26751        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26752      fi
26753
26754      # Use eval to expand a potential ~
26755      eval path="$path"
26756      if test ! -f "$path" && test ! -d "$path"; then
26757        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26758      fi
26759
26760      if test -d "$path"; then
26761        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26762      else
26763        dir="`$DIRNAME "$path"`"
26764        base="`$BASENAME "$path"`"
26765        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26766      fi
26767    fi
26768  fi
26769
26770            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26771$as_echo_n "checking for Boot JDK... " >&6; }
26772            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26773$as_echo "$BOOT_JDK" >&6; }
26774            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26775$as_echo_n "checking Boot JDK version... " >&6; }
26776            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26777            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26778$as_echo "$BOOT_JDK_VERSION" >&6; }
26779          fi # end check jdk version
26780        fi # end check javac
26781      fi # end check java
26782    fi # end check boot jdk found
26783  fi
26784
26785    done
26786  fi
26787
26788  fi
26789
26790
26791    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26792    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26793      # Do we have a bin/java?
26794      if test ! -x "$BOOT_JDK/bin/java"; then
26795        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26796$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26797        BOOT_JDK_FOUND=no
26798      else
26799        # Do we have a bin/javac?
26800        if test ! -x "$BOOT_JDK/bin/javac"; then
26801          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26802$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26803          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26804$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26805          BOOT_JDK_FOUND=no
26806        else
26807          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26808          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26809
26810          # Extra M4 quote needed to protect [] in grep expression.
26811          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26812          if test "x$FOUND_CORRECT_VERSION" = x; then
26813            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26814$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26815            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26816$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26817            BOOT_JDK_FOUND=no
26818          else
26819            # We're done! :-)
26820            BOOT_JDK_FOUND=yes
26821
26822  # Only process if variable expands to non-empty
26823
26824  if test "x$BOOT_JDK" != x; then
26825    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26826
26827  # Input might be given as Windows format, start by converting to
26828  # unix format.
26829  path="$BOOT_JDK"
26830  new_path=`$CYGPATH -u "$path"`
26831
26832  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26833  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26834  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26835  # "foo.exe" is OK but "foo" is an error.
26836  #
26837  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26838  # It is also a way to make sure we got the proper file name for the real test later on.
26839  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26840  if test "x$test_shortpath" = x; then
26841    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26842$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26843    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26844  fi
26845
26846  # Call helper function which possibly converts this using DOS-style short mode.
26847  # If so, the updated path is stored in $new_path.
26848
26849  input_path="$new_path"
26850  # Check if we need to convert this using DOS-style short mode. If the path
26851  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26852  # take no chances and rewrite it.
26853  # Note: m4 eats our [], so we need to use [ and ] instead.
26854  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26855  if test "x$has_forbidden_chars" != x; then
26856    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26857    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26858    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26859    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26860      # Going to short mode and back again did indeed matter. Since short mode is
26861      # case insensitive, let's make it lowercase to improve readability.
26862      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26863      # Now convert it back to Unix-style (cygpath)
26864      input_path=`$CYGPATH -u "$shortmode_path"`
26865      new_path="$input_path"
26866    fi
26867  fi
26868
26869  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26870  if test "x$test_cygdrive_prefix" = x; then
26871    # As a simple fix, exclude /usr/bin since it's not a real path.
26872    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26873      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26874      # a path prefixed by /cygdrive for fixpath to work.
26875      new_path="$CYGWIN_ROOT_PATH$input_path"
26876    fi
26877  fi
26878
26879
26880  if test "x$path" != "x$new_path"; then
26881    BOOT_JDK="$new_path"
26882    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26883$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26884  fi
26885
26886    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26887
26888  path="$BOOT_JDK"
26889  has_colon=`$ECHO $path | $GREP ^.:`
26890  new_path="$path"
26891  if test "x$has_colon" = x; then
26892    # Not in mixed or Windows style, start by that.
26893    new_path=`cmd //c echo $path`
26894  fi
26895
26896
26897  input_path="$new_path"
26898  # Check if we need to convert this using DOS-style short mode. If the path
26899  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26900  # take no chances and rewrite it.
26901  # Note: m4 eats our [], so we need to use [ and ] instead.
26902  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26903  if test "x$has_forbidden_chars" != x; then
26904    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26905    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26906  fi
26907
26908
26909  windows_path="$new_path"
26910  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26911    unix_path=`$CYGPATH -u "$windows_path"`
26912    new_path="$unix_path"
26913  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26914    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26915    new_path="$unix_path"
26916  fi
26917
26918  if test "x$path" != "x$new_path"; then
26919    BOOT_JDK="$new_path"
26920    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26921$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26922  fi
26923
26924  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26925  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26926
26927    else
26928      # We're on a unix platform. Hooray! :)
26929      path="$BOOT_JDK"
26930      has_space=`$ECHO "$path" | $GREP " "`
26931      if test "x$has_space" != x; then
26932        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26933$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26934        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26935      fi
26936
26937      # Use eval to expand a potential ~
26938      eval path="$path"
26939      if test ! -f "$path" && test ! -d "$path"; then
26940        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26941      fi
26942
26943      if test -d "$path"; then
26944        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26945      else
26946        dir="`$DIRNAME "$path"`"
26947        base="`$BASENAME "$path"`"
26948        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26949      fi
26950    fi
26951  fi
26952
26953            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26954$as_echo_n "checking for Boot JDK... " >&6; }
26955            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26956$as_echo "$BOOT_JDK" >&6; }
26957            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26958$as_echo_n "checking Boot JDK version... " >&6; }
26959            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26960            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26961$as_echo "$BOOT_JDK_VERSION" >&6; }
26962          fi # end check jdk version
26963        fi # end check javac
26964      fi # end check java
26965    fi # end check boot jdk found
26966  fi
26967
26968
26969  if test "x$BOOT_JDK_FOUND" = xno; then
26970    # Now execute the test
26971
26972  if test "x$PROGRAMW6432" != x; then
26973    VIRTUAL_DIR="$PROGRAMW6432/Java"
26974
26975  windows_path="$VIRTUAL_DIR"
26976  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26977    unix_path=`$CYGPATH -u "$windows_path"`
26978    VIRTUAL_DIR="$unix_path"
26979  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26980    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26981    VIRTUAL_DIR="$unix_path"
26982  fi
26983
26984
26985  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26986  BOOT_JDK_SUFFIX=""
26987  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26988  if test "x$ALL_JDKS_FOUND" != x; then
26989    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26990
26991  if test "x$BOOT_JDK_FOUND" = xno; then
26992    # Now execute the test
26993
26994        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26995        if test -d "$BOOT_JDK"; then
26996          BOOT_JDK_FOUND=maybe
26997          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26998$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26999        fi
27000
27001
27002    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27003    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27004      # Do we have a bin/java?
27005      if test ! -x "$BOOT_JDK/bin/java"; then
27006        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27007$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27008        BOOT_JDK_FOUND=no
27009      else
27010        # Do we have a bin/javac?
27011        if test ! -x "$BOOT_JDK/bin/javac"; then
27012          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27013$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27014          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27015$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27016          BOOT_JDK_FOUND=no
27017        else
27018          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27019          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27020
27021          # Extra M4 quote needed to protect [] in grep expression.
27022          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27023          if test "x$FOUND_CORRECT_VERSION" = x; then
27024            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27025$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27026            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27027$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27028            BOOT_JDK_FOUND=no
27029          else
27030            # We're done! :-)
27031            BOOT_JDK_FOUND=yes
27032
27033  # Only process if variable expands to non-empty
27034
27035  if test "x$BOOT_JDK" != x; then
27036    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27037
27038  # Input might be given as Windows format, start by converting to
27039  # unix format.
27040  path="$BOOT_JDK"
27041  new_path=`$CYGPATH -u "$path"`
27042
27043  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27044  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27045  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27046  # "foo.exe" is OK but "foo" is an error.
27047  #
27048  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27049  # It is also a way to make sure we got the proper file name for the real test later on.
27050  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27051  if test "x$test_shortpath" = x; then
27052    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27053$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27054    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27055  fi
27056
27057  # Call helper function which possibly converts this using DOS-style short mode.
27058  # If so, the updated path is stored in $new_path.
27059
27060  input_path="$new_path"
27061  # Check if we need to convert this using DOS-style short mode. If the path
27062  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27063  # take no chances and rewrite it.
27064  # Note: m4 eats our [], so we need to use [ and ] instead.
27065  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27066  if test "x$has_forbidden_chars" != x; then
27067    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27068    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27069    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27070    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27071      # Going to short mode and back again did indeed matter. Since short mode is
27072      # case insensitive, let's make it lowercase to improve readability.
27073      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27074      # Now convert it back to Unix-style (cygpath)
27075      input_path=`$CYGPATH -u "$shortmode_path"`
27076      new_path="$input_path"
27077    fi
27078  fi
27079
27080  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27081  if test "x$test_cygdrive_prefix" = x; then
27082    # As a simple fix, exclude /usr/bin since it's not a real path.
27083    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27084      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27085      # a path prefixed by /cygdrive for fixpath to work.
27086      new_path="$CYGWIN_ROOT_PATH$input_path"
27087    fi
27088  fi
27089
27090
27091  if test "x$path" != "x$new_path"; then
27092    BOOT_JDK="$new_path"
27093    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27094$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27095  fi
27096
27097    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27098
27099  path="$BOOT_JDK"
27100  has_colon=`$ECHO $path | $GREP ^.:`
27101  new_path="$path"
27102  if test "x$has_colon" = x; then
27103    # Not in mixed or Windows style, start by that.
27104    new_path=`cmd //c echo $path`
27105  fi
27106
27107
27108  input_path="$new_path"
27109  # Check if we need to convert this using DOS-style short mode. If the path
27110  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27111  # take no chances and rewrite it.
27112  # Note: m4 eats our [], so we need to use [ and ] instead.
27113  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27114  if test "x$has_forbidden_chars" != x; then
27115    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27116    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27117  fi
27118
27119
27120  windows_path="$new_path"
27121  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27122    unix_path=`$CYGPATH -u "$windows_path"`
27123    new_path="$unix_path"
27124  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27125    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27126    new_path="$unix_path"
27127  fi
27128
27129  if test "x$path" != "x$new_path"; then
27130    BOOT_JDK="$new_path"
27131    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27132$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27133  fi
27134
27135  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27136  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27137
27138    else
27139      # We're on a unix platform. Hooray! :)
27140      path="$BOOT_JDK"
27141      has_space=`$ECHO "$path" | $GREP " "`
27142      if test "x$has_space" != x; then
27143        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27144$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27145        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27146      fi
27147
27148      # Use eval to expand a potential ~
27149      eval path="$path"
27150      if test ! -f "$path" && test ! -d "$path"; then
27151        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27152      fi
27153
27154      if test -d "$path"; then
27155        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27156      else
27157        dir="`$DIRNAME "$path"`"
27158        base="`$BASENAME "$path"`"
27159        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27160      fi
27161    fi
27162  fi
27163
27164            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27165$as_echo_n "checking for Boot JDK... " >&6; }
27166            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27167$as_echo "$BOOT_JDK" >&6; }
27168            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27169$as_echo_n "checking Boot JDK version... " >&6; }
27170            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27171            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27172$as_echo "$BOOT_JDK_VERSION" >&6; }
27173          fi # end check jdk version
27174        fi # end check javac
27175      fi # end check java
27176    fi # end check boot jdk found
27177  fi
27178
27179    done
27180  fi
27181
27182  fi
27183
27184
27185    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27186    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27187      # Do we have a bin/java?
27188      if test ! -x "$BOOT_JDK/bin/java"; then
27189        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27190$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27191        BOOT_JDK_FOUND=no
27192      else
27193        # Do we have a bin/javac?
27194        if test ! -x "$BOOT_JDK/bin/javac"; then
27195          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27196$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27197          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27198$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27199          BOOT_JDK_FOUND=no
27200        else
27201          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27202          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27203
27204          # Extra M4 quote needed to protect [] in grep expression.
27205          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27206          if test "x$FOUND_CORRECT_VERSION" = x; then
27207            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27208$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27209            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27210$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27211            BOOT_JDK_FOUND=no
27212          else
27213            # We're done! :-)
27214            BOOT_JDK_FOUND=yes
27215
27216  # Only process if variable expands to non-empty
27217
27218  if test "x$BOOT_JDK" != x; then
27219    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27220
27221  # Input might be given as Windows format, start by converting to
27222  # unix format.
27223  path="$BOOT_JDK"
27224  new_path=`$CYGPATH -u "$path"`
27225
27226  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27227  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27228  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27229  # "foo.exe" is OK but "foo" is an error.
27230  #
27231  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27232  # It is also a way to make sure we got the proper file name for the real test later on.
27233  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27234  if test "x$test_shortpath" = x; then
27235    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27236$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27237    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27238  fi
27239
27240  # Call helper function which possibly converts this using DOS-style short mode.
27241  # If so, the updated path is stored in $new_path.
27242
27243  input_path="$new_path"
27244  # Check if we need to convert this using DOS-style short mode. If the path
27245  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27246  # take no chances and rewrite it.
27247  # Note: m4 eats our [], so we need to use [ and ] instead.
27248  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27249  if test "x$has_forbidden_chars" != x; then
27250    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27251    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27252    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27253    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27254      # Going to short mode and back again did indeed matter. Since short mode is
27255      # case insensitive, let's make it lowercase to improve readability.
27256      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27257      # Now convert it back to Unix-style (cygpath)
27258      input_path=`$CYGPATH -u "$shortmode_path"`
27259      new_path="$input_path"
27260    fi
27261  fi
27262
27263  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27264  if test "x$test_cygdrive_prefix" = x; then
27265    # As a simple fix, exclude /usr/bin since it's not a real path.
27266    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27267      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27268      # a path prefixed by /cygdrive for fixpath to work.
27269      new_path="$CYGWIN_ROOT_PATH$input_path"
27270    fi
27271  fi
27272
27273
27274  if test "x$path" != "x$new_path"; then
27275    BOOT_JDK="$new_path"
27276    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27277$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27278  fi
27279
27280    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27281
27282  path="$BOOT_JDK"
27283  has_colon=`$ECHO $path | $GREP ^.:`
27284  new_path="$path"
27285  if test "x$has_colon" = x; then
27286    # Not in mixed or Windows style, start by that.
27287    new_path=`cmd //c echo $path`
27288  fi
27289
27290
27291  input_path="$new_path"
27292  # Check if we need to convert this using DOS-style short mode. If the path
27293  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27294  # take no chances and rewrite it.
27295  # Note: m4 eats our [], so we need to use [ and ] instead.
27296  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27297  if test "x$has_forbidden_chars" != x; then
27298    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27299    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27300  fi
27301
27302
27303  windows_path="$new_path"
27304  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27305    unix_path=`$CYGPATH -u "$windows_path"`
27306    new_path="$unix_path"
27307  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27308    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27309    new_path="$unix_path"
27310  fi
27311
27312  if test "x$path" != "x$new_path"; then
27313    BOOT_JDK="$new_path"
27314    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27315$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27316  fi
27317
27318  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27319  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27320
27321    else
27322      # We're on a unix platform. Hooray! :)
27323      path="$BOOT_JDK"
27324      has_space=`$ECHO "$path" | $GREP " "`
27325      if test "x$has_space" != x; then
27326        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27327$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27328        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27329      fi
27330
27331      # Use eval to expand a potential ~
27332      eval path="$path"
27333      if test ! -f "$path" && test ! -d "$path"; then
27334        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27335      fi
27336
27337      if test -d "$path"; then
27338        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27339      else
27340        dir="`$DIRNAME "$path"`"
27341        base="`$BASENAME "$path"`"
27342        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27343      fi
27344    fi
27345  fi
27346
27347            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27348$as_echo_n "checking for Boot JDK... " >&6; }
27349            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27350$as_echo "$BOOT_JDK" >&6; }
27351            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27352$as_echo_n "checking Boot JDK version... " >&6; }
27353            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27354            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27355$as_echo "$BOOT_JDK_VERSION" >&6; }
27356          fi # end check jdk version
27357        fi # end check javac
27358      fi # end check java
27359    fi # end check boot jdk found
27360  fi
27361
27362
27363  if test "x$BOOT_JDK_FOUND" = xno; then
27364    # Now execute the test
27365
27366  if test "x$PROGRAMFILES" != x; then
27367    VIRTUAL_DIR="$PROGRAMFILES/Java"
27368
27369  windows_path="$VIRTUAL_DIR"
27370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27371    unix_path=`$CYGPATH -u "$windows_path"`
27372    VIRTUAL_DIR="$unix_path"
27373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27374    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27375    VIRTUAL_DIR="$unix_path"
27376  fi
27377
27378
27379  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27380  BOOT_JDK_SUFFIX=""
27381  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27382  if test "x$ALL_JDKS_FOUND" != x; then
27383    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27384
27385  if test "x$BOOT_JDK_FOUND" = xno; then
27386    # Now execute the test
27387
27388        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27389        if test -d "$BOOT_JDK"; then
27390          BOOT_JDK_FOUND=maybe
27391          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27392$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27393        fi
27394
27395
27396    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27397    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27398      # Do we have a bin/java?
27399      if test ! -x "$BOOT_JDK/bin/java"; then
27400        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27401$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27402        BOOT_JDK_FOUND=no
27403      else
27404        # Do we have a bin/javac?
27405        if test ! -x "$BOOT_JDK/bin/javac"; then
27406          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27407$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27408          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27409$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27410          BOOT_JDK_FOUND=no
27411        else
27412          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27413          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27414
27415          # Extra M4 quote needed to protect [] in grep expression.
27416          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27417          if test "x$FOUND_CORRECT_VERSION" = x; then
27418            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27419$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27420            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27421$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27422            BOOT_JDK_FOUND=no
27423          else
27424            # We're done! :-)
27425            BOOT_JDK_FOUND=yes
27426
27427  # Only process if variable expands to non-empty
27428
27429  if test "x$BOOT_JDK" != x; then
27430    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27431
27432  # Input might be given as Windows format, start by converting to
27433  # unix format.
27434  path="$BOOT_JDK"
27435  new_path=`$CYGPATH -u "$path"`
27436
27437  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27438  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27439  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27440  # "foo.exe" is OK but "foo" is an error.
27441  #
27442  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27443  # It is also a way to make sure we got the proper file name for the real test later on.
27444  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27445  if test "x$test_shortpath" = x; then
27446    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27447$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27448    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27449  fi
27450
27451  # Call helper function which possibly converts this using DOS-style short mode.
27452  # If so, the updated path is stored in $new_path.
27453
27454  input_path="$new_path"
27455  # Check if we need to convert this using DOS-style short mode. If the path
27456  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27457  # take no chances and rewrite it.
27458  # Note: m4 eats our [], so we need to use [ and ] instead.
27459  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27460  if test "x$has_forbidden_chars" != x; then
27461    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27462    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27463    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27464    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27465      # Going to short mode and back again did indeed matter. Since short mode is
27466      # case insensitive, let's make it lowercase to improve readability.
27467      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27468      # Now convert it back to Unix-style (cygpath)
27469      input_path=`$CYGPATH -u "$shortmode_path"`
27470      new_path="$input_path"
27471    fi
27472  fi
27473
27474  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27475  if test "x$test_cygdrive_prefix" = x; then
27476    # As a simple fix, exclude /usr/bin since it's not a real path.
27477    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27478      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27479      # a path prefixed by /cygdrive for fixpath to work.
27480      new_path="$CYGWIN_ROOT_PATH$input_path"
27481    fi
27482  fi
27483
27484
27485  if test "x$path" != "x$new_path"; then
27486    BOOT_JDK="$new_path"
27487    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27488$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27489  fi
27490
27491    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27492
27493  path="$BOOT_JDK"
27494  has_colon=`$ECHO $path | $GREP ^.:`
27495  new_path="$path"
27496  if test "x$has_colon" = x; then
27497    # Not in mixed or Windows style, start by that.
27498    new_path=`cmd //c echo $path`
27499  fi
27500
27501
27502  input_path="$new_path"
27503  # Check if we need to convert this using DOS-style short mode. If the path
27504  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27505  # take no chances and rewrite it.
27506  # Note: m4 eats our [], so we need to use [ and ] instead.
27507  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27508  if test "x$has_forbidden_chars" != x; then
27509    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27510    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27511  fi
27512
27513
27514  windows_path="$new_path"
27515  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27516    unix_path=`$CYGPATH -u "$windows_path"`
27517    new_path="$unix_path"
27518  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27519    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27520    new_path="$unix_path"
27521  fi
27522
27523  if test "x$path" != "x$new_path"; then
27524    BOOT_JDK="$new_path"
27525    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27526$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27527  fi
27528
27529  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27530  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27531
27532    else
27533      # We're on a unix platform. Hooray! :)
27534      path="$BOOT_JDK"
27535      has_space=`$ECHO "$path" | $GREP " "`
27536      if test "x$has_space" != x; then
27537        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27538$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27539        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27540      fi
27541
27542      # Use eval to expand a potential ~
27543      eval path="$path"
27544      if test ! -f "$path" && test ! -d "$path"; then
27545        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27546      fi
27547
27548      if test -d "$path"; then
27549        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27550      else
27551        dir="`$DIRNAME "$path"`"
27552        base="`$BASENAME "$path"`"
27553        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27554      fi
27555    fi
27556  fi
27557
27558            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27559$as_echo_n "checking for Boot JDK... " >&6; }
27560            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27561$as_echo "$BOOT_JDK" >&6; }
27562            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27563$as_echo_n "checking Boot JDK version... " >&6; }
27564            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27565            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27566$as_echo "$BOOT_JDK_VERSION" >&6; }
27567          fi # end check jdk version
27568        fi # end check javac
27569      fi # end check java
27570    fi # end check boot jdk found
27571  fi
27572
27573    done
27574  fi
27575
27576  fi
27577
27578
27579    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27580    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27581      # Do we have a bin/java?
27582      if test ! -x "$BOOT_JDK/bin/java"; then
27583        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27584$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27585        BOOT_JDK_FOUND=no
27586      else
27587        # Do we have a bin/javac?
27588        if test ! -x "$BOOT_JDK/bin/javac"; then
27589          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27590$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27591          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27592$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27593          BOOT_JDK_FOUND=no
27594        else
27595          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27596          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27597
27598          # Extra M4 quote needed to protect [] in grep expression.
27599          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27600          if test "x$FOUND_CORRECT_VERSION" = x; then
27601            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27602$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27603            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27604$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27605            BOOT_JDK_FOUND=no
27606          else
27607            # We're done! :-)
27608            BOOT_JDK_FOUND=yes
27609
27610  # Only process if variable expands to non-empty
27611
27612  if test "x$BOOT_JDK" != x; then
27613    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27614
27615  # Input might be given as Windows format, start by converting to
27616  # unix format.
27617  path="$BOOT_JDK"
27618  new_path=`$CYGPATH -u "$path"`
27619
27620  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27621  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27622  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27623  # "foo.exe" is OK but "foo" is an error.
27624  #
27625  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27626  # It is also a way to make sure we got the proper file name for the real test later on.
27627  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27628  if test "x$test_shortpath" = x; then
27629    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27630$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27631    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27632  fi
27633
27634  # Call helper function which possibly converts this using DOS-style short mode.
27635  # If so, the updated path is stored in $new_path.
27636
27637  input_path="$new_path"
27638  # Check if we need to convert this using DOS-style short mode. If the path
27639  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27640  # take no chances and rewrite it.
27641  # Note: m4 eats our [], so we need to use [ and ] instead.
27642  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27643  if test "x$has_forbidden_chars" != x; then
27644    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27645    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27646    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27647    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27648      # Going to short mode and back again did indeed matter. Since short mode is
27649      # case insensitive, let's make it lowercase to improve readability.
27650      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27651      # Now convert it back to Unix-style (cygpath)
27652      input_path=`$CYGPATH -u "$shortmode_path"`
27653      new_path="$input_path"
27654    fi
27655  fi
27656
27657  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27658  if test "x$test_cygdrive_prefix" = x; then
27659    # As a simple fix, exclude /usr/bin since it's not a real path.
27660    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27661      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27662      # a path prefixed by /cygdrive for fixpath to work.
27663      new_path="$CYGWIN_ROOT_PATH$input_path"
27664    fi
27665  fi
27666
27667
27668  if test "x$path" != "x$new_path"; then
27669    BOOT_JDK="$new_path"
27670    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27671$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27672  fi
27673
27674    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27675
27676  path="$BOOT_JDK"
27677  has_colon=`$ECHO $path | $GREP ^.:`
27678  new_path="$path"
27679  if test "x$has_colon" = x; then
27680    # Not in mixed or Windows style, start by that.
27681    new_path=`cmd //c echo $path`
27682  fi
27683
27684
27685  input_path="$new_path"
27686  # Check if we need to convert this using DOS-style short mode. If the path
27687  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27688  # take no chances and rewrite it.
27689  # Note: m4 eats our [], so we need to use [ and ] instead.
27690  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27691  if test "x$has_forbidden_chars" != x; then
27692    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27693    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27694  fi
27695
27696
27697  windows_path="$new_path"
27698  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27699    unix_path=`$CYGPATH -u "$windows_path"`
27700    new_path="$unix_path"
27701  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27702    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27703    new_path="$unix_path"
27704  fi
27705
27706  if test "x$path" != "x$new_path"; then
27707    BOOT_JDK="$new_path"
27708    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27709$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27710  fi
27711
27712  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27713  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27714
27715    else
27716      # We're on a unix platform. Hooray! :)
27717      path="$BOOT_JDK"
27718      has_space=`$ECHO "$path" | $GREP " "`
27719      if test "x$has_space" != x; then
27720        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27721$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27722        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27723      fi
27724
27725      # Use eval to expand a potential ~
27726      eval path="$path"
27727      if test ! -f "$path" && test ! -d "$path"; then
27728        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27729      fi
27730
27731      if test -d "$path"; then
27732        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27733      else
27734        dir="`$DIRNAME "$path"`"
27735        base="`$BASENAME "$path"`"
27736        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27737      fi
27738    fi
27739  fi
27740
27741            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27742$as_echo_n "checking for Boot JDK... " >&6; }
27743            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27744$as_echo "$BOOT_JDK" >&6; }
27745            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27746$as_echo_n "checking Boot JDK version... " >&6; }
27747            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27748            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27749$as_echo "$BOOT_JDK_VERSION" >&6; }
27750          fi # end check jdk version
27751        fi # end check javac
27752      fi # end check java
27753    fi # end check boot jdk found
27754  fi
27755
27756
27757  if test "x$BOOT_JDK_FOUND" = xno; then
27758    # Now execute the test
27759
27760  if test "x$ProgramFiles" != x; then
27761    VIRTUAL_DIR="$ProgramFiles/Java"
27762
27763  windows_path="$VIRTUAL_DIR"
27764  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27765    unix_path=`$CYGPATH -u "$windows_path"`
27766    VIRTUAL_DIR="$unix_path"
27767  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27768    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27769    VIRTUAL_DIR="$unix_path"
27770  fi
27771
27772
27773  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27774  BOOT_JDK_SUFFIX=""
27775  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27776  if test "x$ALL_JDKS_FOUND" != x; then
27777    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27778
27779  if test "x$BOOT_JDK_FOUND" = xno; then
27780    # Now execute the test
27781
27782        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27783        if test -d "$BOOT_JDK"; then
27784          BOOT_JDK_FOUND=maybe
27785          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27786$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27787        fi
27788
27789
27790    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27791    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27792      # Do we have a bin/java?
27793      if test ! -x "$BOOT_JDK/bin/java"; then
27794        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27795$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27796        BOOT_JDK_FOUND=no
27797      else
27798        # Do we have a bin/javac?
27799        if test ! -x "$BOOT_JDK/bin/javac"; then
27800          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27801$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27802          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27803$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27804          BOOT_JDK_FOUND=no
27805        else
27806          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27807          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27808
27809          # Extra M4 quote needed to protect [] in grep expression.
27810          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27811          if test "x$FOUND_CORRECT_VERSION" = x; then
27812            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27813$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27814            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27815$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27816            BOOT_JDK_FOUND=no
27817          else
27818            # We're done! :-)
27819            BOOT_JDK_FOUND=yes
27820
27821  # Only process if variable expands to non-empty
27822
27823  if test "x$BOOT_JDK" != x; then
27824    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27825
27826  # Input might be given as Windows format, start by converting to
27827  # unix format.
27828  path="$BOOT_JDK"
27829  new_path=`$CYGPATH -u "$path"`
27830
27831  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27832  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27833  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27834  # "foo.exe" is OK but "foo" is an error.
27835  #
27836  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27837  # It is also a way to make sure we got the proper file name for the real test later on.
27838  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27839  if test "x$test_shortpath" = x; then
27840    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27841$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27842    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27843  fi
27844
27845  # Call helper function which possibly converts this using DOS-style short mode.
27846  # If so, the updated path is stored in $new_path.
27847
27848  input_path="$new_path"
27849  # Check if we need to convert this using DOS-style short mode. If the path
27850  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27851  # take no chances and rewrite it.
27852  # Note: m4 eats our [], so we need to use [ and ] instead.
27853  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27854  if test "x$has_forbidden_chars" != x; then
27855    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27856    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27857    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27858    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27859      # Going to short mode and back again did indeed matter. Since short mode is
27860      # case insensitive, let's make it lowercase to improve readability.
27861      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27862      # Now convert it back to Unix-style (cygpath)
27863      input_path=`$CYGPATH -u "$shortmode_path"`
27864      new_path="$input_path"
27865    fi
27866  fi
27867
27868  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27869  if test "x$test_cygdrive_prefix" = x; then
27870    # As a simple fix, exclude /usr/bin since it's not a real path.
27871    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27872      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27873      # a path prefixed by /cygdrive for fixpath to work.
27874      new_path="$CYGWIN_ROOT_PATH$input_path"
27875    fi
27876  fi
27877
27878
27879  if test "x$path" != "x$new_path"; then
27880    BOOT_JDK="$new_path"
27881    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27882$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27883  fi
27884
27885    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27886
27887  path="$BOOT_JDK"
27888  has_colon=`$ECHO $path | $GREP ^.:`
27889  new_path="$path"
27890  if test "x$has_colon" = x; then
27891    # Not in mixed or Windows style, start by that.
27892    new_path=`cmd //c echo $path`
27893  fi
27894
27895
27896  input_path="$new_path"
27897  # Check if we need to convert this using DOS-style short mode. If the path
27898  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27899  # take no chances and rewrite it.
27900  # Note: m4 eats our [], so we need to use [ and ] instead.
27901  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27902  if test "x$has_forbidden_chars" != x; then
27903    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27904    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27905  fi
27906
27907
27908  windows_path="$new_path"
27909  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27910    unix_path=`$CYGPATH -u "$windows_path"`
27911    new_path="$unix_path"
27912  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27913    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27914    new_path="$unix_path"
27915  fi
27916
27917  if test "x$path" != "x$new_path"; then
27918    BOOT_JDK="$new_path"
27919    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27920$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27921  fi
27922
27923  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27924  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27925
27926    else
27927      # We're on a unix platform. Hooray! :)
27928      path="$BOOT_JDK"
27929      has_space=`$ECHO "$path" | $GREP " "`
27930      if test "x$has_space" != x; then
27931        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27932$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27933        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27934      fi
27935
27936      # Use eval to expand a potential ~
27937      eval path="$path"
27938      if test ! -f "$path" && test ! -d "$path"; then
27939        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27940      fi
27941
27942      if test -d "$path"; then
27943        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27944      else
27945        dir="`$DIRNAME "$path"`"
27946        base="`$BASENAME "$path"`"
27947        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27948      fi
27949    fi
27950  fi
27951
27952            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27953$as_echo_n "checking for Boot JDK... " >&6; }
27954            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27955$as_echo "$BOOT_JDK" >&6; }
27956            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27957$as_echo_n "checking Boot JDK version... " >&6; }
27958            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27959            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27960$as_echo "$BOOT_JDK_VERSION" >&6; }
27961          fi # end check jdk version
27962        fi # end check javac
27963      fi # end check java
27964    fi # end check boot jdk found
27965  fi
27966
27967    done
27968  fi
27969
27970  fi
27971
27972
27973    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27974    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27975      # Do we have a bin/java?
27976      if test ! -x "$BOOT_JDK/bin/java"; then
27977        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27978$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27979        BOOT_JDK_FOUND=no
27980      else
27981        # Do we have a bin/javac?
27982        if test ! -x "$BOOT_JDK/bin/javac"; then
27983          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27984$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27985          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27986$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27987          BOOT_JDK_FOUND=no
27988        else
27989          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27990          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27991
27992          # Extra M4 quote needed to protect [] in grep expression.
27993          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27994          if test "x$FOUND_CORRECT_VERSION" = x; then
27995            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27996$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27997            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27998$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27999            BOOT_JDK_FOUND=no
28000          else
28001            # We're done! :-)
28002            BOOT_JDK_FOUND=yes
28003
28004  # Only process if variable expands to non-empty
28005
28006  if test "x$BOOT_JDK" != x; then
28007    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28008
28009  # Input might be given as Windows format, start by converting to
28010  # unix format.
28011  path="$BOOT_JDK"
28012  new_path=`$CYGPATH -u "$path"`
28013
28014  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28015  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28016  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28017  # "foo.exe" is OK but "foo" is an error.
28018  #
28019  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28020  # It is also a way to make sure we got the proper file name for the real test later on.
28021  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28022  if test "x$test_shortpath" = x; then
28023    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28024$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28025    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28026  fi
28027
28028  # Call helper function which possibly converts this using DOS-style short mode.
28029  # If so, the updated path is stored in $new_path.
28030
28031  input_path="$new_path"
28032  # Check if we need to convert this using DOS-style short mode. If the path
28033  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28034  # take no chances and rewrite it.
28035  # Note: m4 eats our [], so we need to use [ and ] instead.
28036  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28037  if test "x$has_forbidden_chars" != x; then
28038    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28039    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28040    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28041    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28042      # Going to short mode and back again did indeed matter. Since short mode is
28043      # case insensitive, let's make it lowercase to improve readability.
28044      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28045      # Now convert it back to Unix-style (cygpath)
28046      input_path=`$CYGPATH -u "$shortmode_path"`
28047      new_path="$input_path"
28048    fi
28049  fi
28050
28051  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28052  if test "x$test_cygdrive_prefix" = x; then
28053    # As a simple fix, exclude /usr/bin since it's not a real path.
28054    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28055      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28056      # a path prefixed by /cygdrive for fixpath to work.
28057      new_path="$CYGWIN_ROOT_PATH$input_path"
28058    fi
28059  fi
28060
28061
28062  if test "x$path" != "x$new_path"; then
28063    BOOT_JDK="$new_path"
28064    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28065$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28066  fi
28067
28068    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28069
28070  path="$BOOT_JDK"
28071  has_colon=`$ECHO $path | $GREP ^.:`
28072  new_path="$path"
28073  if test "x$has_colon" = x; then
28074    # Not in mixed or Windows style, start by that.
28075    new_path=`cmd //c echo $path`
28076  fi
28077
28078
28079  input_path="$new_path"
28080  # Check if we need to convert this using DOS-style short mode. If the path
28081  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28082  # take no chances and rewrite it.
28083  # Note: m4 eats our [], so we need to use [ and ] instead.
28084  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28085  if test "x$has_forbidden_chars" != x; then
28086    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28087    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28088  fi
28089
28090
28091  windows_path="$new_path"
28092  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28093    unix_path=`$CYGPATH -u "$windows_path"`
28094    new_path="$unix_path"
28095  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28096    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28097    new_path="$unix_path"
28098  fi
28099
28100  if test "x$path" != "x$new_path"; then
28101    BOOT_JDK="$new_path"
28102    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28103$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28104  fi
28105
28106  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28107  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28108
28109    else
28110      # We're on a unix platform. Hooray! :)
28111      path="$BOOT_JDK"
28112      has_space=`$ECHO "$path" | $GREP " "`
28113      if test "x$has_space" != x; then
28114        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28115$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28116        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28117      fi
28118
28119      # Use eval to expand a potential ~
28120      eval path="$path"
28121      if test ! -f "$path" && test ! -d "$path"; then
28122        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28123      fi
28124
28125      if test -d "$path"; then
28126        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28127      else
28128        dir="`$DIRNAME "$path"`"
28129        base="`$BASENAME "$path"`"
28130        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28131      fi
28132    fi
28133  fi
28134
28135            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28136$as_echo_n "checking for Boot JDK... " >&6; }
28137            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28138$as_echo "$BOOT_JDK" >&6; }
28139            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28140$as_echo_n "checking Boot JDK version... " >&6; }
28141            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28142            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28143$as_echo "$BOOT_JDK_VERSION" >&6; }
28144          fi # end check jdk version
28145        fi # end check javac
28146      fi # end check java
28147    fi # end check boot jdk found
28148  fi
28149
28150
28151  if test "x$BOOT_JDK_FOUND" = xno; then
28152    # Now execute the test
28153
28154  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
28155  BOOT_JDK_SUFFIX=""
28156  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28157  if test "x$ALL_JDKS_FOUND" != x; then
28158    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28159
28160  if test "x$BOOT_JDK_FOUND" = xno; then
28161    # Now execute the test
28162
28163        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28164        if test -d "$BOOT_JDK"; then
28165          BOOT_JDK_FOUND=maybe
28166          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28167$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28168        fi
28169
28170
28171    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28172    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28173      # Do we have a bin/java?
28174      if test ! -x "$BOOT_JDK/bin/java"; then
28175        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28176$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28177        BOOT_JDK_FOUND=no
28178      else
28179        # Do we have a bin/javac?
28180        if test ! -x "$BOOT_JDK/bin/javac"; then
28181          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28182$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28183          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28184$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28185          BOOT_JDK_FOUND=no
28186        else
28187          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28188          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28189
28190          # Extra M4 quote needed to protect [] in grep expression.
28191          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28192          if test "x$FOUND_CORRECT_VERSION" = x; then
28193            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28194$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28195            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28196$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28197            BOOT_JDK_FOUND=no
28198          else
28199            # We're done! :-)
28200            BOOT_JDK_FOUND=yes
28201
28202  # Only process if variable expands to non-empty
28203
28204  if test "x$BOOT_JDK" != x; then
28205    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28206
28207  # Input might be given as Windows format, start by converting to
28208  # unix format.
28209  path="$BOOT_JDK"
28210  new_path=`$CYGPATH -u "$path"`
28211
28212  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28213  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28214  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28215  # "foo.exe" is OK but "foo" is an error.
28216  #
28217  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28218  # It is also a way to make sure we got the proper file name for the real test later on.
28219  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28220  if test "x$test_shortpath" = x; then
28221    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28222$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28223    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28224  fi
28225
28226  # Call helper function which possibly converts this using DOS-style short mode.
28227  # If so, the updated path is stored in $new_path.
28228
28229  input_path="$new_path"
28230  # Check if we need to convert this using DOS-style short mode. If the path
28231  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28232  # take no chances and rewrite it.
28233  # Note: m4 eats our [], so we need to use [ and ] instead.
28234  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28235  if test "x$has_forbidden_chars" != x; then
28236    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28237    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28238    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28239    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28240      # Going to short mode and back again did indeed matter. Since short mode is
28241      # case insensitive, let's make it lowercase to improve readability.
28242      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28243      # Now convert it back to Unix-style (cygpath)
28244      input_path=`$CYGPATH -u "$shortmode_path"`
28245      new_path="$input_path"
28246    fi
28247  fi
28248
28249  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28250  if test "x$test_cygdrive_prefix" = x; then
28251    # As a simple fix, exclude /usr/bin since it's not a real path.
28252    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28253      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28254      # a path prefixed by /cygdrive for fixpath to work.
28255      new_path="$CYGWIN_ROOT_PATH$input_path"
28256    fi
28257  fi
28258
28259
28260  if test "x$path" != "x$new_path"; then
28261    BOOT_JDK="$new_path"
28262    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28263$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28264  fi
28265
28266    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28267
28268  path="$BOOT_JDK"
28269  has_colon=`$ECHO $path | $GREP ^.:`
28270  new_path="$path"
28271  if test "x$has_colon" = x; then
28272    # Not in mixed or Windows style, start by that.
28273    new_path=`cmd //c echo $path`
28274  fi
28275
28276
28277  input_path="$new_path"
28278  # Check if we need to convert this using DOS-style short mode. If the path
28279  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28280  # take no chances and rewrite it.
28281  # Note: m4 eats our [], so we need to use [ and ] instead.
28282  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28283  if test "x$has_forbidden_chars" != x; then
28284    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28285    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28286  fi
28287
28288
28289  windows_path="$new_path"
28290  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28291    unix_path=`$CYGPATH -u "$windows_path"`
28292    new_path="$unix_path"
28293  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28294    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28295    new_path="$unix_path"
28296  fi
28297
28298  if test "x$path" != "x$new_path"; then
28299    BOOT_JDK="$new_path"
28300    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28301$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28302  fi
28303
28304  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28305  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28306
28307    else
28308      # We're on a unix platform. Hooray! :)
28309      path="$BOOT_JDK"
28310      has_space=`$ECHO "$path" | $GREP " "`
28311      if test "x$has_space" != x; then
28312        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28313$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28314        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28315      fi
28316
28317      # Use eval to expand a potential ~
28318      eval path="$path"
28319      if test ! -f "$path" && test ! -d "$path"; then
28320        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28321      fi
28322
28323      if test -d "$path"; then
28324        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28325      else
28326        dir="`$DIRNAME "$path"`"
28327        base="`$BASENAME "$path"`"
28328        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28329      fi
28330    fi
28331  fi
28332
28333            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28334$as_echo_n "checking for Boot JDK... " >&6; }
28335            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28336$as_echo "$BOOT_JDK" >&6; }
28337            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28338$as_echo_n "checking Boot JDK version... " >&6; }
28339            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28340            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28341$as_echo "$BOOT_JDK_VERSION" >&6; }
28342          fi # end check jdk version
28343        fi # end check javac
28344      fi # end check java
28345    fi # end check boot jdk found
28346  fi
28347
28348    done
28349  fi
28350
28351
28352    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28353    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28354      # Do we have a bin/java?
28355      if test ! -x "$BOOT_JDK/bin/java"; then
28356        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28357$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28358        BOOT_JDK_FOUND=no
28359      else
28360        # Do we have a bin/javac?
28361        if test ! -x "$BOOT_JDK/bin/javac"; then
28362          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28363$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28364          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28365$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28366          BOOT_JDK_FOUND=no
28367        else
28368          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28369          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28370
28371          # Extra M4 quote needed to protect [] in grep expression.
28372          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28373          if test "x$FOUND_CORRECT_VERSION" = x; then
28374            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28375$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28376            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28377$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28378            BOOT_JDK_FOUND=no
28379          else
28380            # We're done! :-)
28381            BOOT_JDK_FOUND=yes
28382
28383  # Only process if variable expands to non-empty
28384
28385  if test "x$BOOT_JDK" != x; then
28386    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28387
28388  # Input might be given as Windows format, start by converting to
28389  # unix format.
28390  path="$BOOT_JDK"
28391  new_path=`$CYGPATH -u "$path"`
28392
28393  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28394  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28395  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28396  # "foo.exe" is OK but "foo" is an error.
28397  #
28398  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28399  # It is also a way to make sure we got the proper file name for the real test later on.
28400  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28401  if test "x$test_shortpath" = x; then
28402    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28403$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28404    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28405  fi
28406
28407  # Call helper function which possibly converts this using DOS-style short mode.
28408  # If so, the updated path is stored in $new_path.
28409
28410  input_path="$new_path"
28411  # Check if we need to convert this using DOS-style short mode. If the path
28412  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28413  # take no chances and rewrite it.
28414  # Note: m4 eats our [], so we need to use [ and ] instead.
28415  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28416  if test "x$has_forbidden_chars" != x; then
28417    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28418    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28419    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28420    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28421      # Going to short mode and back again did indeed matter. Since short mode is
28422      # case insensitive, let's make it lowercase to improve readability.
28423      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28424      # Now convert it back to Unix-style (cygpath)
28425      input_path=`$CYGPATH -u "$shortmode_path"`
28426      new_path="$input_path"
28427    fi
28428  fi
28429
28430  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28431  if test "x$test_cygdrive_prefix" = x; then
28432    # As a simple fix, exclude /usr/bin since it's not a real path.
28433    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28434      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28435      # a path prefixed by /cygdrive for fixpath to work.
28436      new_path="$CYGWIN_ROOT_PATH$input_path"
28437    fi
28438  fi
28439
28440
28441  if test "x$path" != "x$new_path"; then
28442    BOOT_JDK="$new_path"
28443    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28444$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28445  fi
28446
28447    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28448
28449  path="$BOOT_JDK"
28450  has_colon=`$ECHO $path | $GREP ^.:`
28451  new_path="$path"
28452  if test "x$has_colon" = x; then
28453    # Not in mixed or Windows style, start by that.
28454    new_path=`cmd //c echo $path`
28455  fi
28456
28457
28458  input_path="$new_path"
28459  # Check if we need to convert this using DOS-style short mode. If the path
28460  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28461  # take no chances and rewrite it.
28462  # Note: m4 eats our [], so we need to use [ and ] instead.
28463  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28464  if test "x$has_forbidden_chars" != x; then
28465    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28466    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28467  fi
28468
28469
28470  windows_path="$new_path"
28471  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28472    unix_path=`$CYGPATH -u "$windows_path"`
28473    new_path="$unix_path"
28474  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28475    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28476    new_path="$unix_path"
28477  fi
28478
28479  if test "x$path" != "x$new_path"; then
28480    BOOT_JDK="$new_path"
28481    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28482$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28483  fi
28484
28485  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28486  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28487
28488    else
28489      # We're on a unix platform. Hooray! :)
28490      path="$BOOT_JDK"
28491      has_space=`$ECHO "$path" | $GREP " "`
28492      if test "x$has_space" != x; then
28493        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28494$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28495        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28496      fi
28497
28498      # Use eval to expand a potential ~
28499      eval path="$path"
28500      if test ! -f "$path" && test ! -d "$path"; then
28501        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28502      fi
28503
28504      if test -d "$path"; then
28505        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28506      else
28507        dir="`$DIRNAME "$path"`"
28508        base="`$BASENAME "$path"`"
28509        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28510      fi
28511    fi
28512  fi
28513
28514            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28515$as_echo_n "checking for Boot JDK... " >&6; }
28516            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28517$as_echo "$BOOT_JDK" >&6; }
28518            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28519$as_echo_n "checking Boot JDK version... " >&6; }
28520            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28521            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28522$as_echo "$BOOT_JDK_VERSION" >&6; }
28523          fi # end check jdk version
28524        fi # end check javac
28525      fi # end check java
28526    fi # end check boot jdk found
28527  fi
28528
28529  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
28530
28531  if test "x$BOOT_JDK_FOUND" = xno; then
28532    # Now execute the test
28533
28534  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
28535  BOOT_JDK_SUFFIX="/Contents/Home"
28536  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28537  if test "x$ALL_JDKS_FOUND" != x; then
28538    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28539
28540  if test "x$BOOT_JDK_FOUND" = xno; then
28541    # Now execute the test
28542
28543        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28544        if test -d "$BOOT_JDK"; then
28545          BOOT_JDK_FOUND=maybe
28546          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28547$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28548        fi
28549
28550
28551    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28552    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28553      # Do we have a bin/java?
28554      if test ! -x "$BOOT_JDK/bin/java"; then
28555        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28556$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28557        BOOT_JDK_FOUND=no
28558      else
28559        # Do we have a bin/javac?
28560        if test ! -x "$BOOT_JDK/bin/javac"; then
28561          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28562$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28563          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28564$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28565          BOOT_JDK_FOUND=no
28566        else
28567          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28568          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28569
28570          # Extra M4 quote needed to protect [] in grep expression.
28571          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28572          if test "x$FOUND_CORRECT_VERSION" = x; then
28573            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28574$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28575            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28576$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28577            BOOT_JDK_FOUND=no
28578          else
28579            # We're done! :-)
28580            BOOT_JDK_FOUND=yes
28581
28582  # Only process if variable expands to non-empty
28583
28584  if test "x$BOOT_JDK" != x; then
28585    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28586
28587  # Input might be given as Windows format, start by converting to
28588  # unix format.
28589  path="$BOOT_JDK"
28590  new_path=`$CYGPATH -u "$path"`
28591
28592  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28593  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28594  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28595  # "foo.exe" is OK but "foo" is an error.
28596  #
28597  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28598  # It is also a way to make sure we got the proper file name for the real test later on.
28599  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28600  if test "x$test_shortpath" = x; then
28601    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28602$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28603    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28604  fi
28605
28606  # Call helper function which possibly converts this using DOS-style short mode.
28607  # If so, the updated path is stored in $new_path.
28608
28609  input_path="$new_path"
28610  # Check if we need to convert this using DOS-style short mode. If the path
28611  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28612  # take no chances and rewrite it.
28613  # Note: m4 eats our [], so we need to use [ and ] instead.
28614  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28615  if test "x$has_forbidden_chars" != x; then
28616    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28617    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28618    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28619    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28620      # Going to short mode and back again did indeed matter. Since short mode is
28621      # case insensitive, let's make it lowercase to improve readability.
28622      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28623      # Now convert it back to Unix-style (cygpath)
28624      input_path=`$CYGPATH -u "$shortmode_path"`
28625      new_path="$input_path"
28626    fi
28627  fi
28628
28629  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28630  if test "x$test_cygdrive_prefix" = x; then
28631    # As a simple fix, exclude /usr/bin since it's not a real path.
28632    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28633      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28634      # a path prefixed by /cygdrive for fixpath to work.
28635      new_path="$CYGWIN_ROOT_PATH$input_path"
28636    fi
28637  fi
28638
28639
28640  if test "x$path" != "x$new_path"; then
28641    BOOT_JDK="$new_path"
28642    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28643$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28644  fi
28645
28646    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28647
28648  path="$BOOT_JDK"
28649  has_colon=`$ECHO $path | $GREP ^.:`
28650  new_path="$path"
28651  if test "x$has_colon" = x; then
28652    # Not in mixed or Windows style, start by that.
28653    new_path=`cmd //c echo $path`
28654  fi
28655
28656
28657  input_path="$new_path"
28658  # Check if we need to convert this using DOS-style short mode. If the path
28659  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28660  # take no chances and rewrite it.
28661  # Note: m4 eats our [], so we need to use [ and ] instead.
28662  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28663  if test "x$has_forbidden_chars" != x; then
28664    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28665    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28666  fi
28667
28668
28669  windows_path="$new_path"
28670  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28671    unix_path=`$CYGPATH -u "$windows_path"`
28672    new_path="$unix_path"
28673  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28674    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28675    new_path="$unix_path"
28676  fi
28677
28678  if test "x$path" != "x$new_path"; then
28679    BOOT_JDK="$new_path"
28680    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28681$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28682  fi
28683
28684  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28685  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28686
28687    else
28688      # We're on a unix platform. Hooray! :)
28689      path="$BOOT_JDK"
28690      has_space=`$ECHO "$path" | $GREP " "`
28691      if test "x$has_space" != x; then
28692        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28693$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28694        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28695      fi
28696
28697      # Use eval to expand a potential ~
28698      eval path="$path"
28699      if test ! -f "$path" && test ! -d "$path"; then
28700        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28701      fi
28702
28703      if test -d "$path"; then
28704        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28705      else
28706        dir="`$DIRNAME "$path"`"
28707        base="`$BASENAME "$path"`"
28708        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28709      fi
28710    fi
28711  fi
28712
28713            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28714$as_echo_n "checking for Boot JDK... " >&6; }
28715            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28716$as_echo "$BOOT_JDK" >&6; }
28717            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28718$as_echo_n "checking Boot JDK version... " >&6; }
28719            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28720            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28721$as_echo "$BOOT_JDK_VERSION" >&6; }
28722          fi # end check jdk version
28723        fi # end check javac
28724      fi # end check java
28725    fi # end check boot jdk found
28726  fi
28727
28728    done
28729  fi
28730
28731
28732    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28733    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28734      # Do we have a bin/java?
28735      if test ! -x "$BOOT_JDK/bin/java"; then
28736        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28737$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28738        BOOT_JDK_FOUND=no
28739      else
28740        # Do we have a bin/javac?
28741        if test ! -x "$BOOT_JDK/bin/javac"; then
28742          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28743$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28744          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28745$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28746          BOOT_JDK_FOUND=no
28747        else
28748          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28749          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28750
28751          # Extra M4 quote needed to protect [] in grep expression.
28752          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28753          if test "x$FOUND_CORRECT_VERSION" = x; then
28754            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28755$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28756            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28757$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28758            BOOT_JDK_FOUND=no
28759          else
28760            # We're done! :-)
28761            BOOT_JDK_FOUND=yes
28762
28763  # Only process if variable expands to non-empty
28764
28765  if test "x$BOOT_JDK" != x; then
28766    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28767
28768  # Input might be given as Windows format, start by converting to
28769  # unix format.
28770  path="$BOOT_JDK"
28771  new_path=`$CYGPATH -u "$path"`
28772
28773  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28774  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28775  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28776  # "foo.exe" is OK but "foo" is an error.
28777  #
28778  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28779  # It is also a way to make sure we got the proper file name for the real test later on.
28780  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28781  if test "x$test_shortpath" = x; then
28782    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28783$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28784    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28785  fi
28786
28787  # Call helper function which possibly converts this using DOS-style short mode.
28788  # If so, the updated path is stored in $new_path.
28789
28790  input_path="$new_path"
28791  # Check if we need to convert this using DOS-style short mode. If the path
28792  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28793  # take no chances and rewrite it.
28794  # Note: m4 eats our [], so we need to use [ and ] instead.
28795  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28796  if test "x$has_forbidden_chars" != x; then
28797    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28798    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28799    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28800    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28801      # Going to short mode and back again did indeed matter. Since short mode is
28802      # case insensitive, let's make it lowercase to improve readability.
28803      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28804      # Now convert it back to Unix-style (cygpath)
28805      input_path=`$CYGPATH -u "$shortmode_path"`
28806      new_path="$input_path"
28807    fi
28808  fi
28809
28810  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28811  if test "x$test_cygdrive_prefix" = x; then
28812    # As a simple fix, exclude /usr/bin since it's not a real path.
28813    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28814      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28815      # a path prefixed by /cygdrive for fixpath to work.
28816      new_path="$CYGWIN_ROOT_PATH$input_path"
28817    fi
28818  fi
28819
28820
28821  if test "x$path" != "x$new_path"; then
28822    BOOT_JDK="$new_path"
28823    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28824$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28825  fi
28826
28827    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28828
28829  path="$BOOT_JDK"
28830  has_colon=`$ECHO $path | $GREP ^.:`
28831  new_path="$path"
28832  if test "x$has_colon" = x; then
28833    # Not in mixed or Windows style, start by that.
28834    new_path=`cmd //c echo $path`
28835  fi
28836
28837
28838  input_path="$new_path"
28839  # Check if we need to convert this using DOS-style short mode. If the path
28840  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28841  # take no chances and rewrite it.
28842  # Note: m4 eats our [], so we need to use [ and ] instead.
28843  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28844  if test "x$has_forbidden_chars" != x; then
28845    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28846    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28847  fi
28848
28849
28850  windows_path="$new_path"
28851  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28852    unix_path=`$CYGPATH -u "$windows_path"`
28853    new_path="$unix_path"
28854  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28855    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28856    new_path="$unix_path"
28857  fi
28858
28859  if test "x$path" != "x$new_path"; then
28860    BOOT_JDK="$new_path"
28861    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28862$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28863  fi
28864
28865  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28866  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28867
28868    else
28869      # We're on a unix platform. Hooray! :)
28870      path="$BOOT_JDK"
28871      has_space=`$ECHO "$path" | $GREP " "`
28872      if test "x$has_space" != x; then
28873        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28874$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28875        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28876      fi
28877
28878      # Use eval to expand a potential ~
28879      eval path="$path"
28880      if test ! -f "$path" && test ! -d "$path"; then
28881        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28882      fi
28883
28884      if test -d "$path"; then
28885        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28886      else
28887        dir="`$DIRNAME "$path"`"
28888        base="`$BASENAME "$path"`"
28889        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28890      fi
28891    fi
28892  fi
28893
28894            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28895$as_echo_n "checking for Boot JDK... " >&6; }
28896            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28897$as_echo "$BOOT_JDK" >&6; }
28898            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28899$as_echo_n "checking Boot JDK version... " >&6; }
28900            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28901            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28902$as_echo "$BOOT_JDK_VERSION" >&6; }
28903          fi # end check jdk version
28904        fi # end check javac
28905      fi # end check java
28906    fi # end check boot jdk found
28907  fi
28908
28909
28910  if test "x$BOOT_JDK_FOUND" = xno; then
28911    # Now execute the test
28912
28913  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
28914  BOOT_JDK_SUFFIX="/Contents/Home"
28915  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28916  if test "x$ALL_JDKS_FOUND" != x; then
28917    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28918
28919  if test "x$BOOT_JDK_FOUND" = xno; then
28920    # Now execute the test
28921
28922        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28923        if test -d "$BOOT_JDK"; then
28924          BOOT_JDK_FOUND=maybe
28925          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28926$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28927        fi
28928
28929
28930    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28931    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28932      # Do we have a bin/java?
28933      if test ! -x "$BOOT_JDK/bin/java"; then
28934        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28935$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28936        BOOT_JDK_FOUND=no
28937      else
28938        # Do we have a bin/javac?
28939        if test ! -x "$BOOT_JDK/bin/javac"; then
28940          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28941$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28942          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28943$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28944          BOOT_JDK_FOUND=no
28945        else
28946          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28947          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28948
28949          # Extra M4 quote needed to protect [] in grep expression.
28950          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28951          if test "x$FOUND_CORRECT_VERSION" = x; then
28952            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28953$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28954            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28955$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28956            BOOT_JDK_FOUND=no
28957          else
28958            # We're done! :-)
28959            BOOT_JDK_FOUND=yes
28960
28961  # Only process if variable expands to non-empty
28962
28963  if test "x$BOOT_JDK" != x; then
28964    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28965
28966  # Input might be given as Windows format, start by converting to
28967  # unix format.
28968  path="$BOOT_JDK"
28969  new_path=`$CYGPATH -u "$path"`
28970
28971  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28972  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28973  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28974  # "foo.exe" is OK but "foo" is an error.
28975  #
28976  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28977  # It is also a way to make sure we got the proper file name for the real test later on.
28978  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28979  if test "x$test_shortpath" = x; then
28980    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28981$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28982    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28983  fi
28984
28985  # Call helper function which possibly converts this using DOS-style short mode.
28986  # If so, the updated path is stored in $new_path.
28987
28988  input_path="$new_path"
28989  # Check if we need to convert this using DOS-style short mode. If the path
28990  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28991  # take no chances and rewrite it.
28992  # Note: m4 eats our [], so we need to use [ and ] instead.
28993  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28994  if test "x$has_forbidden_chars" != x; then
28995    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28996    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28997    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28998    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28999      # Going to short mode and back again did indeed matter. Since short mode is
29000      # case insensitive, let's make it lowercase to improve readability.
29001      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29002      # Now convert it back to Unix-style (cygpath)
29003      input_path=`$CYGPATH -u "$shortmode_path"`
29004      new_path="$input_path"
29005    fi
29006  fi
29007
29008  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29009  if test "x$test_cygdrive_prefix" = x; then
29010    # As a simple fix, exclude /usr/bin since it's not a real path.
29011    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29012      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29013      # a path prefixed by /cygdrive for fixpath to work.
29014      new_path="$CYGWIN_ROOT_PATH$input_path"
29015    fi
29016  fi
29017
29018
29019  if test "x$path" != "x$new_path"; then
29020    BOOT_JDK="$new_path"
29021    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29022$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29023  fi
29024
29025    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29026
29027  path="$BOOT_JDK"
29028  has_colon=`$ECHO $path | $GREP ^.:`
29029  new_path="$path"
29030  if test "x$has_colon" = x; then
29031    # Not in mixed or Windows style, start by that.
29032    new_path=`cmd //c echo $path`
29033  fi
29034
29035
29036  input_path="$new_path"
29037  # Check if we need to convert this using DOS-style short mode. If the path
29038  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29039  # take no chances and rewrite it.
29040  # Note: m4 eats our [], so we need to use [ and ] instead.
29041  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29042  if test "x$has_forbidden_chars" != x; then
29043    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29044    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29045  fi
29046
29047
29048  windows_path="$new_path"
29049  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29050    unix_path=`$CYGPATH -u "$windows_path"`
29051    new_path="$unix_path"
29052  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29053    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29054    new_path="$unix_path"
29055  fi
29056
29057  if test "x$path" != "x$new_path"; then
29058    BOOT_JDK="$new_path"
29059    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29060$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29061  fi
29062
29063  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29064  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29065
29066    else
29067      # We're on a unix platform. Hooray! :)
29068      path="$BOOT_JDK"
29069      has_space=`$ECHO "$path" | $GREP " "`
29070      if test "x$has_space" != x; then
29071        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29072$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29073        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29074      fi
29075
29076      # Use eval to expand a potential ~
29077      eval path="$path"
29078      if test ! -f "$path" && test ! -d "$path"; then
29079        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29080      fi
29081
29082      if test -d "$path"; then
29083        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29084      else
29085        dir="`$DIRNAME "$path"`"
29086        base="`$BASENAME "$path"`"
29087        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29088      fi
29089    fi
29090  fi
29091
29092            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29093$as_echo_n "checking for Boot JDK... " >&6; }
29094            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29095$as_echo "$BOOT_JDK" >&6; }
29096            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29097$as_echo_n "checking Boot JDK version... " >&6; }
29098            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29099            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29100$as_echo "$BOOT_JDK_VERSION" >&6; }
29101          fi # end check jdk version
29102        fi # end check javac
29103      fi # end check java
29104    fi # end check boot jdk found
29105  fi
29106
29107    done
29108  fi
29109
29110
29111    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29112    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29113      # Do we have a bin/java?
29114      if test ! -x "$BOOT_JDK/bin/java"; then
29115        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29116$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29117        BOOT_JDK_FOUND=no
29118      else
29119        # Do we have a bin/javac?
29120        if test ! -x "$BOOT_JDK/bin/javac"; then
29121          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29122$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29123          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29124$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29125          BOOT_JDK_FOUND=no
29126        else
29127          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29128          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29129
29130          # Extra M4 quote needed to protect [] in grep expression.
29131          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29132          if test "x$FOUND_CORRECT_VERSION" = x; then
29133            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29134$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29135            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29136$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29137            BOOT_JDK_FOUND=no
29138          else
29139            # We're done! :-)
29140            BOOT_JDK_FOUND=yes
29141
29142  # Only process if variable expands to non-empty
29143
29144  if test "x$BOOT_JDK" != x; then
29145    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29146
29147  # Input might be given as Windows format, start by converting to
29148  # unix format.
29149  path="$BOOT_JDK"
29150  new_path=`$CYGPATH -u "$path"`
29151
29152  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29153  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29154  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29155  # "foo.exe" is OK but "foo" is an error.
29156  #
29157  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29158  # It is also a way to make sure we got the proper file name for the real test later on.
29159  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29160  if test "x$test_shortpath" = x; then
29161    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29162$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29163    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29164  fi
29165
29166  # Call helper function which possibly converts this using DOS-style short mode.
29167  # If so, the updated path is stored in $new_path.
29168
29169  input_path="$new_path"
29170  # Check if we need to convert this using DOS-style short mode. If the path
29171  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29172  # take no chances and rewrite it.
29173  # Note: m4 eats our [], so we need to use [ and ] instead.
29174  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29175  if test "x$has_forbidden_chars" != x; then
29176    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29177    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29178    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29179    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29180      # Going to short mode and back again did indeed matter. Since short mode is
29181      # case insensitive, let's make it lowercase to improve readability.
29182      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29183      # Now convert it back to Unix-style (cygpath)
29184      input_path=`$CYGPATH -u "$shortmode_path"`
29185      new_path="$input_path"
29186    fi
29187  fi
29188
29189  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29190  if test "x$test_cygdrive_prefix" = x; then
29191    # As a simple fix, exclude /usr/bin since it's not a real path.
29192    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29193      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29194      # a path prefixed by /cygdrive for fixpath to work.
29195      new_path="$CYGWIN_ROOT_PATH$input_path"
29196    fi
29197  fi
29198
29199
29200  if test "x$path" != "x$new_path"; then
29201    BOOT_JDK="$new_path"
29202    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29203$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29204  fi
29205
29206    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29207
29208  path="$BOOT_JDK"
29209  has_colon=`$ECHO $path | $GREP ^.:`
29210  new_path="$path"
29211  if test "x$has_colon" = x; then
29212    # Not in mixed or Windows style, start by that.
29213    new_path=`cmd //c echo $path`
29214  fi
29215
29216
29217  input_path="$new_path"
29218  # Check if we need to convert this using DOS-style short mode. If the path
29219  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29220  # take no chances and rewrite it.
29221  # Note: m4 eats our [], so we need to use [ and ] instead.
29222  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29223  if test "x$has_forbidden_chars" != x; then
29224    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29225    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29226  fi
29227
29228
29229  windows_path="$new_path"
29230  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29231    unix_path=`$CYGPATH -u "$windows_path"`
29232    new_path="$unix_path"
29233  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29234    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29235    new_path="$unix_path"
29236  fi
29237
29238  if test "x$path" != "x$new_path"; then
29239    BOOT_JDK="$new_path"
29240    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29241$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29242  fi
29243
29244  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29245  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29246
29247    else
29248      # We're on a unix platform. Hooray! :)
29249      path="$BOOT_JDK"
29250      has_space=`$ECHO "$path" | $GREP " "`
29251      if test "x$has_space" != x; then
29252        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29253$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29254        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29255      fi
29256
29257      # Use eval to expand a potential ~
29258      eval path="$path"
29259      if test ! -f "$path" && test ! -d "$path"; then
29260        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29261      fi
29262
29263      if test -d "$path"; then
29264        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29265      else
29266        dir="`$DIRNAME "$path"`"
29267        base="`$BASENAME "$path"`"
29268        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29269      fi
29270    fi
29271  fi
29272
29273            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29274$as_echo_n "checking for Boot JDK... " >&6; }
29275            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29276$as_echo "$BOOT_JDK" >&6; }
29277            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29278$as_echo_n "checking Boot JDK version... " >&6; }
29279            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29280            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29281$as_echo "$BOOT_JDK_VERSION" >&6; }
29282          fi # end check jdk version
29283        fi # end check javac
29284      fi # end check java
29285    fi # end check boot jdk found
29286  fi
29287
29288  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
29289
29290  if test "x$BOOT_JDK_FOUND" = xno; then
29291    # Now execute the test
29292
29293  BOOT_JDK_PREFIX="/usr/lib/jvm"
29294  BOOT_JDK_SUFFIX=""
29295  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29296  if test "x$ALL_JDKS_FOUND" != x; then
29297    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29298
29299  if test "x$BOOT_JDK_FOUND" = xno; then
29300    # Now execute the test
29301
29302        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29303        if test -d "$BOOT_JDK"; then
29304          BOOT_JDK_FOUND=maybe
29305          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29306$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29307        fi
29308
29309
29310    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29311    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29312      # Do we have a bin/java?
29313      if test ! -x "$BOOT_JDK/bin/java"; then
29314        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29315$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29316        BOOT_JDK_FOUND=no
29317      else
29318        # Do we have a bin/javac?
29319        if test ! -x "$BOOT_JDK/bin/javac"; then
29320          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29321$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29322          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29323$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29324          BOOT_JDK_FOUND=no
29325        else
29326          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29327          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29328
29329          # Extra M4 quote needed to protect [] in grep expression.
29330          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29331          if test "x$FOUND_CORRECT_VERSION" = x; then
29332            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29333$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29334            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29335$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29336            BOOT_JDK_FOUND=no
29337          else
29338            # We're done! :-)
29339            BOOT_JDK_FOUND=yes
29340
29341  # Only process if variable expands to non-empty
29342
29343  if test "x$BOOT_JDK" != x; then
29344    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29345
29346  # Input might be given as Windows format, start by converting to
29347  # unix format.
29348  path="$BOOT_JDK"
29349  new_path=`$CYGPATH -u "$path"`
29350
29351  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29352  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29353  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29354  # "foo.exe" is OK but "foo" is an error.
29355  #
29356  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29357  # It is also a way to make sure we got the proper file name for the real test later on.
29358  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29359  if test "x$test_shortpath" = x; then
29360    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29361$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29362    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29363  fi
29364
29365  # Call helper function which possibly converts this using DOS-style short mode.
29366  # If so, the updated path is stored in $new_path.
29367
29368  input_path="$new_path"
29369  # Check if we need to convert this using DOS-style short mode. If the path
29370  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29371  # take no chances and rewrite it.
29372  # Note: m4 eats our [], so we need to use [ and ] instead.
29373  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29374  if test "x$has_forbidden_chars" != x; then
29375    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29376    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29377    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29378    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29379      # Going to short mode and back again did indeed matter. Since short mode is
29380      # case insensitive, let's make it lowercase to improve readability.
29381      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29382      # Now convert it back to Unix-style (cygpath)
29383      input_path=`$CYGPATH -u "$shortmode_path"`
29384      new_path="$input_path"
29385    fi
29386  fi
29387
29388  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29389  if test "x$test_cygdrive_prefix" = x; then
29390    # As a simple fix, exclude /usr/bin since it's not a real path.
29391    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29392      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29393      # a path prefixed by /cygdrive for fixpath to work.
29394      new_path="$CYGWIN_ROOT_PATH$input_path"
29395    fi
29396  fi
29397
29398
29399  if test "x$path" != "x$new_path"; then
29400    BOOT_JDK="$new_path"
29401    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29402$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29403  fi
29404
29405    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29406
29407  path="$BOOT_JDK"
29408  has_colon=`$ECHO $path | $GREP ^.:`
29409  new_path="$path"
29410  if test "x$has_colon" = x; then
29411    # Not in mixed or Windows style, start by that.
29412    new_path=`cmd //c echo $path`
29413  fi
29414
29415
29416  input_path="$new_path"
29417  # Check if we need to convert this using DOS-style short mode. If the path
29418  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29419  # take no chances and rewrite it.
29420  # Note: m4 eats our [], so we need to use [ and ] instead.
29421  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29422  if test "x$has_forbidden_chars" != x; then
29423    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29424    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29425  fi
29426
29427
29428  windows_path="$new_path"
29429  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29430    unix_path=`$CYGPATH -u "$windows_path"`
29431    new_path="$unix_path"
29432  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29433    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29434    new_path="$unix_path"
29435  fi
29436
29437  if test "x$path" != "x$new_path"; then
29438    BOOT_JDK="$new_path"
29439    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29440$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29441  fi
29442
29443  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29444  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29445
29446    else
29447      # We're on a unix platform. Hooray! :)
29448      path="$BOOT_JDK"
29449      has_space=`$ECHO "$path" | $GREP " "`
29450      if test "x$has_space" != x; then
29451        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29452$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29453        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29454      fi
29455
29456      # Use eval to expand a potential ~
29457      eval path="$path"
29458      if test ! -f "$path" && test ! -d "$path"; then
29459        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29460      fi
29461
29462      if test -d "$path"; then
29463        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29464      else
29465        dir="`$DIRNAME "$path"`"
29466        base="`$BASENAME "$path"`"
29467        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29468      fi
29469    fi
29470  fi
29471
29472            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29473$as_echo_n "checking for Boot JDK... " >&6; }
29474            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29475$as_echo "$BOOT_JDK" >&6; }
29476            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29477$as_echo_n "checking Boot JDK version... " >&6; }
29478            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29479            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29480$as_echo "$BOOT_JDK_VERSION" >&6; }
29481          fi # end check jdk version
29482        fi # end check javac
29483      fi # end check java
29484    fi # end check boot jdk found
29485  fi
29486
29487    done
29488  fi
29489
29490
29491    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29492    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29493      # Do we have a bin/java?
29494      if test ! -x "$BOOT_JDK/bin/java"; then
29495        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29496$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29497        BOOT_JDK_FOUND=no
29498      else
29499        # Do we have a bin/javac?
29500        if test ! -x "$BOOT_JDK/bin/javac"; then
29501          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29502$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29503          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29504$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29505          BOOT_JDK_FOUND=no
29506        else
29507          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29508          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29509
29510          # Extra M4 quote needed to protect [] in grep expression.
29511          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29512          if test "x$FOUND_CORRECT_VERSION" = x; then
29513            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29514$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29515            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29516$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29517            BOOT_JDK_FOUND=no
29518          else
29519            # We're done! :-)
29520            BOOT_JDK_FOUND=yes
29521
29522  # Only process if variable expands to non-empty
29523
29524  if test "x$BOOT_JDK" != x; then
29525    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29526
29527  # Input might be given as Windows format, start by converting to
29528  # unix format.
29529  path="$BOOT_JDK"
29530  new_path=`$CYGPATH -u "$path"`
29531
29532  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29533  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29534  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29535  # "foo.exe" is OK but "foo" is an error.
29536  #
29537  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29538  # It is also a way to make sure we got the proper file name for the real test later on.
29539  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29540  if test "x$test_shortpath" = x; then
29541    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29542$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29543    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29544  fi
29545
29546  # Call helper function which possibly converts this using DOS-style short mode.
29547  # If so, the updated path is stored in $new_path.
29548
29549  input_path="$new_path"
29550  # Check if we need to convert this using DOS-style short mode. If the path
29551  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29552  # take no chances and rewrite it.
29553  # Note: m4 eats our [], so we need to use [ and ] instead.
29554  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29555  if test "x$has_forbidden_chars" != x; then
29556    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29557    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29558    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29559    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29560      # Going to short mode and back again did indeed matter. Since short mode is
29561      # case insensitive, let's make it lowercase to improve readability.
29562      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29563      # Now convert it back to Unix-style (cygpath)
29564      input_path=`$CYGPATH -u "$shortmode_path"`
29565      new_path="$input_path"
29566    fi
29567  fi
29568
29569  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29570  if test "x$test_cygdrive_prefix" = x; then
29571    # As a simple fix, exclude /usr/bin since it's not a real path.
29572    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29573      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29574      # a path prefixed by /cygdrive for fixpath to work.
29575      new_path="$CYGWIN_ROOT_PATH$input_path"
29576    fi
29577  fi
29578
29579
29580  if test "x$path" != "x$new_path"; then
29581    BOOT_JDK="$new_path"
29582    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29583$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29584  fi
29585
29586    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29587
29588  path="$BOOT_JDK"
29589  has_colon=`$ECHO $path | $GREP ^.:`
29590  new_path="$path"
29591  if test "x$has_colon" = x; then
29592    # Not in mixed or Windows style, start by that.
29593    new_path=`cmd //c echo $path`
29594  fi
29595
29596
29597  input_path="$new_path"
29598  # Check if we need to convert this using DOS-style short mode. If the path
29599  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29600  # take no chances and rewrite it.
29601  # Note: m4 eats our [], so we need to use [ and ] instead.
29602  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29603  if test "x$has_forbidden_chars" != x; then
29604    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29605    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29606  fi
29607
29608
29609  windows_path="$new_path"
29610  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29611    unix_path=`$CYGPATH -u "$windows_path"`
29612    new_path="$unix_path"
29613  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29614    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29615    new_path="$unix_path"
29616  fi
29617
29618  if test "x$path" != "x$new_path"; then
29619    BOOT_JDK="$new_path"
29620    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29621$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29622  fi
29623
29624  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29625  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29626
29627    else
29628      # We're on a unix platform. Hooray! :)
29629      path="$BOOT_JDK"
29630      has_space=`$ECHO "$path" | $GREP " "`
29631      if test "x$has_space" != x; then
29632        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29633$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29634        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29635      fi
29636
29637      # Use eval to expand a potential ~
29638      eval path="$path"
29639      if test ! -f "$path" && test ! -d "$path"; then
29640        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29641      fi
29642
29643      if test -d "$path"; then
29644        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29645      else
29646        dir="`$DIRNAME "$path"`"
29647        base="`$BASENAME "$path"`"
29648        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29649      fi
29650    fi
29651  fi
29652
29653            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29654$as_echo_n "checking for Boot JDK... " >&6; }
29655            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29656$as_echo "$BOOT_JDK" >&6; }
29657            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29658$as_echo_n "checking Boot JDK version... " >&6; }
29659            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29660            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29661$as_echo "$BOOT_JDK_VERSION" >&6; }
29662          fi # end check jdk version
29663        fi # end check javac
29664      fi # end check java
29665    fi # end check boot jdk found
29666  fi
29667
29668  fi
29669
29670
29671    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29672    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29673      # Do we have a bin/java?
29674      if test ! -x "$BOOT_JDK/bin/java"; then
29675        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29676$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29677        BOOT_JDK_FOUND=no
29678      else
29679        # Do we have a bin/javac?
29680        if test ! -x "$BOOT_JDK/bin/javac"; then
29681          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29682$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29683          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29684$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29685          BOOT_JDK_FOUND=no
29686        else
29687          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29688          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29689
29690          # Extra M4 quote needed to protect [] in grep expression.
29691          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29692          if test "x$FOUND_CORRECT_VERSION" = x; then
29693            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29694$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29695            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29696$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29697            BOOT_JDK_FOUND=no
29698          else
29699            # We're done! :-)
29700            BOOT_JDK_FOUND=yes
29701
29702  # Only process if variable expands to non-empty
29703
29704  if test "x$BOOT_JDK" != x; then
29705    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29706
29707  # Input might be given as Windows format, start by converting to
29708  # unix format.
29709  path="$BOOT_JDK"
29710  new_path=`$CYGPATH -u "$path"`
29711
29712  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29713  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29714  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29715  # "foo.exe" is OK but "foo" is an error.
29716  #
29717  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29718  # It is also a way to make sure we got the proper file name for the real test later on.
29719  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29720  if test "x$test_shortpath" = x; then
29721    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29722$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29723    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29724  fi
29725
29726  # Call helper function which possibly converts this using DOS-style short mode.
29727  # If so, the updated path is stored in $new_path.
29728
29729  input_path="$new_path"
29730  # Check if we need to convert this using DOS-style short mode. If the path
29731  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29732  # take no chances and rewrite it.
29733  # Note: m4 eats our [], so we need to use [ and ] instead.
29734  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29735  if test "x$has_forbidden_chars" != x; then
29736    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29737    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29738    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29739    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29740      # Going to short mode and back again did indeed matter. Since short mode is
29741      # case insensitive, let's make it lowercase to improve readability.
29742      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29743      # Now convert it back to Unix-style (cygpath)
29744      input_path=`$CYGPATH -u "$shortmode_path"`
29745      new_path="$input_path"
29746    fi
29747  fi
29748
29749  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29750  if test "x$test_cygdrive_prefix" = x; then
29751    # As a simple fix, exclude /usr/bin since it's not a real path.
29752    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29753      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29754      # a path prefixed by /cygdrive for fixpath to work.
29755      new_path="$CYGWIN_ROOT_PATH$input_path"
29756    fi
29757  fi
29758
29759
29760  if test "x$path" != "x$new_path"; then
29761    BOOT_JDK="$new_path"
29762    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29763$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29764  fi
29765
29766    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29767
29768  path="$BOOT_JDK"
29769  has_colon=`$ECHO $path | $GREP ^.:`
29770  new_path="$path"
29771  if test "x$has_colon" = x; then
29772    # Not in mixed or Windows style, start by that.
29773    new_path=`cmd //c echo $path`
29774  fi
29775
29776
29777  input_path="$new_path"
29778  # Check if we need to convert this using DOS-style short mode. If the path
29779  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29780  # take no chances and rewrite it.
29781  # Note: m4 eats our [], so we need to use [ and ] instead.
29782  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29783  if test "x$has_forbidden_chars" != x; then
29784    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29785    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29786  fi
29787
29788
29789  windows_path="$new_path"
29790  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29791    unix_path=`$CYGPATH -u "$windows_path"`
29792    new_path="$unix_path"
29793  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29794    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29795    new_path="$unix_path"
29796  fi
29797
29798  if test "x$path" != "x$new_path"; then
29799    BOOT_JDK="$new_path"
29800    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29801$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29802  fi
29803
29804  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29805  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29806
29807    else
29808      # We're on a unix platform. Hooray! :)
29809      path="$BOOT_JDK"
29810      has_space=`$ECHO "$path" | $GREP " "`
29811      if test "x$has_space" != x; then
29812        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29813$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29814        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29815      fi
29816
29817      # Use eval to expand a potential ~
29818      eval path="$path"
29819      if test ! -f "$path" && test ! -d "$path"; then
29820        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29821      fi
29822
29823      if test -d "$path"; then
29824        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29825      else
29826        dir="`$DIRNAME "$path"`"
29827        base="`$BASENAME "$path"`"
29828        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29829      fi
29830    fi
29831  fi
29832
29833            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29834$as_echo_n "checking for Boot JDK... " >&6; }
29835            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29836$as_echo "$BOOT_JDK" >&6; }
29837            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29838$as_echo_n "checking Boot JDK version... " >&6; }
29839            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29840            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29841$as_echo "$BOOT_JDK_VERSION" >&6; }
29842          fi # end check jdk version
29843        fi # end check javac
29844      fi # end check java
29845    fi # end check boot jdk found
29846  fi
29847
29848
29849  # If we haven't found anything yet, we've truly lost. Give up.
29850  if test "x$BOOT_JDK_FOUND" = xno; then
29851
29852  # Print a helpful message on how to acquire the necessary build dependency.
29853  # openjdk is the help tag: freetype, cups, alsa etc
29854  MISSING_DEPENDENCY=openjdk
29855
29856  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29857    cygwin_help $MISSING_DEPENDENCY
29858  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29859    msys_help $MISSING_DEPENDENCY
29860  else
29861    PKGHANDLER_COMMAND=
29862
29863    case $PKGHANDLER in
29864      apt-get)
29865        apt_help     $MISSING_DEPENDENCY ;;
29866      yum)
29867        yum_help     $MISSING_DEPENDENCY ;;
29868      port)
29869        port_help    $MISSING_DEPENDENCY ;;
29870      pkgutil)
29871        pkgutil_help $MISSING_DEPENDENCY ;;
29872      pkgadd)
29873        pkgadd_help  $MISSING_DEPENDENCY ;;
29874    esac
29875
29876    if test "x$PKGHANDLER_COMMAND" != x; then
29877      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29878    fi
29879  fi
29880
29881    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
29882$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
29883    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
29884$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29885    as_fn_error $? "Cannot continue" "$LINENO" 5
29886  fi
29887
29888
29889
29890  # Setup tools from the Boot JDK.
29891
29892  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29893
29894  # Publish this variable in the help.
29895
29896
29897  if [ -z "${JAVA+x}" ]; then
29898    # The variable is not set by user, try to locate tool using the code snippet
29899
29900      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29901$as_echo_n "checking for java in Boot JDK... " >&6; }
29902      JAVA=$BOOT_JDK/bin/java
29903      if test ! -x $JAVA; then
29904        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29905$as_echo "not found" >&6; }
29906        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29907$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29908        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29909      fi
29910      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29911$as_echo "ok" >&6; }
29912
29913
29914  else
29915    # The variable is set, but is it from the command line or the environment?
29916
29917    # Try to remove the string !JAVA! from our list.
29918    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
29919    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29920      # If it failed, the variable was not from the command line. Ignore it,
29921      # but warn the user (except for BASH, which is always set by the calling BASH).
29922      if test "xJAVA" != xBASH; then
29923        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
29924$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
29925      fi
29926      # Try to locate tool using the code snippet
29927
29928      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29929$as_echo_n "checking for java in Boot JDK... " >&6; }
29930      JAVA=$BOOT_JDK/bin/java
29931      if test ! -x $JAVA; then
29932        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29933$as_echo "not found" >&6; }
29934        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29935$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29936        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29937      fi
29938      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29939$as_echo "ok" >&6; }
29940
29941
29942    else
29943      # If it succeeded, then it was overridden by the user. We will use it
29944      # for the tool.
29945
29946      # First remove it from the list of overridden variables, so we can test
29947      # for unknown variables in the end.
29948      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29949
29950      # Check if we try to supply an empty value
29951      if test "x$JAVA" = x; then
29952        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
29953$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
29954        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
29955$as_echo_n "checking for JAVA... " >&6; }
29956        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29957$as_echo "disabled" >&6; }
29958      else
29959        # Check if the provided tool contains a complete path.
29960        tool_specified="$JAVA"
29961        tool_basename="${tool_specified##*/}"
29962        if test "x$tool_basename" = "x$tool_specified"; then
29963          # A command without a complete path is provided, search $PATH.
29964          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
29965$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
29966          # Extract the first word of "$tool_basename", so it can be a program name with args.
29967set dummy $tool_basename; ac_word=$2
29968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29969$as_echo_n "checking for $ac_word... " >&6; }
29970if ${ac_cv_path_JAVA+:} false; then :
29971  $as_echo_n "(cached) " >&6
29972else
29973  case $JAVA in
29974  [\\/]* | ?:[\\/]*)
29975  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
29976  ;;
29977  *)
29978  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29979for as_dir in $PATH
29980do
29981  IFS=$as_save_IFS
29982  test -z "$as_dir" && as_dir=.
29983    for ac_exec_ext in '' $ac_executable_extensions; do
29984  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29985    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
29986    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29987    break 2
29988  fi
29989done
29990  done
29991IFS=$as_save_IFS
29992
29993  ;;
29994esac
29995fi
29996JAVA=$ac_cv_path_JAVA
29997if test -n "$JAVA"; then
29998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
29999$as_echo "$JAVA" >&6; }
30000else
30001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30002$as_echo "no" >&6; }
30003fi
30004
30005
30006          if test "x$JAVA" = x; then
30007            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30008          fi
30009        else
30010          # Otherwise we believe it is a complete path. Use it as it is.
30011          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
30012$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
30013          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30014$as_echo_n "checking for JAVA... " >&6; }
30015          if test ! -x "$tool_specified"; then
30016            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30017$as_echo "not found" >&6; }
30018            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
30019          fi
30020          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30021$as_echo "$tool_specified" >&6; }
30022        fi
30023      fi
30024    fi
30025
30026  fi
30027
30028
30029
30030  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30031
30032  # Publish this variable in the help.
30033
30034
30035  if [ -z "${JAVAC+x}" ]; then
30036    # The variable is not set by user, try to locate tool using the code snippet
30037
30038      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30039$as_echo_n "checking for javac in Boot JDK... " >&6; }
30040      JAVAC=$BOOT_JDK/bin/javac
30041      if test ! -x $JAVAC; then
30042        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30043$as_echo "not found" >&6; }
30044        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30045$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30046        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30047      fi
30048      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30049$as_echo "ok" >&6; }
30050
30051
30052  else
30053    # The variable is set, but is it from the command line or the environment?
30054
30055    # Try to remove the string !JAVAC! from our list.
30056    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
30057    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30058      # If it failed, the variable was not from the command line. Ignore it,
30059      # but warn the user (except for BASH, which is always set by the calling BASH).
30060      if test "xJAVAC" != xBASH; then
30061        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
30062$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
30063      fi
30064      # Try to locate tool using the code snippet
30065
30066      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30067$as_echo_n "checking for javac in Boot JDK... " >&6; }
30068      JAVAC=$BOOT_JDK/bin/javac
30069      if test ! -x $JAVAC; then
30070        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30071$as_echo "not found" >&6; }
30072        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30073$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30074        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30075      fi
30076      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30077$as_echo "ok" >&6; }
30078
30079
30080    else
30081      # If it succeeded, then it was overridden by the user. We will use it
30082      # for the tool.
30083
30084      # First remove it from the list of overridden variables, so we can test
30085      # for unknown variables in the end.
30086      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30087
30088      # Check if we try to supply an empty value
30089      if test "x$JAVAC" = x; then
30090        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
30091$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
30092        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30093$as_echo_n "checking for JAVAC... " >&6; }
30094        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30095$as_echo "disabled" >&6; }
30096      else
30097        # Check if the provided tool contains a complete path.
30098        tool_specified="$JAVAC"
30099        tool_basename="${tool_specified##*/}"
30100        if test "x$tool_basename" = "x$tool_specified"; then
30101          # A command without a complete path is provided, search $PATH.
30102          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
30103$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
30104          # Extract the first word of "$tool_basename", so it can be a program name with args.
30105set dummy $tool_basename; ac_word=$2
30106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30107$as_echo_n "checking for $ac_word... " >&6; }
30108if ${ac_cv_path_JAVAC+:} false; then :
30109  $as_echo_n "(cached) " >&6
30110else
30111  case $JAVAC in
30112  [\\/]* | ?:[\\/]*)
30113  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
30114  ;;
30115  *)
30116  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30117for as_dir in $PATH
30118do
30119  IFS=$as_save_IFS
30120  test -z "$as_dir" && as_dir=.
30121    for ac_exec_ext in '' $ac_executable_extensions; do
30122  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30123    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
30124    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30125    break 2
30126  fi
30127done
30128  done
30129IFS=$as_save_IFS
30130
30131  ;;
30132esac
30133fi
30134JAVAC=$ac_cv_path_JAVAC
30135if test -n "$JAVAC"; then
30136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
30137$as_echo "$JAVAC" >&6; }
30138else
30139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30140$as_echo "no" >&6; }
30141fi
30142
30143
30144          if test "x$JAVAC" = x; then
30145            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30146          fi
30147        else
30148          # Otherwise we believe it is a complete path. Use it as it is.
30149          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
30150$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
30151          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30152$as_echo_n "checking for JAVAC... " >&6; }
30153          if test ! -x "$tool_specified"; then
30154            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30155$as_echo "not found" >&6; }
30156            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
30157          fi
30158          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30159$as_echo "$tool_specified" >&6; }
30160        fi
30161      fi
30162    fi
30163
30164  fi
30165
30166
30167
30168  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30169
30170  # Publish this variable in the help.
30171
30172
30173  if [ -z "${JAVAH+x}" ]; then
30174    # The variable is not set by user, try to locate tool using the code snippet
30175
30176      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30177$as_echo_n "checking for javah in Boot JDK... " >&6; }
30178      JAVAH=$BOOT_JDK/bin/javah
30179      if test ! -x $JAVAH; then
30180        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30181$as_echo "not found" >&6; }
30182        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30183$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30184        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30185      fi
30186      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30187$as_echo "ok" >&6; }
30188
30189
30190  else
30191    # The variable is set, but is it from the command line or the environment?
30192
30193    # Try to remove the string !JAVAH! from our list.
30194    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
30195    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30196      # If it failed, the variable was not from the command line. Ignore it,
30197      # but warn the user (except for BASH, which is always set by the calling BASH).
30198      if test "xJAVAH" != xBASH; then
30199        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
30200$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
30201      fi
30202      # Try to locate tool using the code snippet
30203
30204      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30205$as_echo_n "checking for javah in Boot JDK... " >&6; }
30206      JAVAH=$BOOT_JDK/bin/javah
30207      if test ! -x $JAVAH; then
30208        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30209$as_echo "not found" >&6; }
30210        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30211$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30212        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30213      fi
30214      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30215$as_echo "ok" >&6; }
30216
30217
30218    else
30219      # If it succeeded, then it was overridden by the user. We will use it
30220      # for the tool.
30221
30222      # First remove it from the list of overridden variables, so we can test
30223      # for unknown variables in the end.
30224      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30225
30226      # Check if we try to supply an empty value
30227      if test "x$JAVAH" = x; then
30228        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
30229$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
30230        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30231$as_echo_n "checking for JAVAH... " >&6; }
30232        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30233$as_echo "disabled" >&6; }
30234      else
30235        # Check if the provided tool contains a complete path.
30236        tool_specified="$JAVAH"
30237        tool_basename="${tool_specified##*/}"
30238        if test "x$tool_basename" = "x$tool_specified"; then
30239          # A command without a complete path is provided, search $PATH.
30240          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
30241$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
30242          # Extract the first word of "$tool_basename", so it can be a program name with args.
30243set dummy $tool_basename; ac_word=$2
30244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30245$as_echo_n "checking for $ac_word... " >&6; }
30246if ${ac_cv_path_JAVAH+:} false; then :
30247  $as_echo_n "(cached) " >&6
30248else
30249  case $JAVAH in
30250  [\\/]* | ?:[\\/]*)
30251  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
30252  ;;
30253  *)
30254  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30255for as_dir in $PATH
30256do
30257  IFS=$as_save_IFS
30258  test -z "$as_dir" && as_dir=.
30259    for ac_exec_ext in '' $ac_executable_extensions; do
30260  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30261    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
30262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30263    break 2
30264  fi
30265done
30266  done
30267IFS=$as_save_IFS
30268
30269  ;;
30270esac
30271fi
30272JAVAH=$ac_cv_path_JAVAH
30273if test -n "$JAVAH"; then
30274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
30275$as_echo "$JAVAH" >&6; }
30276else
30277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30278$as_echo "no" >&6; }
30279fi
30280
30281
30282          if test "x$JAVAH" = x; then
30283            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30284          fi
30285        else
30286          # Otherwise we believe it is a complete path. Use it as it is.
30287          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
30288$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
30289          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30290$as_echo_n "checking for JAVAH... " >&6; }
30291          if test ! -x "$tool_specified"; then
30292            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30293$as_echo "not found" >&6; }
30294            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
30295          fi
30296          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30297$as_echo "$tool_specified" >&6; }
30298        fi
30299      fi
30300    fi
30301
30302  fi
30303
30304
30305
30306  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30307
30308  # Publish this variable in the help.
30309
30310
30311  if [ -z "${JAR+x}" ]; then
30312    # The variable is not set by user, try to locate tool using the code snippet
30313
30314      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30315$as_echo_n "checking for jar in Boot JDK... " >&6; }
30316      JAR=$BOOT_JDK/bin/jar
30317      if test ! -x $JAR; then
30318        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30319$as_echo "not found" >&6; }
30320        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30321$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30322        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30323      fi
30324      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30325$as_echo "ok" >&6; }
30326
30327
30328  else
30329    # The variable is set, but is it from the command line or the environment?
30330
30331    # Try to remove the string !JAR! from our list.
30332    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
30333    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30334      # If it failed, the variable was not from the command line. Ignore it,
30335      # but warn the user (except for BASH, which is always set by the calling BASH).
30336      if test "xJAR" != xBASH; then
30337        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
30338$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
30339      fi
30340      # Try to locate tool using the code snippet
30341
30342      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30343$as_echo_n "checking for jar in Boot JDK... " >&6; }
30344      JAR=$BOOT_JDK/bin/jar
30345      if test ! -x $JAR; then
30346        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30347$as_echo "not found" >&6; }
30348        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30349$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30350        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30351      fi
30352      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30353$as_echo "ok" >&6; }
30354
30355
30356    else
30357      # If it succeeded, then it was overridden by the user. We will use it
30358      # for the tool.
30359
30360      # First remove it from the list of overridden variables, so we can test
30361      # for unknown variables in the end.
30362      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30363
30364      # Check if we try to supply an empty value
30365      if test "x$JAR" = x; then
30366        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
30367$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
30368        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30369$as_echo_n "checking for JAR... " >&6; }
30370        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30371$as_echo "disabled" >&6; }
30372      else
30373        # Check if the provided tool contains a complete path.
30374        tool_specified="$JAR"
30375        tool_basename="${tool_specified##*/}"
30376        if test "x$tool_basename" = "x$tool_specified"; then
30377          # A command without a complete path is provided, search $PATH.
30378          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
30379$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
30380          # Extract the first word of "$tool_basename", so it can be a program name with args.
30381set dummy $tool_basename; ac_word=$2
30382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30383$as_echo_n "checking for $ac_word... " >&6; }
30384if ${ac_cv_path_JAR+:} false; then :
30385  $as_echo_n "(cached) " >&6
30386else
30387  case $JAR in
30388  [\\/]* | ?:[\\/]*)
30389  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
30390  ;;
30391  *)
30392  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30393for as_dir in $PATH
30394do
30395  IFS=$as_save_IFS
30396  test -z "$as_dir" && as_dir=.
30397    for ac_exec_ext in '' $ac_executable_extensions; do
30398  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30399    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
30400    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30401    break 2
30402  fi
30403done
30404  done
30405IFS=$as_save_IFS
30406
30407  ;;
30408esac
30409fi
30410JAR=$ac_cv_path_JAR
30411if test -n "$JAR"; then
30412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
30413$as_echo "$JAR" >&6; }
30414else
30415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30416$as_echo "no" >&6; }
30417fi
30418
30419
30420          if test "x$JAR" = x; then
30421            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30422          fi
30423        else
30424          # Otherwise we believe it is a complete path. Use it as it is.
30425          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
30426$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
30427          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30428$as_echo_n "checking for JAR... " >&6; }
30429          if test ! -x "$tool_specified"; then
30430            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30431$as_echo "not found" >&6; }
30432            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
30433          fi
30434          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30435$as_echo "$tool_specified" >&6; }
30436        fi
30437      fi
30438    fi
30439
30440  fi
30441
30442
30443
30444  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30445
30446  # Publish this variable in the help.
30447
30448
30449  if [ -z "${JARSIGNER+x}" ]; then
30450    # The variable is not set by user, try to locate tool using the code snippet
30451
30452      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30453$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30454      JARSIGNER=$BOOT_JDK/bin/jarsigner
30455      if test ! -x $JARSIGNER; then
30456        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30457$as_echo "not found" >&6; }
30458        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30459$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30460        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30461      fi
30462      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30463$as_echo "ok" >&6; }
30464
30465
30466  else
30467    # The variable is set, but is it from the command line or the environment?
30468
30469    # Try to remove the string !JARSIGNER! from our list.
30470    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
30471    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30472      # If it failed, the variable was not from the command line. Ignore it,
30473      # but warn the user (except for BASH, which is always set by the calling BASH).
30474      if test "xJARSIGNER" != xBASH; then
30475        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
30476$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
30477      fi
30478      # Try to locate tool using the code snippet
30479
30480      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30481$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30482      JARSIGNER=$BOOT_JDK/bin/jarsigner
30483      if test ! -x $JARSIGNER; then
30484        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30485$as_echo "not found" >&6; }
30486        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30487$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30488        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30489      fi
30490      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30491$as_echo "ok" >&6; }
30492
30493
30494    else
30495      # If it succeeded, then it was overridden by the user. We will use it
30496      # for the tool.
30497
30498      # First remove it from the list of overridden variables, so we can test
30499      # for unknown variables in the end.
30500      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30501
30502      # Check if we try to supply an empty value
30503      if test "x$JARSIGNER" = x; then
30504        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
30505$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
30506        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30507$as_echo_n "checking for JARSIGNER... " >&6; }
30508        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30509$as_echo "disabled" >&6; }
30510      else
30511        # Check if the provided tool contains a complete path.
30512        tool_specified="$JARSIGNER"
30513        tool_basename="${tool_specified##*/}"
30514        if test "x$tool_basename" = "x$tool_specified"; then
30515          # A command without a complete path is provided, search $PATH.
30516          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
30517$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
30518          # Extract the first word of "$tool_basename", so it can be a program name with args.
30519set dummy $tool_basename; ac_word=$2
30520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30521$as_echo_n "checking for $ac_word... " >&6; }
30522if ${ac_cv_path_JARSIGNER+:} false; then :
30523  $as_echo_n "(cached) " >&6
30524else
30525  case $JARSIGNER in
30526  [\\/]* | ?:[\\/]*)
30527  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
30528  ;;
30529  *)
30530  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30531for as_dir in $PATH
30532do
30533  IFS=$as_save_IFS
30534  test -z "$as_dir" && as_dir=.
30535    for ac_exec_ext in '' $ac_executable_extensions; do
30536  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30537    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
30538    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30539    break 2
30540  fi
30541done
30542  done
30543IFS=$as_save_IFS
30544
30545  ;;
30546esac
30547fi
30548JARSIGNER=$ac_cv_path_JARSIGNER
30549if test -n "$JARSIGNER"; then
30550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
30551$as_echo "$JARSIGNER" >&6; }
30552else
30553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30554$as_echo "no" >&6; }
30555fi
30556
30557
30558          if test "x$JARSIGNER" = x; then
30559            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30560          fi
30561        else
30562          # Otherwise we believe it is a complete path. Use it as it is.
30563          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
30564$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
30565          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30566$as_echo_n "checking for JARSIGNER... " >&6; }
30567          if test ! -x "$tool_specified"; then
30568            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30569$as_echo "not found" >&6; }
30570            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
30571          fi
30572          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30573$as_echo "$tool_specified" >&6; }
30574        fi
30575      fi
30576    fi
30577
30578  fi
30579
30580
30581
30582  # Finally, set some other options...
30583
30584  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
30585  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
30586
30587
30588
30589  $ECHO "Check if jvm arg is ok: --patch-module foo=bar" >&5
30590  $ECHO "Command: $JAVA --patch-module foo=bar -version" >&5
30591  OUTPUT=`$JAVA --patch-module foo=bar -version 2>&1`
30592  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
30593  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
30594  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30595    dummy="$dummy --patch-module foo=bar"
30596    JVM_ARG_OK=true
30597  else
30598    $ECHO "Arg failed:" >&5
30599    $ECHO "$OUTPUT" >&5
30600    JVM_ARG_OK=false
30601  fi
30602
30603  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
30604$as_echo_n "checking if Boot JDK supports modules... " >&6; }
30605  if test "x$JVM_ARG_OK" = "xtrue"; then
30606    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30607$as_echo "yes" >&6; }
30608    BOOT_JDK_MODULAR="true"
30609  else
30610    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30611$as_echo "no" >&6; }
30612    BOOT_JDK_MODULAR="false"
30613  fi
30614
30615
30616
30617
30618  # Check if the boot jdk is 32 or 64 bit
30619  if "$JAVA" -d64 -version > /dev/null 2>&1; then
30620    BOOT_JDK_BITS="64"
30621  else
30622    BOOT_JDK_BITS="32"
30623  fi
30624  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
30625$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
30626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
30627$as_echo "$BOOT_JDK_BITS" >&6; }
30628
30629
30630
30631
30632# Check whether --with-build-jdk was given.
30633if test "${with_build_jdk+set}" = set; then :
30634  withval=$with_build_jdk;
30635fi
30636
30637
30638  CREATE_BUILDJDK=false
30639  EXTERNAL_BUILDJDK=false
30640  BUILD_JDK_FOUND="no"
30641  if test "x$with_build_jdk" != "x"; then
30642
30643  if test "x$BUILD_JDK_FOUND" = xno; then
30644    # Execute the test
30645
30646       if test "x$with_build_jdk" != x; then
30647         BUILD_JDK=$with_build_jdk
30648         BUILD_JDK_FOUND=maybe
30649         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
30650$as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
30651       fi
30652
30653    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30654    if test "x$BUILD_JDK_FOUND" = xmaybe; then
30655      # Do we have a bin/java?
30656      if test ! -x "$BUILD_JDK/bin/java"; then
30657        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
30658$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
30659        BUILD_JDK_FOUND=no
30660      elif test ! -x "$BUILD_JDK/bin/jlink"; then
30661        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
30662$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
30663        BUILD_JDK_FOUND=no
30664      elif test ! -x "$BUILD_JDK/bin/jmod"; then
30665        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&5
30666$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&6;}
30667        BUILD_JDK_FOUND=no
30668      elif test ! -x "$BUILD_JDK/bin/javac"; then
30669        # Do we have a bin/javac?
30670        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
30671$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
30672        { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
30673$as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
30674        BUILD_JDK_FOUND=no
30675      else
30676        # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30677        BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30678
30679        # Extra M4 quote needed to protect [] in grep expression.
30680        FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
30681        if test "x$FOUND_CORRECT_VERSION" = x; then
30682          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
30683$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
30684          { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
30685$as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
30686          BUILD_JDK_FOUND=no
30687        else
30688          # We're done!
30689          BUILD_JDK_FOUND=yes
30690
30691  # Only process if variable expands to non-empty
30692
30693  if test "x$BUILD_JDK" != x; then
30694    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30695
30696  # Input might be given as Windows format, start by converting to
30697  # unix format.
30698  path="$BUILD_JDK"
30699  new_path=`$CYGPATH -u "$path"`
30700
30701  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30702  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30703  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30704  # "foo.exe" is OK but "foo" is an error.
30705  #
30706  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30707  # It is also a way to make sure we got the proper file name for the real test later on.
30708  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30709  if test "x$test_shortpath" = x; then
30710    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30711$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30712    as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
30713  fi
30714
30715  # Call helper function which possibly converts this using DOS-style short mode.
30716  # If so, the updated path is stored in $new_path.
30717
30718  input_path="$new_path"
30719  # Check if we need to convert this using DOS-style short mode. If the path
30720  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30721  # take no chances and rewrite it.
30722  # Note: m4 eats our [], so we need to use [ and ] instead.
30723  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30724  if test "x$has_forbidden_chars" != x; then
30725    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30726    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30727    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30728    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30729      # Going to short mode and back again did indeed matter. Since short mode is
30730      # case insensitive, let's make it lowercase to improve readability.
30731      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30732      # Now convert it back to Unix-style (cygpath)
30733      input_path=`$CYGPATH -u "$shortmode_path"`
30734      new_path="$input_path"
30735    fi
30736  fi
30737
30738  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30739  if test "x$test_cygdrive_prefix" = x; then
30740    # As a simple fix, exclude /usr/bin since it's not a real path.
30741    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30742      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30743      # a path prefixed by /cygdrive for fixpath to work.
30744      new_path="$CYGWIN_ROOT_PATH$input_path"
30745    fi
30746  fi
30747
30748
30749  if test "x$path" != "x$new_path"; then
30750    BUILD_JDK="$new_path"
30751    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30752$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30753  fi
30754
30755    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30756
30757  path="$BUILD_JDK"
30758  has_colon=`$ECHO $path | $GREP ^.:`
30759  new_path="$path"
30760  if test "x$has_colon" = x; then
30761    # Not in mixed or Windows style, start by that.
30762    new_path=`cmd //c echo $path`
30763  fi
30764
30765
30766  input_path="$new_path"
30767  # Check if we need to convert this using DOS-style short mode. If the path
30768  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30769  # take no chances and rewrite it.
30770  # Note: m4 eats our [], so we need to use [ and ] instead.
30771  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30772  if test "x$has_forbidden_chars" != x; then
30773    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30774    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30775  fi
30776
30777
30778  windows_path="$new_path"
30779  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30780    unix_path=`$CYGPATH -u "$windows_path"`
30781    new_path="$unix_path"
30782  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30783    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30784    new_path="$unix_path"
30785  fi
30786
30787  if test "x$path" != "x$new_path"; then
30788    BUILD_JDK="$new_path"
30789    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30790$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30791  fi
30792
30793  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30794  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30795
30796    else
30797      # We're on a unix platform. Hooray! :)
30798      path="$BUILD_JDK"
30799      has_space=`$ECHO "$path" | $GREP " "`
30800      if test "x$has_space" != x; then
30801        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30802$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30803        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30804      fi
30805
30806      # Use eval to expand a potential ~
30807      eval path="$path"
30808      if test ! -f "$path" && test ! -d "$path"; then
30809        as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30810      fi
30811
30812      if test -d "$path"; then
30813        BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
30814      else
30815        dir="`$DIRNAME "$path"`"
30816        base="`$BASENAME "$path"`"
30817        BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30818      fi
30819    fi
30820  fi
30821
30822          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30823$as_echo_n "checking for Build JDK... " >&6; }
30824          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
30825$as_echo "$BUILD_JDK" >&6; }
30826          { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
30827$as_echo_n "checking Build JDK version... " >&6; }
30828          BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30829          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
30830$as_echo "$BUILD_JDK_VERSION" >&6; }
30831        fi # end check jdk version
30832      fi # end check java
30833    fi # end check build jdk found
30834  fi
30835
30836    EXTERNAL_BUILDJDK=true
30837  else
30838    if test "x$COMPILE_TYPE" = "xcross"; then
30839      BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
30840      BUILD_JDK_FOUND=yes
30841      CREATE_BUILDJDK=true
30842      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30843$as_echo_n "checking for Build JDK... " >&6; }
30844      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
30845$as_echo "yes, will build it for the host platform" >&6; }
30846    else
30847      BUILD_JDK="\$(JDK_OUTPUTDIR)"
30848      BUILD_JDK_FOUND=yes
30849      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30850$as_echo_n "checking for Build JDK... " >&6; }
30851      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
30852$as_echo "yes, will use output dir" >&6; }
30853    fi
30854  fi
30855
30856  JMOD="$BUILD_JDK/bin/jmod"
30857  JLINK="$BUILD_JDK/bin/jlink"
30858
30859
30860
30861  if test "x$BUILD_JDK_FOUND" != "xyes"; then
30862    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30863$as_echo_n "checking for Build JDK... " >&6; }
30864    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30865$as_echo "no" >&6; }
30866    as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
30867  fi
30868
30869
30870
30871
30872
30873
30874###############################################################################
30875#
30876# Configure the sources to use. We can add or override individual directories.
30877#
30878###############################################################################
30879
30880
30881  # Where are the sources.
30882  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
30883  CORBA_TOPDIR="$SRC_ROOT/corba"
30884  JAXP_TOPDIR="$SRC_ROOT/jaxp"
30885  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
30886  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
30887  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
30888  JDK_TOPDIR="$SRC_ROOT/jdk"
30889
30890
30891
30892
30893
30894
30895
30896
30897
30898  # This feature is no longer supported.
30899
30900
30901
30902# Check whether --with-add-source-root was given.
30903if test "${with_add_source_root+set}" = set; then :
30904  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
30905$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
30906fi
30907
30908
30909
30910
30911# Check whether --with-override-source-root was given.
30912if test "${with_override_source_root+set}" = set; then :
30913  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
30914$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
30915fi
30916
30917
30918
30919
30920# Check whether --with-adds-and-overrides was given.
30921if test "${with_adds_and_overrides+set}" = set; then :
30922  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
30923$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
30924fi
30925
30926
30927
30928
30929# Check whether --with-override-langtools was given.
30930if test "${with_override_langtools+set}" = set; then :
30931  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
30932$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
30933fi
30934
30935
30936
30937
30938# Check whether --with-override-corba was given.
30939if test "${with_override_corba+set}" = set; then :
30940  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
30941$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
30942fi
30943
30944
30945
30946
30947# Check whether --with-override-jaxp was given.
30948if test "${with_override_jaxp+set}" = set; then :
30949  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
30950$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
30951fi
30952
30953
30954
30955
30956# Check whether --with-override-jaxws was given.
30957if test "${with_override_jaxws+set}" = set; then :
30958  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
30959$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
30960fi
30961
30962
30963
30964
30965# Check whether --with-override-hotspot was given.
30966if test "${with_override_hotspot+set}" = set; then :
30967  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
30968$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
30969fi
30970
30971
30972
30973
30974# Check whether --with-override-nashorn was given.
30975if test "${with_override_nashorn+set}" = set; then :
30976  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
30977$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
30978fi
30979
30980
30981
30982
30983# Check whether --with-override-jdk was given.
30984if test "${with_override_jdk+set}" = set; then :
30985  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
30986$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
30987fi
30988
30989
30990
30991
30992  BUILD_OUTPUT="$OUTPUT_ROOT"
30993
30994
30995  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
30996  BUILD_HOTSPOT=true
30997
30998
30999
31000# Check whether --with-import-hotspot was given.
31001if test "${with_import_hotspot+set}" = set; then :
31002  withval=$with_import_hotspot;
31003fi
31004
31005  if test "x$with_import_hotspot" != x; then
31006    CURDIR="$PWD"
31007    cd "$with_import_hotspot"
31008    HOTSPOT_DIST="`pwd`"
31009    cd "$CURDIR"
31010    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
31011      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
31012    fi
31013    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
31014$as_echo_n "checking if hotspot should be imported... " >&6; }
31015    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
31016$as_echo "yes from $HOTSPOT_DIST" >&6; }
31017    BUILD_HOTSPOT=false
31018  fi
31019
31020  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
31021
31022
31023
31024
31025# Check whether --with-import-modules was given.
31026if test "${with_import_modules+set}" = set; then :
31027  withval=$with_import_modules;
31028fi
31029
31030
31031  if test "x$with_import_modules" != x \
31032      && test "x$with_import_modules" != "xno"; then
31033    if test -d "$with_import_modules"; then
31034      IMPORT_MODULES_TOPDIR="$with_import_modules"
31035
31036  # Only process if variable expands to non-empty
31037
31038  if test "x$IMPORT_MODULES_TOPDIR" != x; then
31039    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31040
31041  # Input might be given as Windows format, start by converting to
31042  # unix format.
31043  path="$IMPORT_MODULES_TOPDIR"
31044  new_path=`$CYGPATH -u "$path"`
31045
31046  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31047  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31048  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31049  # "foo.exe" is OK but "foo" is an error.
31050  #
31051  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31052  # It is also a way to make sure we got the proper file name for the real test later on.
31053  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31054  if test "x$test_shortpath" = x; then
31055    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31056$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31057    as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
31058  fi
31059
31060  # Call helper function which possibly converts this using DOS-style short mode.
31061  # If so, the updated path is stored in $new_path.
31062
31063  input_path="$new_path"
31064  # Check if we need to convert this using DOS-style short mode. If the path
31065  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31066  # take no chances and rewrite it.
31067  # Note: m4 eats our [], so we need to use [ and ] instead.
31068  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31069  if test "x$has_forbidden_chars" != x; then
31070    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31071    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31072    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31073    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31074      # Going to short mode and back again did indeed matter. Since short mode is
31075      # case insensitive, let's make it lowercase to improve readability.
31076      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31077      # Now convert it back to Unix-style (cygpath)
31078      input_path=`$CYGPATH -u "$shortmode_path"`
31079      new_path="$input_path"
31080    fi
31081  fi
31082
31083  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31084  if test "x$test_cygdrive_prefix" = x; then
31085    # As a simple fix, exclude /usr/bin since it's not a real path.
31086    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31087      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31088      # a path prefixed by /cygdrive for fixpath to work.
31089      new_path="$CYGWIN_ROOT_PATH$input_path"
31090    fi
31091  fi
31092
31093
31094  if test "x$path" != "x$new_path"; then
31095    IMPORT_MODULES_TOPDIR="$new_path"
31096    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31097$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31098  fi
31099
31100    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31101
31102  path="$IMPORT_MODULES_TOPDIR"
31103  has_colon=`$ECHO $path | $GREP ^.:`
31104  new_path="$path"
31105  if test "x$has_colon" = x; then
31106    # Not in mixed or Windows style, start by that.
31107    new_path=`cmd //c echo $path`
31108  fi
31109
31110
31111  input_path="$new_path"
31112  # Check if we need to convert this using DOS-style short mode. If the path
31113  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31114  # take no chances and rewrite it.
31115  # Note: m4 eats our [], so we need to use [ and ] instead.
31116  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31117  if test "x$has_forbidden_chars" != x; then
31118    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31119    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31120  fi
31121
31122
31123  windows_path="$new_path"
31124  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31125    unix_path=`$CYGPATH -u "$windows_path"`
31126    new_path="$unix_path"
31127  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31128    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31129    new_path="$unix_path"
31130  fi
31131
31132  if test "x$path" != "x$new_path"; then
31133    IMPORT_MODULES_TOPDIR="$new_path"
31134    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31135$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31136  fi
31137
31138  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31139  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31140
31141    else
31142      # We're on a unix platform. Hooray! :)
31143      path="$IMPORT_MODULES_TOPDIR"
31144      has_space=`$ECHO "$path" | $GREP " "`
31145      if test "x$has_space" != x; then
31146        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31147$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31148        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31149      fi
31150
31151      # Use eval to expand a potential ~
31152      eval path="$path"
31153      if test ! -f "$path" && test ! -d "$path"; then
31154        as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
31155      fi
31156
31157      if test -d "$path"; then
31158        IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
31159      else
31160        dir="`$DIRNAME "$path"`"
31161        base="`$BASENAME "$path"`"
31162        IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
31163      fi
31164    fi
31165  fi
31166
31167    elif test -e "$with_import_modules"; then
31168      IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
31169      $RM -rf "$IMPORT_MODULES_TOPDIR"
31170      $MKDIR -p "$IMPORT_MODULES_TOPDIR"
31171      if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
31172        as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31173      fi
31174    else
31175      as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31176    fi
31177  fi
31178
31179  if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
31180    IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
31181  fi
31182  if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
31183    IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
31184  fi
31185  if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
31186    IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
31187  fi
31188  if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
31189    IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
31190  fi
31191  if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
31192    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
31193  fi
31194  if test -d "$IMPORT_MODULES_TOPDIR/make"; then
31195    IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
31196  fi
31197
31198
31199
31200
31201
31202
31203
31204
31205
31206###############################################################################
31207#
31208# Setup the toolchain (compilers etc), i.e. tools used to compile and process
31209# native code.
31210#
31211###############################################################################
31212
31213# See if we are doing a complete static build or not
31214
31215  # Check whether --enable-static-build was given.
31216if test "${enable_static_build+set}" = set; then :
31217  enableval=$enable_static_build;
31218fi
31219
31220  STATIC_BUILD=false
31221  if test "x$enable_static_build" = "xyes"; then
31222    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31223$as_echo_n "checking if static build is enabled... " >&6; }
31224    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31225$as_echo "yes" >&6; }
31226    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
31227      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
31228    fi
31229    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
31230    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
31231    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
31232    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31233    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31234    STATIC_BUILD=true
31235  elif test "x$enable_static_build" = "xno"; then
31236    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31237$as_echo_n "checking if static build is enabled... " >&6; }
31238    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31239$as_echo "no" >&6; }
31240  elif test "x$enable_static_build" != "x"; then
31241    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
31242  fi
31243
31244
31245
31246
31247# First determine the toolchain type (compiler family)
31248
31249
31250# Check whether --with-toolchain-type was given.
31251if test "${with_toolchain_type+set}" = set; then :
31252  withval=$with_toolchain_type;
31253fi
31254
31255
31256  # Use indirect variable referencing
31257  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
31258  VALID_TOOLCHAINS=${!toolchain_var_name}
31259
31260  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31261    if test -n "$XCODEBUILD"; then
31262      # On Mac OS X, default toolchain to clang after Xcode 5
31263      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
31264      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
31265      if test $? -ne 0; then
31266        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
31267      fi
31268      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
31269          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
31270          $CUT -f 1 -d .`
31271      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
31272$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
31273      if test $XCODE_MAJOR_VERSION -ge 5; then
31274          DEFAULT_TOOLCHAIN="clang"
31275      else
31276          DEFAULT_TOOLCHAIN="gcc"
31277      fi
31278    else
31279      # If Xcode is not installed, but the command line tools are
31280      # then we can't run xcodebuild. On these systems we should
31281      # default to clang
31282      DEFAULT_TOOLCHAIN="clang"
31283    fi
31284  else
31285    # First toolchain type in the list is the default
31286    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
31287  fi
31288
31289  if test "x$with_toolchain_type" = xlist; then
31290    # List all toolchains
31291    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
31292$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
31293    for toolchain in $VALID_TOOLCHAINS; do
31294      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
31295      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31296      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
31297    done
31298
31299    exit 0
31300  elif test "x$with_toolchain_type" != x; then
31301    # User override; check that it is valid
31302    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
31303      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
31304$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
31305      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
31306$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
31307      as_fn_error $? "Cannot continue." "$LINENO" 5
31308    fi
31309    TOOLCHAIN_TYPE=$with_toolchain_type
31310  else
31311    # No flag given, use default
31312    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
31313  fi
31314
31315
31316  TOOLCHAIN_CC_BINARY_clang="clang"
31317  TOOLCHAIN_CC_BINARY_gcc="gcc"
31318  TOOLCHAIN_CC_BINARY_microsoft="cl"
31319  TOOLCHAIN_CC_BINARY_solstudio="cc"
31320  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
31321
31322  TOOLCHAIN_CXX_BINARY_clang="clang++"
31323  TOOLCHAIN_CXX_BINARY_gcc="g++"
31324  TOOLCHAIN_CXX_BINARY_microsoft="cl"
31325  TOOLCHAIN_CXX_BINARY_solstudio="CC"
31326  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
31327
31328  # Use indirect variable referencing
31329  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
31330  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31331  toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
31332  TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
31333  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
31334  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
31335  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
31336  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
31337
31338
31339  # Define filename patterns
31340  if test "x$OPENJDK_TARGET_OS" = xwindows; then
31341    LIBRARY_PREFIX=
31342    SHARED_LIBRARY_SUFFIX='.dll'
31343    STATIC_LIBRARY_SUFFIX='.lib'
31344    SHARED_LIBRARY='$1.dll'
31345    STATIC_LIBRARY='$1.lib'
31346    OBJ_SUFFIX='.obj'
31347    EXE_SUFFIX='.exe'
31348  else
31349    LIBRARY_PREFIX=lib
31350    SHARED_LIBRARY_SUFFIX='.so'
31351    STATIC_LIBRARY_SUFFIX='.a'
31352    SHARED_LIBRARY='lib$1.so'
31353    STATIC_LIBRARY='lib$1.a'
31354    OBJ_SUFFIX='.o'
31355    EXE_SUFFIX=''
31356    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31357      # For full static builds, we're overloading the SHARED_LIBRARY
31358      # variables in order to limit the amount of changes required.
31359      # It would be better to remove SHARED and just use LIBRARY and
31360      # LIBRARY_SUFFIX for libraries that can be built either
31361      # shared or static and use STATIC_* for libraries that are
31362      # always built statically.
31363      if test "x$STATIC_BUILD" = xtrue; then
31364        SHARED_LIBRARY='lib$1.a'
31365        SHARED_LIBRARY_SUFFIX='.a'
31366      else
31367        SHARED_LIBRARY='lib$1.dylib'
31368        SHARED_LIBRARY_SUFFIX='.dylib'
31369      fi
31370    fi
31371  fi
31372
31373
31374
31375
31376
31377
31378
31379
31380
31381
31382  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
31383    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
31384$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
31385  else
31386    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
31387$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
31388  fi
31389
31390
31391# User supplied flags should be used when configure detects compilers
31392
31393  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
31394    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
31395$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
31396  fi
31397
31398  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
31399    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
31400$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
31401  fi
31402
31403  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
31404    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
31405$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
31406  fi
31407
31408
31409# Check whether --with-extra-cflags was given.
31410if test "${with_extra_cflags+set}" = set; then :
31411  withval=$with_extra_cflags;
31412fi
31413
31414
31415
31416# Check whether --with-extra-cxxflags was given.
31417if test "${with_extra_cxxflags+set}" = set; then :
31418  withval=$with_extra_cxxflags;
31419fi
31420
31421
31422
31423# Check whether --with-extra-ldflags was given.
31424if test "${with_extra_ldflags+set}" = set; then :
31425  withval=$with_extra_ldflags;
31426fi
31427
31428
31429  EXTRA_CFLAGS="$with_extra_cflags"
31430  EXTRA_CXXFLAGS="$with_extra_cxxflags"
31431  EXTRA_LDFLAGS="$with_extra_ldflags"
31432
31433  # Hotspot needs these set in their legacy form
31434  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
31435  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
31436  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
31437
31438
31439
31440
31441
31442
31443
31444
31445
31446  # The global CFLAGS and LDLAGS variables are used by configure tests and
31447  # should include the extra parameters
31448  CFLAGS="$EXTRA_CFLAGS"
31449  CXXFLAGS="$EXTRA_CXXFLAGS"
31450  LDFLAGS="$EXTRA_LDFLAGS"
31451  CPPFLAGS=""
31452
31453# The sysroot cflags are needed for configure to be able to run the compilers
31454
31455  if test "x$SYSROOT" != "x"; then
31456    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31457      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31458        # Solaris Studio does not have a concept of sysroot. Instead we must
31459        # make sure the default include and lib dirs are appended to each
31460        # compile and link command line. Must also add -I-xbuiltin to enable
31461        # inlining of system functions and intrinsics.
31462        SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
31463        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
31464            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
31465      fi
31466    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
31467      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
31468      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
31469    elif test "x$TOOLCHAIN_TYPE" = xclang; then
31470      SYSROOT_CFLAGS="-isysroot $SYSROOT"
31471      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
31472    fi
31473    # Propagate the sysroot args to hotspot
31474    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
31475    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
31476    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
31477    # The global CFLAGS and LDFLAGS variables need these for configure to function
31478    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
31479    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
31480    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
31481    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
31482  fi
31483
31484  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31485    # We also need -iframework<path>/System/Library/Frameworks
31486    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31487    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31488    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
31489    # set this here so it doesn't have to be peppered throughout the forest
31490    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31491    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31492  fi
31493
31494
31495
31496
31497
31498# Then detect the actual binaries needed
31499
31500  # FIXME: Is this needed?
31501  ac_ext=cpp
31502ac_cpp='$CXXCPP $CPPFLAGS'
31503ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31504ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31505ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31506
31507
31508  # Store the CFLAGS etc passed to the configure script.
31509  ORG_CFLAGS="$CFLAGS"
31510  ORG_CXXFLAGS="$CXXFLAGS"
31511
31512  # autoconf magic only relies on PATH, so update it if tools dir is specified
31513  OLD_PATH="$PATH"
31514
31515  # On Windows, we need to detect the visual studio installation first.
31516  # This will change the PATH, but we need to keep that new PATH even
31517  # after toolchain detection is done, since the compiler (on x86) uses
31518  # it for DLL resolution in runtime.
31519  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
31520      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
31521
31522  # Store path to cygwin link.exe to help excluding it when searching for
31523  # VS linker. This must be done before changing the PATH when looking for VS.
31524  # Extract the first word of "link", so it can be a program name with args.
31525set dummy link; ac_word=$2
31526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31527$as_echo_n "checking for $ac_word... " >&6; }
31528if ${ac_cv_path_CYGWIN_LINK+:} false; then :
31529  $as_echo_n "(cached) " >&6
31530else
31531  case $CYGWIN_LINK in
31532  [\\/]* | ?:[\\/]*)
31533  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
31534  ;;
31535  *)
31536  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31537for as_dir in $PATH
31538do
31539  IFS=$as_save_IFS
31540  test -z "$as_dir" && as_dir=.
31541    for ac_exec_ext in '' $ac_executable_extensions; do
31542  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31543    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
31544    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31545    break 2
31546  fi
31547done
31548  done
31549IFS=$as_save_IFS
31550
31551  ;;
31552esac
31553fi
31554CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
31555if test -n "$CYGWIN_LINK"; then
31556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
31557$as_echo "$CYGWIN_LINK" >&6; }
31558else
31559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31560$as_echo "no" >&6; }
31561fi
31562
31563
31564  if test "x$CYGWIN_LINK" != x; then
31565    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
31566$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
31567    "$CYGWIN_LINK" --version > /dev/null
31568    if test $? -eq 0 ; then
31569      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31570$as_echo "yes" >&6; }
31571    else
31572      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31573$as_echo "no" >&6; }
31574      # This might be the VS linker. Don't exclude it later on.
31575      CYGWIN_LINK=""
31576    fi
31577  fi
31578
31579  # First-hand choice is to locate and run the vsvars bat file.
31580
31581
31582# Check whether --with-toolchain-version was given.
31583if test "${with_toolchain_version+set}" = set; then :
31584  withval=$with_toolchain_version;
31585fi
31586
31587
31588  if test "x$with_toolchain_version" = xlist; then
31589    # List all toolchains
31590    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
31591$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
31592    for version in $VALID_VS_VERSIONS; do
31593      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
31594      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
31595    done
31596
31597    exit 0
31598  elif test "x$DEVKIT_VS_VERSION" != x; then
31599    VS_VERSION=$DEVKIT_VS_VERSION
31600    TOOLCHAIN_VERSION=$VS_VERSION
31601    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
31602    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
31603    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
31604    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
31605    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31606    VS_PATH="$TOOLCHAIN_PATH:$PATH"
31607
31608    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
31609    # can still be exported as INCLUDE for compiler invocations without
31610    # SYSROOT_CFLAGS
31611    OLDIFS="$IFS"
31612    IFS=";"
31613    for i in $DEVKIT_VS_INCLUDE; do
31614      ipath=$i
31615
31616  unix_path="$ipath"
31617  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31618    windows_path=`$CYGPATH -m "$unix_path"`
31619    ipath="$windows_path"
31620  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31621    windows_path=`cmd //c echo $unix_path`
31622    ipath="$windows_path"
31623  fi
31624
31625      VS_INCLUDE="$VS_INCLUDE;$ipath"
31626    done
31627    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
31628    # as LIB for compiler invocations without SYSROOT_LDFLAGS
31629    for i in $DEVKIT_VS_LIB; do
31630      libpath=$i
31631
31632  unix_path="$libpath"
31633  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31634    windows_path=`$CYGPATH -m "$unix_path"`
31635    libpath="$windows_path"
31636  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31637    windows_path=`cmd //c echo $unix_path`
31638    libpath="$windows_path"
31639  fi
31640
31641      VS_LIB="$VS_LIB;$libpath"
31642    done
31643    IFS="$OLDIFS"
31644
31645    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
31646$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
31647
31648  elif test "x$with_toolchain_version" != x; then
31649    # User override; check that it is valid
31650    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
31651      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
31652$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
31653      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
31654$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
31655      as_fn_error $? "Cannot continue." "$LINENO" 5
31656    fi
31657    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
31658  else
31659    # No flag given, use default
31660    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
31661  fi
31662
31663  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
31664
31665  VS_VERSION="$VS_VERSION"
31666  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
31667  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
31668  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
31669  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
31670
31671  # When using --with-tools-dir, assume it points to the correct and default
31672  # version of Visual Studio or that --with-toolchain-version was also set.
31673  if test "x$with_tools_dir" != x; then
31674
31675  if test "x$VS_ENV_CMD" = x; then
31676    VS_VERSION="${VS_VERSION}"
31677    VS_BASE="$with_tools_dir/../.."
31678    METHOD="--with-tools-dir"
31679
31680    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31681      VCVARSFILE="vc/bin/vcvars32.bat"
31682    else
31683      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31684    fi
31685
31686
31687  windows_path="$VS_BASE"
31688  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31689    unix_path=`$CYGPATH -u "$windows_path"`
31690    VS_BASE="$unix_path"
31691  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31692    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31693    VS_BASE="$unix_path"
31694  fi
31695
31696    if test -d "$VS_BASE"; then
31697      if test -f "$VS_BASE/$VCVARSFILE"; then
31698        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31699$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31700        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31701        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31702        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31703        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31704      else
31705        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31706$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31707        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31708$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31709      fi
31710    fi
31711  fi
31712
31713
31714  if test "x$VS_ENV_CMD" = x; then
31715    VS_VERSION="${VS_VERSION}"
31716    VS_BASE="$with_tools_dir/../../.."
31717    METHOD="--with-tools-dir"
31718
31719    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31720      VCVARSFILE="vc/bin/vcvars32.bat"
31721    else
31722      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31723    fi
31724
31725
31726  windows_path="$VS_BASE"
31727  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31728    unix_path=`$CYGPATH -u "$windows_path"`
31729    VS_BASE="$unix_path"
31730  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31731    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31732    VS_BASE="$unix_path"
31733  fi
31734
31735    if test -d "$VS_BASE"; then
31736      if test -f "$VS_BASE/$VCVARSFILE"; then
31737        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31738$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31739        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31740        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31741        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31742        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31743      else
31744        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31745$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31746        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31747$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31748      fi
31749    fi
31750  fi
31751
31752    if test "x$VS_ENV_CMD" = x; then
31753      # Having specified an argument which is incorrect will produce an instant failure;
31754      # we should not go on looking
31755      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
31756$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
31757      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
31758$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
31759      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
31760$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
31761      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
31762    fi
31763  fi
31764
31765  VS_ENV_CMD=""
31766  VS_ENV_ARGS=""
31767
31768  if test "x$VS_COMNTOOLS" != x; then
31769
31770  if test "x$VS_ENV_CMD" = x; then
31771    VS_VERSION="${VS_VERSION}"
31772    VS_BASE="$VS_COMNTOOLS/../.."
31773    METHOD="$VS_COMNTOOLS_VAR variable"
31774
31775    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31776      VCVARSFILE="vc/bin/vcvars32.bat"
31777    else
31778      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31779    fi
31780
31781
31782  windows_path="$VS_BASE"
31783  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31784    unix_path=`$CYGPATH -u "$windows_path"`
31785    VS_BASE="$unix_path"
31786  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31787    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31788    VS_BASE="$unix_path"
31789  fi
31790
31791    if test -d "$VS_BASE"; then
31792      if test -f "$VS_BASE/$VCVARSFILE"; then
31793        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31794$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31795        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31796        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31797        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31798        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31799      else
31800        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31801$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31802        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31803$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31804      fi
31805    fi
31806  fi
31807
31808  fi
31809  if test "x$PROGRAMFILES" != x; then
31810
31811  if test "x$VS_ENV_CMD" = x; then
31812    VS_VERSION="${VS_VERSION}"
31813    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
31814    METHOD="well-known name"
31815
31816    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31817      VCVARSFILE="vc/bin/vcvars32.bat"
31818    else
31819      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31820    fi
31821
31822
31823  windows_path="$VS_BASE"
31824  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31825    unix_path=`$CYGPATH -u "$windows_path"`
31826    VS_BASE="$unix_path"
31827  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31828    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31829    VS_BASE="$unix_path"
31830  fi
31831
31832    if test -d "$VS_BASE"; then
31833      if test -f "$VS_BASE/$VCVARSFILE"; then
31834        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31835$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31836        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31837        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31838        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31839        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31840      else
31841        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31842$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31843        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31844$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31845      fi
31846    fi
31847  fi
31848
31849  fi
31850  # Work around the insanely named ProgramFiles(x86) env variable
31851  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
31852  if test "x$PROGRAMFILES_X86" != x; then
31853
31854  if test "x$VS_ENV_CMD" = x; then
31855    VS_VERSION="${VS_VERSION}"
31856    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
31857    METHOD="well-known name"
31858
31859    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31860      VCVARSFILE="vc/bin/vcvars32.bat"
31861    else
31862      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31863    fi
31864
31865
31866  windows_path="$VS_BASE"
31867  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31868    unix_path=`$CYGPATH -u "$windows_path"`
31869    VS_BASE="$unix_path"
31870  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31871    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31872    VS_BASE="$unix_path"
31873  fi
31874
31875    if test -d "$VS_BASE"; then
31876      if test -f "$VS_BASE/$VCVARSFILE"; then
31877        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31878$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31879        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31880        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31881        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31882        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31883      else
31884        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31885$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31886        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31887$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31888      fi
31889    fi
31890  fi
31891
31892  fi
31893
31894  if test "x$VS_ENV_CMD" = x; then
31895    VS_VERSION="${VS_VERSION}"
31896    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
31897    METHOD="well-known name"
31898
31899    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31900      VCVARSFILE="vc/bin/vcvars32.bat"
31901    else
31902      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31903    fi
31904
31905
31906  windows_path="$VS_BASE"
31907  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31908    unix_path=`$CYGPATH -u "$windows_path"`
31909    VS_BASE="$unix_path"
31910  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31911    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31912    VS_BASE="$unix_path"
31913  fi
31914
31915    if test -d "$VS_BASE"; then
31916      if test -f "$VS_BASE/$VCVARSFILE"; then
31917        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31918$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31919        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31920        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31921        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31922        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31923      else
31924        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31925$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31926        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31927$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31928      fi
31929    fi
31930  fi
31931
31932
31933  if test "x$VS_ENV_CMD" = x; then
31934    VS_VERSION="${VS_VERSION}"
31935    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
31936    METHOD="well-known name"
31937
31938    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31939      VCVARSFILE="vc/bin/vcvars32.bat"
31940    else
31941      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31942    fi
31943
31944
31945  windows_path="$VS_BASE"
31946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31947    unix_path=`$CYGPATH -u "$windows_path"`
31948    VS_BASE="$unix_path"
31949  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31950    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31951    VS_BASE="$unix_path"
31952  fi
31953
31954    if test -d "$VS_BASE"; then
31955      if test -f "$VS_BASE/$VCVARSFILE"; then
31956        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31957$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31958        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31959        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31960        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31961        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31962      else
31963        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31964$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31965        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31966$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31967      fi
31968    fi
31969  fi
31970
31971
31972  if test "x$SDK_INSTALL_DIR" != x; then
31973    if test "x$ProgramW6432" != x; then
31974
31975  if test "x$VS_ENV_CMD" = x; then
31976    VS_VERSION="${VS_VERSION}"
31977    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
31978    METHOD="well-known name"
31979
31980  windows_path="$WIN_SDK_BASE"
31981  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31982    unix_path=`$CYGPATH -u "$windows_path"`
31983    WIN_SDK_BASE="$unix_path"
31984  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31985    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31986    WIN_SDK_BASE="$unix_path"
31987  fi
31988
31989    if test -d "$WIN_SDK_BASE"; then
31990      # There have been cases of partial or broken SDK installations. A missing
31991      # lib dir is not going to work.
31992      if test ! -d "$WIN_SDK_BASE/lib"; then
31993        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31994$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31995        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31996$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31997      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31998        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31999$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32000        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32001        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32002          VS_ENV_ARGS="/x86"
32003        else
32004          VS_ENV_ARGS="/x64"
32005        fi
32006        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32007        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32008        # TODO: improve detection for other versions of SDK
32009        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32010      else
32011        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32012$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32013        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32014$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32015      fi
32016    fi
32017  fi
32018
32019    fi
32020    if test "x$PROGRAMW6432" != x; then
32021
32022  if test "x$VS_ENV_CMD" = x; then
32023    VS_VERSION="${VS_VERSION}"
32024    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
32025    METHOD="well-known name"
32026
32027  windows_path="$WIN_SDK_BASE"
32028  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32029    unix_path=`$CYGPATH -u "$windows_path"`
32030    WIN_SDK_BASE="$unix_path"
32031  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32032    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32033    WIN_SDK_BASE="$unix_path"
32034  fi
32035
32036    if test -d "$WIN_SDK_BASE"; then
32037      # There have been cases of partial or broken SDK installations. A missing
32038      # lib dir is not going to work.
32039      if test ! -d "$WIN_SDK_BASE/lib"; then
32040        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32041$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32042        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32043$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32044      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32045        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32046$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32047        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32048        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32049          VS_ENV_ARGS="/x86"
32050        else
32051          VS_ENV_ARGS="/x64"
32052        fi
32053        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32054        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32055        # TODO: improve detection for other versions of SDK
32056        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32057      else
32058        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32059$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32060        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32061$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32062      fi
32063    fi
32064  fi
32065
32066    fi
32067    if test "x$PROGRAMFILES" != x; then
32068
32069  if test "x$VS_ENV_CMD" = x; then
32070    VS_VERSION="${VS_VERSION}"
32071    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
32072    METHOD="well-known name"
32073
32074  windows_path="$WIN_SDK_BASE"
32075  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32076    unix_path=`$CYGPATH -u "$windows_path"`
32077    WIN_SDK_BASE="$unix_path"
32078  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32079    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32080    WIN_SDK_BASE="$unix_path"
32081  fi
32082
32083    if test -d "$WIN_SDK_BASE"; then
32084      # There have been cases of partial or broken SDK installations. A missing
32085      # lib dir is not going to work.
32086      if test ! -d "$WIN_SDK_BASE/lib"; then
32087        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32088$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32089        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32090$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32091      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32092        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32093$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32094        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32095        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32096          VS_ENV_ARGS="/x86"
32097        else
32098          VS_ENV_ARGS="/x64"
32099        fi
32100        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32101        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32102        # TODO: improve detection for other versions of SDK
32103        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32104      else
32105        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32106$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32107        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32108$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32109      fi
32110    fi
32111  fi
32112
32113    fi
32114
32115  if test "x$VS_ENV_CMD" = x; then
32116    VS_VERSION="${VS_VERSION}"
32117    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
32118    METHOD="well-known name"
32119
32120  windows_path="$WIN_SDK_BASE"
32121  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32122    unix_path=`$CYGPATH -u "$windows_path"`
32123    WIN_SDK_BASE="$unix_path"
32124  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32125    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32126    WIN_SDK_BASE="$unix_path"
32127  fi
32128
32129    if test -d "$WIN_SDK_BASE"; then
32130      # There have been cases of partial or broken SDK installations. A missing
32131      # lib dir is not going to work.
32132      if test ! -d "$WIN_SDK_BASE/lib"; then
32133        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32134$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32135        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32136$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32137      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32138        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32139$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32140        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32141        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32142          VS_ENV_ARGS="/x86"
32143        else
32144          VS_ENV_ARGS="/x64"
32145        fi
32146        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32147        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32148        # TODO: improve detection for other versions of SDK
32149        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32150      else
32151        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32152$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32153        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32154$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32155      fi
32156    fi
32157  fi
32158
32159
32160  if test "x$VS_ENV_CMD" = x; then
32161    VS_VERSION="${VS_VERSION}"
32162    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
32163    METHOD="well-known name"
32164
32165  windows_path="$WIN_SDK_BASE"
32166  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32167    unix_path=`$CYGPATH -u "$windows_path"`
32168    WIN_SDK_BASE="$unix_path"
32169  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32170    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32171    WIN_SDK_BASE="$unix_path"
32172  fi
32173
32174    if test -d "$WIN_SDK_BASE"; then
32175      # There have been cases of partial or broken SDK installations. A missing
32176      # lib dir is not going to work.
32177      if test ! -d "$WIN_SDK_BASE/lib"; then
32178        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32179$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32180        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32181$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32182      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32183        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32184$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32185        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32186        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32187          VS_ENV_ARGS="/x86"
32188        else
32189          VS_ENV_ARGS="/x64"
32190        fi
32191        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32192        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32193        # TODO: improve detection for other versions of SDK
32194        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32195      else
32196        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32197$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32198        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32199$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32200      fi
32201    fi
32202  fi
32203
32204  fi
32205
32206    if test "x$VS_ENV_CMD" != x; then
32207      TOOLCHAIN_VERSION=$VS_VERSION
32208      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32209      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32210      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32211      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32212      # The rest of the variables are already evaled while probing
32213      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
32214$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
32215      break
32216    fi
32217  done
32218
32219
32220  # If we have a devkit, skip all of the below.
32221  if test "x$DEVKIT_VS_VERSION" = x; then
32222    if test "x$VS_ENV_CMD" != x; then
32223      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
32224
32225  # Only process if variable expands to non-empty
32226
32227  if test "x$VS_ENV_CMD" != x; then
32228    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32229
32230  # First separate the path from the arguments. This will split at the first
32231  # space.
32232  complete="$VS_ENV_CMD"
32233  path="${complete%% *}"
32234  tmp="$complete EOL"
32235  arguments="${tmp#* }"
32236
32237  # Input might be given as Windows format, start by converting to
32238  # unix format.
32239  new_path=`$CYGPATH -u "$path"`
32240
32241  # Now try to locate executable using which
32242  new_path=`$WHICH "$new_path" 2> /dev/null`
32243  # bat and cmd files are not always considered executable in cygwin causing which
32244  # to not find them
32245  if test "x$new_path" = x \
32246      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32247      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32248    new_path=`$CYGPATH -u "$path"`
32249  fi
32250  if test "x$new_path" = x; then
32251    # Oops. Which didn't find the executable.
32252    # The splitting of arguments from the executable at a space might have been incorrect,
32253    # since paths with space are more likely in Windows. Give it another try with the whole
32254    # argument.
32255    path="$complete"
32256    arguments="EOL"
32257    new_path=`$CYGPATH -u "$path"`
32258    new_path=`$WHICH "$new_path" 2> /dev/null`
32259    # bat and cmd files are not always considered executable in cygwin causing which
32260    # to not find them
32261    if test "x$new_path" = x \
32262        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32263        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32264      new_path=`$CYGPATH -u "$path"`
32265    fi
32266    if test "x$new_path" = x; then
32267      # It's still not found. Now this is an unrecoverable error.
32268      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32269$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32270      has_space=`$ECHO "$complete" | $GREP " "`
32271      if test "x$has_space" != x; then
32272        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32273$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32274      fi
32275      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32276    fi
32277  fi
32278
32279  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32280  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32281  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32282  # "foo.exe" is OK but "foo" is an error.
32283  #
32284  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32285  # It is also a way to make sure we got the proper file name for the real test later on.
32286  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32287  if test "x$test_shortpath" = x; then
32288    # Short path failed, file does not exist as specified.
32289    # Try adding .exe or .cmd
32290    if test -f "${new_path}.exe"; then
32291      input_to_shortpath="${new_path}.exe"
32292    elif test -f "${new_path}.cmd"; then
32293      input_to_shortpath="${new_path}.cmd"
32294    else
32295      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
32296$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
32297      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32298$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32299      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32300    fi
32301  else
32302    input_to_shortpath="$new_path"
32303  fi
32304
32305  # Call helper function which possibly converts this using DOS-style short mode.
32306  # If so, the updated path is stored in $new_path.
32307  new_path="$input_to_shortpath"
32308
32309  input_path="$input_to_shortpath"
32310  # Check if we need to convert this using DOS-style short mode. If the path
32311  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32312  # take no chances and rewrite it.
32313  # Note: m4 eats our [], so we need to use [ and ] instead.
32314  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32315  if test "x$has_forbidden_chars" != x; then
32316    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32317    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32318    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32319    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32320      # Going to short mode and back again did indeed matter. Since short mode is
32321      # case insensitive, let's make it lowercase to improve readability.
32322      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32323      # Now convert it back to Unix-style (cygpath)
32324      input_path=`$CYGPATH -u "$shortmode_path"`
32325      new_path="$input_path"
32326    fi
32327  fi
32328
32329  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32330  if test "x$test_cygdrive_prefix" = x; then
32331    # As a simple fix, exclude /usr/bin since it's not a real path.
32332    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32333      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32334      # a path prefixed by /cygdrive for fixpath to work.
32335      new_path="$CYGWIN_ROOT_PATH$input_path"
32336    fi
32337  fi
32338
32339  # remove trailing .exe if any
32340  new_path="${new_path/%.exe/}"
32341
32342    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32343
32344  # First separate the path from the arguments. This will split at the first
32345  # space.
32346  complete="$VS_ENV_CMD"
32347  path="${complete%% *}"
32348  tmp="$complete EOL"
32349  arguments="${tmp#* }"
32350
32351  # Input might be given as Windows format, start by converting to
32352  # unix format.
32353  new_path="$path"
32354
32355  windows_path="$new_path"
32356  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32357    unix_path=`$CYGPATH -u "$windows_path"`
32358    new_path="$unix_path"
32359  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32360    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32361    new_path="$unix_path"
32362  fi
32363
32364
32365  # Now try to locate executable using which
32366  new_path=`$WHICH "$new_path" 2> /dev/null`
32367
32368  if test "x$new_path" = x; then
32369    # Oops. Which didn't find the executable.
32370    # The splitting of arguments from the executable at a space might have been incorrect,
32371    # since paths with space are more likely in Windows. Give it another try with the whole
32372    # argument.
32373    path="$complete"
32374    arguments="EOL"
32375    new_path="$path"
32376
32377  windows_path="$new_path"
32378  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32379    unix_path=`$CYGPATH -u "$windows_path"`
32380    new_path="$unix_path"
32381  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32382    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32383    new_path="$unix_path"
32384  fi
32385
32386
32387    new_path=`$WHICH "$new_path" 2> /dev/null`
32388    # bat and cmd files are not always considered executable in MSYS causing which
32389    # to not find them
32390    if test "x$new_path" = x \
32391        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32392        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32393      new_path="$path"
32394
32395  windows_path="$new_path"
32396  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32397    unix_path=`$CYGPATH -u "$windows_path"`
32398    new_path="$unix_path"
32399  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32400    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32401    new_path="$unix_path"
32402  fi
32403
32404    fi
32405
32406    if test "x$new_path" = x; then
32407      # It's still not found. Now this is an unrecoverable error.
32408      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32409$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32410      has_space=`$ECHO "$complete" | $GREP " "`
32411      if test "x$has_space" != x; then
32412        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32413$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32414      fi
32415      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32416    fi
32417  fi
32418
32419  # Now new_path has a complete unix path to the binary
32420  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32421    # Keep paths in /bin as-is, but remove trailing .exe if any
32422    new_path="${new_path/%.exe/}"
32423    # Do not save /bin paths to all_fixpath_prefixes!
32424  else
32425    # Not in mixed or Windows style, start by that.
32426    new_path=`cmd //c echo $new_path`
32427
32428  input_path="$new_path"
32429  # Check if we need to convert this using DOS-style short mode. If the path
32430  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32431  # take no chances and rewrite it.
32432  # Note: m4 eats our [], so we need to use [ and ] instead.
32433  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32434  if test "x$has_forbidden_chars" != x; then
32435    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32436    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32437  fi
32438
32439    # Output is in $new_path
32440
32441  windows_path="$new_path"
32442  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32443    unix_path=`$CYGPATH -u "$windows_path"`
32444    new_path="$unix_path"
32445  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32446    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32447    new_path="$unix_path"
32448  fi
32449
32450    # remove trailing .exe if any
32451    new_path="${new_path/%.exe/}"
32452
32453    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32454    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32455  fi
32456
32457    else
32458      # We're on a unix platform. Hooray! :)
32459      # First separate the path from the arguments. This will split at the first
32460      # space.
32461      complete="$VS_ENV_CMD"
32462      path="${complete%% *}"
32463      tmp="$complete EOL"
32464      arguments="${tmp#* }"
32465
32466      # Cannot rely on the command "which" here since it doesn't always work.
32467      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32468      if test -z "$is_absolute_path"; then
32469        # Path to executable is not absolute. Find it.
32470        IFS_save="$IFS"
32471        IFS=:
32472        for p in $PATH; do
32473          if test -f "$p/$path" && test -x "$p/$path"; then
32474            new_path="$p/$path"
32475            break
32476          fi
32477        done
32478        IFS="$IFS_save"
32479      else
32480        # This is an absolute path, we can use it without further modifications.
32481        new_path="$path"
32482      fi
32483
32484      if test "x$new_path" = x; then
32485        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32486$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32487        has_space=`$ECHO "$complete" | $GREP " "`
32488        if test "x$has_space" != x; then
32489          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32490$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32491        fi
32492        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32493      fi
32494    fi
32495
32496    # Now join together the path and the arguments once again
32497    if test "x$arguments" != xEOL; then
32498      new_complete="$new_path ${arguments% *}"
32499    else
32500      new_complete="$new_path"
32501    fi
32502
32503    if test "x$complete" != "x$new_complete"; then
32504      VS_ENV_CMD="$new_complete"
32505      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
32506$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
32507    fi
32508  fi
32509
32510
32511      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
32512      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
32513$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
32514
32515      # We need to create a couple of temporary files.
32516      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
32517      $MKDIR -p $VS_ENV_TMP_DIR
32518
32519      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
32520      # Instead create a shell script which will set the relevant variables when run.
32521      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
32522
32523  unix_path="$WINPATH_VS_ENV_CMD"
32524  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32525    windows_path=`$CYGPATH -m "$unix_path"`
32526    WINPATH_VS_ENV_CMD="$windows_path"
32527  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32528    windows_path=`cmd //c echo $unix_path`
32529    WINPATH_VS_ENV_CMD="$windows_path"
32530  fi
32531
32532      WINPATH_BASH="$BASH"
32533
32534  unix_path="$WINPATH_BASH"
32535  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32536    windows_path=`$CYGPATH -m "$unix_path"`
32537    WINPATH_BASH="$windows_path"
32538  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32539    windows_path=`cmd //c echo $unix_path`
32540    WINPATH_BASH="$windows_path"
32541  fi
32542
32543
32544      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
32545      # script (executable by bash) that will setup the important variables.
32546      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
32547      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
32548      # This will end up something like:
32549      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
32550      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
32551      # These will end up something like:
32552      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
32553      # The trailing space for everyone except PATH is no typo, but is needed due
32554      # to trailing \ in the Windows paths. These will be stripped later.
32555      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
32556          >> $EXTRACT_VC_ENV_BAT_FILE
32557      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
32558          >> $EXTRACT_VC_ENV_BAT_FILE
32559      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
32560          >> $EXTRACT_VC_ENV_BAT_FILE
32561      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
32562          >> $EXTRACT_VC_ENV_BAT_FILE
32563      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
32564          >> $EXTRACT_VC_ENV_BAT_FILE
32565      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
32566          >> $EXTRACT_VC_ENV_BAT_FILE
32567
32568      # Now execute the newly created bat file.
32569      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
32570      # Change directory so we don't need to mess with Windows paths in redirects.
32571      cd $VS_ENV_TMP_DIR
32572      cmd /c extract-vs-env.bat | $CAT
32573      cd $CURDIR
32574
32575      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
32576        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
32577$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
32578        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32579$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32580        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32581$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32582        as_fn_error $? "Cannot continue" "$LINENO" 5
32583      fi
32584
32585      # Now set all paths and other env variables. This will allow the rest of
32586      # the configure script to find and run the compiler in the proper way.
32587      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
32588$as_echo "$as_me: Setting extracted environment variables" >&6;}
32589      . $VS_ENV_TMP_DIR/set-vs-env.sh
32590      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
32591      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
32592    else
32593      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
32594      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
32595$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
32596    fi
32597  fi
32598
32599  # At this point, we should have correct variables in the environment, or we can't continue.
32600  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
32601$as_echo_n "checking for Visual Studio variables... " >&6; }
32602
32603  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
32604      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
32605    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
32606      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
32607$as_echo "present but broken" >&6; }
32608      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
32609    else
32610      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
32611$as_echo "ok" >&6; }
32612      # Remove any trailing "\" ";" and " " from the variables.
32613      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
32614      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
32615      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
32616      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
32617      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
32618      # Remove any paths containing # (typically F#) as that messes up make. This
32619      # is needed if visual studio was installed with F# support.
32620      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
32621
32622
32623
32624
32625
32626      # Convert VS_INCLUDE into SYSROOT_CFLAGS
32627      OLDIFS="$IFS"
32628      IFS=";"
32629      for i in $VS_INCLUDE; do
32630        ipath=$i
32631        # Only process non-empty elements
32632        if test "x$ipath" != x; then
32633          IFS="$OLDIFS"
32634          # Check that directory exists before calling fixup_path
32635          testpath=$ipath
32636
32637  windows_path="$testpath"
32638  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32639    unix_path=`$CYGPATH -u "$windows_path"`
32640    testpath="$unix_path"
32641  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32642    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32643    testpath="$unix_path"
32644  fi
32645
32646          if test -d "$testpath"; then
32647
32648  # Only process if variable expands to non-empty
32649
32650  if test "x$ipath" != x; then
32651    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32652
32653  # Input might be given as Windows format, start by converting to
32654  # unix format.
32655  path="$ipath"
32656  new_path=`$CYGPATH -u "$path"`
32657
32658  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32659  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32660  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32661  # "foo.exe" is OK but "foo" is an error.
32662  #
32663  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32664  # It is also a way to make sure we got the proper file name for the real test later on.
32665  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32666  if test "x$test_shortpath" = x; then
32667    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32668$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32669    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
32670  fi
32671
32672  # Call helper function which possibly converts this using DOS-style short mode.
32673  # If so, the updated path is stored in $new_path.
32674
32675  input_path="$new_path"
32676  # Check if we need to convert this using DOS-style short mode. If the path
32677  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32678  # take no chances and rewrite it.
32679  # Note: m4 eats our [], so we need to use [ and ] instead.
32680  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32681  if test "x$has_forbidden_chars" != x; then
32682    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32683    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32684    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32685    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32686      # Going to short mode and back again did indeed matter. Since short mode is
32687      # case insensitive, let's make it lowercase to improve readability.
32688      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32689      # Now convert it back to Unix-style (cygpath)
32690      input_path=`$CYGPATH -u "$shortmode_path"`
32691      new_path="$input_path"
32692    fi
32693  fi
32694
32695  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32696  if test "x$test_cygdrive_prefix" = x; then
32697    # As a simple fix, exclude /usr/bin since it's not a real path.
32698    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32699      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32700      # a path prefixed by /cygdrive for fixpath to work.
32701      new_path="$CYGWIN_ROOT_PATH$input_path"
32702    fi
32703  fi
32704
32705
32706  if test "x$path" != "x$new_path"; then
32707    ipath="$new_path"
32708    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32709$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32710  fi
32711
32712    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32713
32714  path="$ipath"
32715  has_colon=`$ECHO $path | $GREP ^.:`
32716  new_path="$path"
32717  if test "x$has_colon" = x; then
32718    # Not in mixed or Windows style, start by that.
32719    new_path=`cmd //c echo $path`
32720  fi
32721
32722
32723  input_path="$new_path"
32724  # Check if we need to convert this using DOS-style short mode. If the path
32725  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32726  # take no chances and rewrite it.
32727  # Note: m4 eats our [], so we need to use [ and ] instead.
32728  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32729  if test "x$has_forbidden_chars" != x; then
32730    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32731    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32732  fi
32733
32734
32735  windows_path="$new_path"
32736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32737    unix_path=`$CYGPATH -u "$windows_path"`
32738    new_path="$unix_path"
32739  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32740    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32741    new_path="$unix_path"
32742  fi
32743
32744  if test "x$path" != "x$new_path"; then
32745    ipath="$new_path"
32746    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32747$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32748  fi
32749
32750  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32751  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32752
32753    else
32754      # We're on a unix platform. Hooray! :)
32755      path="$ipath"
32756      has_space=`$ECHO "$path" | $GREP " "`
32757      if test "x$has_space" != x; then
32758        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32759$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32760        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32761      fi
32762
32763      # Use eval to expand a potential ~
32764      eval path="$path"
32765      if test ! -f "$path" && test ! -d "$path"; then
32766        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
32767      fi
32768
32769      if test -d "$path"; then
32770        ipath="`cd "$path"; $THEPWDCMD -L`"
32771      else
32772        dir="`$DIRNAME "$path"`"
32773        base="`$BASENAME "$path"`"
32774        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
32775      fi
32776    fi
32777  fi
32778
32779            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
32780          fi
32781          IFS=";"
32782        fi
32783      done
32784      # Convert VS_LIB into SYSROOT_LDFLAGS
32785      for i in $VS_LIB; do
32786        libpath=$i
32787        # Only process non-empty elements
32788        if test "x$libpath" != x; then
32789          IFS="$OLDIFS"
32790          # Check that directory exists before calling fixup_path
32791          testpath=$libpath
32792
32793  windows_path="$testpath"
32794  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32795    unix_path=`$CYGPATH -u "$windows_path"`
32796    testpath="$unix_path"
32797  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32798    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32799    testpath="$unix_path"
32800  fi
32801
32802          if test -d "$testpath"; then
32803
32804  # Only process if variable expands to non-empty
32805
32806  if test "x$libpath" != x; then
32807    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32808
32809  # Input might be given as Windows format, start by converting to
32810  # unix format.
32811  path="$libpath"
32812  new_path=`$CYGPATH -u "$path"`
32813
32814  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32815  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32816  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32817  # "foo.exe" is OK but "foo" is an error.
32818  #
32819  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32820  # It is also a way to make sure we got the proper file name for the real test later on.
32821  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32822  if test "x$test_shortpath" = x; then
32823    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32824$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32825    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
32826  fi
32827
32828  # Call helper function which possibly converts this using DOS-style short mode.
32829  # If so, the updated path is stored in $new_path.
32830
32831  input_path="$new_path"
32832  # Check if we need to convert this using DOS-style short mode. If the path
32833  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32834  # take no chances and rewrite it.
32835  # Note: m4 eats our [], so we need to use [ and ] instead.
32836  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32837  if test "x$has_forbidden_chars" != x; then
32838    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32839    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32840    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32841    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32842      # Going to short mode and back again did indeed matter. Since short mode is
32843      # case insensitive, let's make it lowercase to improve readability.
32844      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32845      # Now convert it back to Unix-style (cygpath)
32846      input_path=`$CYGPATH -u "$shortmode_path"`
32847      new_path="$input_path"
32848    fi
32849  fi
32850
32851  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32852  if test "x$test_cygdrive_prefix" = x; then
32853    # As a simple fix, exclude /usr/bin since it's not a real path.
32854    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32855      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32856      # a path prefixed by /cygdrive for fixpath to work.
32857      new_path="$CYGWIN_ROOT_PATH$input_path"
32858    fi
32859  fi
32860
32861
32862  if test "x$path" != "x$new_path"; then
32863    libpath="$new_path"
32864    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32865$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32866  fi
32867
32868    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32869
32870  path="$libpath"
32871  has_colon=`$ECHO $path | $GREP ^.:`
32872  new_path="$path"
32873  if test "x$has_colon" = x; then
32874    # Not in mixed or Windows style, start by that.
32875    new_path=`cmd //c echo $path`
32876  fi
32877
32878
32879  input_path="$new_path"
32880  # Check if we need to convert this using DOS-style short mode. If the path
32881  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32882  # take no chances and rewrite it.
32883  # Note: m4 eats our [], so we need to use [ and ] instead.
32884  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32885  if test "x$has_forbidden_chars" != x; then
32886    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32887    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32888  fi
32889
32890
32891  windows_path="$new_path"
32892  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32893    unix_path=`$CYGPATH -u "$windows_path"`
32894    new_path="$unix_path"
32895  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32896    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32897    new_path="$unix_path"
32898  fi
32899
32900  if test "x$path" != "x$new_path"; then
32901    libpath="$new_path"
32902    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32903$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32904  fi
32905
32906  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32907  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32908
32909    else
32910      # We're on a unix platform. Hooray! :)
32911      path="$libpath"
32912      has_space=`$ECHO "$path" | $GREP " "`
32913      if test "x$has_space" != x; then
32914        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32915$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32916        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32917      fi
32918
32919      # Use eval to expand a potential ~
32920      eval path="$path"
32921      if test ! -f "$path" && test ! -d "$path"; then
32922        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
32923      fi
32924
32925      if test -d "$path"; then
32926        libpath="`cd "$path"; $THEPWDCMD -L`"
32927      else
32928        dir="`$DIRNAME "$path"`"
32929        base="`$BASENAME "$path"`"
32930        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
32931      fi
32932    fi
32933  fi
32934
32935            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
32936          fi
32937          IFS=";"
32938        fi
32939      done
32940      IFS="$OLDIFS"
32941    fi
32942  else
32943    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32944$as_echo "not found" >&6; }
32945
32946    if test "x$VS_ENV_CMD" = x; then
32947      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
32948$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
32949      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
32950$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
32951    else
32952      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
32953$as_echo "$as_me: Running the extraction script failed." >&6;}
32954    fi
32955    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32956$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32957    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32958$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32959    as_fn_error $? "Cannot continue" "$LINENO" 5
32960  fi
32961
32962    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
32963    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
32964    PATH="$VS_PATH"
32965    # The microsoft toolchain also requires INCLUDE and LIB to be set.
32966    export INCLUDE="$VS_INCLUDE"
32967    export LIB="$VS_LIB"
32968  else
32969    if test "x$XCODE_VERSION_OUTPUT" != x; then
32970      # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
32971      TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
32972      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
32973    else
32974      # Currently we do not define this for other toolchains. This might change as the need arise.
32975      TOOLCHAIN_VERSION=
32976    fi
32977  fi
32978
32979
32980  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
32981  # override all other locations.
32982  if test "x$TOOLCHAIN_PATH" != x; then
32983    PATH=$TOOLCHAIN_PATH:$PATH
32984  fi
32985
32986
32987  #
32988  # Setup the compilers (CC and CXX)
32989  #
32990
32991  COMPILER_NAME=C
32992  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
32993
32994  if test "x$CC" != x; then
32995    # User has supplied compiler name already, always let that override.
32996    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
32997$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
32998    if test "x`basename $CC`" = "x$CC"; then
32999      # A command without a complete path is provided, search $PATH.
33000
33001      for ac_prog in $CC
33002do
33003  # Extract the first word of "$ac_prog", so it can be a program name with args.
33004set dummy $ac_prog; ac_word=$2
33005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33006$as_echo_n "checking for $ac_word... " >&6; }
33007if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33008  $as_echo_n "(cached) " >&6
33009else
33010  case $POTENTIAL_CC in
33011  [\\/]* | ?:[\\/]*)
33012  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33013  ;;
33014  *)
33015  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33016for as_dir in $PATH
33017do
33018  IFS=$as_save_IFS
33019  test -z "$as_dir" && as_dir=.
33020    for ac_exec_ext in '' $ac_executable_extensions; do
33021  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33022    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33023    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33024    break 2
33025  fi
33026done
33027  done
33028IFS=$as_save_IFS
33029
33030  ;;
33031esac
33032fi
33033POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33034if test -n "$POTENTIAL_CC"; then
33035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33036$as_echo "$POTENTIAL_CC" >&6; }
33037else
33038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33039$as_echo "no" >&6; }
33040fi
33041
33042
33043  test -n "$POTENTIAL_CC" && break
33044done
33045
33046      if test "x$POTENTIAL_CC" != x; then
33047        CC=$POTENTIAL_CC
33048      else
33049        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
33050      fi
33051    else
33052      # Otherwise it might already be a complete path
33053      if test ! -x "$CC"; then
33054        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
33055      fi
33056    fi
33057  else
33058    # No user supplied value. Locate compiler ourselves.
33059
33060    # If we are cross compiling, assume cross compilation tools follows the
33061    # cross compilation standard where they are prefixed with the autoconf
33062    # standard name for the target. For example the binary
33063    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33064    # If we are not cross compiling, then the default compiler name will be
33065    # used.
33066
33067    CC=
33068    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33069    # before checking the rest of the PATH.
33070    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33071    # step, this should not be necessary.
33072    if test -n "$TOOLCHAIN_PATH"; then
33073      PATH_save="$PATH"
33074      PATH="$TOOLCHAIN_PATH"
33075      for ac_prog in $SEARCH_LIST
33076do
33077  # Extract the first word of "$ac_prog", so it can be a program name with args.
33078set dummy $ac_prog; ac_word=$2
33079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33080$as_echo_n "checking for $ac_word... " >&6; }
33081if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
33082  $as_echo_n "(cached) " >&6
33083else
33084  case $TOOLCHAIN_PATH_CC in
33085  [\\/]* | ?:[\\/]*)
33086  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33087  ;;
33088  *)
33089  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33090for as_dir in $PATH
33091do
33092  IFS=$as_save_IFS
33093  test -z "$as_dir" && as_dir=.
33094    for ac_exec_ext in '' $ac_executable_extensions; do
33095  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33096    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33097    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33098    break 2
33099  fi
33100done
33101  done
33102IFS=$as_save_IFS
33103
33104  ;;
33105esac
33106fi
33107TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
33108if test -n "$TOOLCHAIN_PATH_CC"; then
33109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
33110$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
33111else
33112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33113$as_echo "no" >&6; }
33114fi
33115
33116
33117  test -n "$TOOLCHAIN_PATH_CC" && break
33118done
33119
33120      CC=$TOOLCHAIN_PATH_CC
33121      PATH="$PATH_save"
33122    fi
33123
33124    # AC_PATH_PROGS can't be run multiple times with the same variable,
33125    # so create a new name for this run.
33126    if test "x$CC" = x; then
33127      for ac_prog in $SEARCH_LIST
33128do
33129  # Extract the first word of "$ac_prog", so it can be a program name with args.
33130set dummy $ac_prog; ac_word=$2
33131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33132$as_echo_n "checking for $ac_word... " >&6; }
33133if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33134  $as_echo_n "(cached) " >&6
33135else
33136  case $POTENTIAL_CC in
33137  [\\/]* | ?:[\\/]*)
33138  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33139  ;;
33140  *)
33141  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33142for as_dir in $PATH
33143do
33144  IFS=$as_save_IFS
33145  test -z "$as_dir" && as_dir=.
33146    for ac_exec_ext in '' $ac_executable_extensions; do
33147  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33148    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33149    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33150    break 2
33151  fi
33152done
33153  done
33154IFS=$as_save_IFS
33155
33156  ;;
33157esac
33158fi
33159POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33160if test -n "$POTENTIAL_CC"; then
33161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33162$as_echo "$POTENTIAL_CC" >&6; }
33163else
33164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33165$as_echo "no" >&6; }
33166fi
33167
33168
33169  test -n "$POTENTIAL_CC" && break
33170done
33171
33172      CC=$POTENTIAL_CC
33173    fi
33174
33175    if test "x$CC" = x; then
33176
33177  # Print a helpful message on how to acquire the necessary build dependency.
33178  # devkit is the help tag: freetype, cups, alsa etc
33179  MISSING_DEPENDENCY=devkit
33180
33181  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33182    cygwin_help $MISSING_DEPENDENCY
33183  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33184    msys_help $MISSING_DEPENDENCY
33185  else
33186    PKGHANDLER_COMMAND=
33187
33188    case $PKGHANDLER in
33189      apt-get)
33190        apt_help     $MISSING_DEPENDENCY ;;
33191      yum)
33192        yum_help     $MISSING_DEPENDENCY ;;
33193      port)
33194        port_help    $MISSING_DEPENDENCY ;;
33195      pkgutil)
33196        pkgutil_help $MISSING_DEPENDENCY ;;
33197      pkgadd)
33198        pkgadd_help  $MISSING_DEPENDENCY ;;
33199    esac
33200
33201    if test "x$PKGHANDLER_COMMAND" != x; then
33202      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33203    fi
33204  fi
33205
33206      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33207    fi
33208  fi
33209
33210  # Now we have a compiler binary in CC. Make sure it's okay.
33211
33212  # Only process if variable expands to non-empty
33213
33214  if test "x$CC" != x; then
33215    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33216
33217  # First separate the path from the arguments. This will split at the first
33218  # space.
33219  complete="$CC"
33220  path="${complete%% *}"
33221  tmp="$complete EOL"
33222  arguments="${tmp#* }"
33223
33224  # Input might be given as Windows format, start by converting to
33225  # unix format.
33226  new_path=`$CYGPATH -u "$path"`
33227
33228  # Now try to locate executable using which
33229  new_path=`$WHICH "$new_path" 2> /dev/null`
33230  # bat and cmd files are not always considered executable in cygwin causing which
33231  # to not find them
33232  if test "x$new_path" = x \
33233      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33234      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33235    new_path=`$CYGPATH -u "$path"`
33236  fi
33237  if test "x$new_path" = x; then
33238    # Oops. Which didn't find the executable.
33239    # The splitting of arguments from the executable at a space might have been incorrect,
33240    # since paths with space are more likely in Windows. Give it another try with the whole
33241    # argument.
33242    path="$complete"
33243    arguments="EOL"
33244    new_path=`$CYGPATH -u "$path"`
33245    new_path=`$WHICH "$new_path" 2> /dev/null`
33246    # bat and cmd files are not always considered executable in cygwin causing which
33247    # to not find them
33248    if test "x$new_path" = x \
33249        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33250        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33251      new_path=`$CYGPATH -u "$path"`
33252    fi
33253    if test "x$new_path" = x; then
33254      # It's still not found. Now this is an unrecoverable error.
33255      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33256$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33257      has_space=`$ECHO "$complete" | $GREP " "`
33258      if test "x$has_space" != x; then
33259        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33260$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33261      fi
33262      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33263    fi
33264  fi
33265
33266  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33267  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33268  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33269  # "foo.exe" is OK but "foo" is an error.
33270  #
33271  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33272  # It is also a way to make sure we got the proper file name for the real test later on.
33273  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33274  if test "x$test_shortpath" = x; then
33275    # Short path failed, file does not exist as specified.
33276    # Try adding .exe or .cmd
33277    if test -f "${new_path}.exe"; then
33278      input_to_shortpath="${new_path}.exe"
33279    elif test -f "${new_path}.cmd"; then
33280      input_to_shortpath="${new_path}.cmd"
33281    else
33282      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
33283$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
33284      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33285$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33286      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33287    fi
33288  else
33289    input_to_shortpath="$new_path"
33290  fi
33291
33292  # Call helper function which possibly converts this using DOS-style short mode.
33293  # If so, the updated path is stored in $new_path.
33294  new_path="$input_to_shortpath"
33295
33296  input_path="$input_to_shortpath"
33297  # Check if we need to convert this using DOS-style short mode. If the path
33298  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33299  # take no chances and rewrite it.
33300  # Note: m4 eats our [], so we need to use [ and ] instead.
33301  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33302  if test "x$has_forbidden_chars" != x; then
33303    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33304    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33305    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33306    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33307      # Going to short mode and back again did indeed matter. Since short mode is
33308      # case insensitive, let's make it lowercase to improve readability.
33309      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33310      # Now convert it back to Unix-style (cygpath)
33311      input_path=`$CYGPATH -u "$shortmode_path"`
33312      new_path="$input_path"
33313    fi
33314  fi
33315
33316  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33317  if test "x$test_cygdrive_prefix" = x; then
33318    # As a simple fix, exclude /usr/bin since it's not a real path.
33319    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33320      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33321      # a path prefixed by /cygdrive for fixpath to work.
33322      new_path="$CYGWIN_ROOT_PATH$input_path"
33323    fi
33324  fi
33325
33326  # remove trailing .exe if any
33327  new_path="${new_path/%.exe/}"
33328
33329    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33330
33331  # First separate the path from the arguments. This will split at the first
33332  # space.
33333  complete="$CC"
33334  path="${complete%% *}"
33335  tmp="$complete EOL"
33336  arguments="${tmp#* }"
33337
33338  # Input might be given as Windows format, start by converting to
33339  # unix format.
33340  new_path="$path"
33341
33342  windows_path="$new_path"
33343  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33344    unix_path=`$CYGPATH -u "$windows_path"`
33345    new_path="$unix_path"
33346  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33347    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33348    new_path="$unix_path"
33349  fi
33350
33351
33352  # Now try to locate executable using which
33353  new_path=`$WHICH "$new_path" 2> /dev/null`
33354
33355  if test "x$new_path" = x; then
33356    # Oops. Which didn't find the executable.
33357    # The splitting of arguments from the executable at a space might have been incorrect,
33358    # since paths with space are more likely in Windows. Give it another try with the whole
33359    # argument.
33360    path="$complete"
33361    arguments="EOL"
33362    new_path="$path"
33363
33364  windows_path="$new_path"
33365  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33366    unix_path=`$CYGPATH -u "$windows_path"`
33367    new_path="$unix_path"
33368  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33369    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33370    new_path="$unix_path"
33371  fi
33372
33373
33374    new_path=`$WHICH "$new_path" 2> /dev/null`
33375    # bat and cmd files are not always considered executable in MSYS causing which
33376    # to not find them
33377    if test "x$new_path" = x \
33378        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33379        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33380      new_path="$path"
33381
33382  windows_path="$new_path"
33383  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33384    unix_path=`$CYGPATH -u "$windows_path"`
33385    new_path="$unix_path"
33386  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33387    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33388    new_path="$unix_path"
33389  fi
33390
33391    fi
33392
33393    if test "x$new_path" = x; then
33394      # It's still not found. Now this is an unrecoverable error.
33395      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33396$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33397      has_space=`$ECHO "$complete" | $GREP " "`
33398      if test "x$has_space" != x; then
33399        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33400$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33401      fi
33402      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33403    fi
33404  fi
33405
33406  # Now new_path has a complete unix path to the binary
33407  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33408    # Keep paths in /bin as-is, but remove trailing .exe if any
33409    new_path="${new_path/%.exe/}"
33410    # Do not save /bin paths to all_fixpath_prefixes!
33411  else
33412    # Not in mixed or Windows style, start by that.
33413    new_path=`cmd //c echo $new_path`
33414
33415  input_path="$new_path"
33416  # Check if we need to convert this using DOS-style short mode. If the path
33417  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33418  # take no chances and rewrite it.
33419  # Note: m4 eats our [], so we need to use [ and ] instead.
33420  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33421  if test "x$has_forbidden_chars" != x; then
33422    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33423    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33424  fi
33425
33426    # Output is in $new_path
33427
33428  windows_path="$new_path"
33429  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33430    unix_path=`$CYGPATH -u "$windows_path"`
33431    new_path="$unix_path"
33432  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33433    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33434    new_path="$unix_path"
33435  fi
33436
33437    # remove trailing .exe if any
33438    new_path="${new_path/%.exe/}"
33439
33440    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33441    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33442  fi
33443
33444    else
33445      # We're on a unix platform. Hooray! :)
33446      # First separate the path from the arguments. This will split at the first
33447      # space.
33448      complete="$CC"
33449      path="${complete%% *}"
33450      tmp="$complete EOL"
33451      arguments="${tmp#* }"
33452
33453      # Cannot rely on the command "which" here since it doesn't always work.
33454      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33455      if test -z "$is_absolute_path"; then
33456        # Path to executable is not absolute. Find it.
33457        IFS_save="$IFS"
33458        IFS=:
33459        for p in $PATH; do
33460          if test -f "$p/$path" && test -x "$p/$path"; then
33461            new_path="$p/$path"
33462            break
33463          fi
33464        done
33465        IFS="$IFS_save"
33466      else
33467        # This is an absolute path, we can use it without further modifications.
33468        new_path="$path"
33469      fi
33470
33471      if test "x$new_path" = x; then
33472        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33473$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33474        has_space=`$ECHO "$complete" | $GREP " "`
33475        if test "x$has_space" != x; then
33476          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33477$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33478        fi
33479        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33480      fi
33481    fi
33482
33483    # Now join together the path and the arguments once again
33484    if test "x$arguments" != xEOL; then
33485      new_complete="$new_path ${arguments% *}"
33486    else
33487      new_complete="$new_path"
33488    fi
33489
33490    if test "x$complete" != "x$new_complete"; then
33491      CC="$new_complete"
33492      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
33493$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
33494    fi
33495  fi
33496
33497  TEST_COMPILER="$CC"
33498
33499  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
33500$as_echo_n "checking resolved symbolic links for CC... " >&6; }
33501  SYMLINK_ORIGINAL="$TEST_COMPILER"
33502
33503  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33504    # Follow a chain of symbolic links. Use readlink
33505    # where it exists, else fall back to horribly
33506    # complicated shell code.
33507    if test "x$READLINK_TESTED" != yes; then
33508      # On MacOSX there is a readlink tool with a different
33509      # purpose than the GNU readlink tool. Check the found readlink.
33510      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33511      if test "x$ISGNU" = x; then
33512        # A readlink that we do not know how to use.
33513        # Are there other non-GNU readlinks out there?
33514        READLINK_TESTED=yes
33515        READLINK=
33516      fi
33517    fi
33518
33519    if test "x$READLINK" != x; then
33520      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
33521    else
33522      # Save the current directory for restoring afterwards
33523      STARTDIR=$PWD
33524      COUNTER=0
33525      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
33526      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
33527      cd $sym_link_dir
33528      # Use -P flag to resolve symlinks in directories.
33529      cd `$THEPWDCMD -P`
33530      sym_link_dir=`$THEPWDCMD -P`
33531      # Resolve file symlinks
33532      while test $COUNTER -lt 20; do
33533        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33534        if test "x$ISLINK" == x; then
33535          # This is not a symbolic link! We are done!
33536          break
33537        fi
33538        # Again resolve directory symlinks since the target of the just found
33539        # link could be in a different directory
33540        cd `$DIRNAME $ISLINK`
33541        sym_link_dir=`$THEPWDCMD -P`
33542        sym_link_file=`$BASENAME $ISLINK`
33543        let COUNTER=COUNTER+1
33544      done
33545      cd $STARTDIR
33546      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
33547    fi
33548  fi
33549
33550  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
33551    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
33552$as_echo "no symlink" >&6; }
33553  else
33554    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
33555$as_echo "$SYMLINK_ORIGINAL" >&6; }
33556
33557    # We can't handle ccache by gcc wrappers, since we need to know if we're
33558    # using ccache. Instead ccache usage must be controlled by a configure option.
33559    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
33560    if test "x$COMPILER_BASENAME" = "xccache"; then
33561      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
33562$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
33563      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
33564    fi
33565  fi
33566
33567
33568  COMPILER=$CC
33569  COMPILER_NAME=$COMPILER_NAME
33570
33571  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33572    # cc -V output typically looks like
33573    #     cc: Sun C 5.12 Linux_i386 2011/11/16
33574    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33575    # Check that this is likely to be the Solaris Studio cc.
33576    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
33577    if test $? -ne 0; then
33578      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33579      { $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
33580$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33581      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33582$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33583      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33584$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33585      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33586    fi
33587    # Remove usage instructions (if present), and
33588    # collapse compiler output into a single line
33589    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33590        $SED -e 's/ *[Uu]sage:.*//'`
33591    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33592        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33593  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
33594    # xlc -qversion output typically looks like
33595    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
33596    #     Version: 11.01.0000.0015
33597    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
33598    # Check that this is likely to be the IBM XL C compiler.
33599    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
33600    if test $? -ne 0; then
33601      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33602      { $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
33603$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33604      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33605$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33606      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33607$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33608      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33609    fi
33610    # Collapse compiler output into a single line
33611    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33612    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33613        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
33614  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33615    # There is no specific version flag, but all output starts with a version string.
33616    # First line typically looks something like:
33617    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
33618    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
33619    # Check that this is likely to be Microsoft CL.EXE.
33620    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
33621    if test $? -ne 0; then
33622      { $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
33623$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33624      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33625$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33626      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33627    fi
33628    # Collapse compiler output into a single line
33629    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33630    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33631        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
33632  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
33633    # gcc --version output typically looks like
33634    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
33635    #     Copyright (C) 2013 Free Software Foundation, Inc.
33636    #     This is free software; see the source for copying conditions.  There is NO
33637    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33638    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33639    # Check that this is likely to be GCC.
33640    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
33641    if test $? -ne 0; then
33642      { $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
33643$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33644      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
33645$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
33646      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33647    fi
33648    # Remove Copyright and legalese from version string, and
33649    # collapse into a single line
33650    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33651        $SED -e 's/ *Copyright .*//'`
33652    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33653        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
33654  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
33655    # clang --version output typically looks like
33656    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
33657    #    clang version 3.3 (tags/RELEASE_33/final)
33658    # or
33659    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
33660    #    Target: x86_64-pc-linux-gnu
33661    #    Thread model: posix
33662    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33663    # Check that this is likely to be clang
33664    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
33665    if test $? -ne 0; then
33666      { $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
33667$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33668      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33669$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33670      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33671    fi
33672    # Collapse compiler output into a single line
33673    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33674    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33675        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
33676  else
33677      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
33678  fi
33679  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
33680  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
33681  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
33682  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
33683
33684  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
33685$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
33686
33687
33688  # Now that we have resolved CC ourself, let autoconf have its go at it
33689  ac_ext=c
33690ac_cpp='$CPP $CPPFLAGS'
33691ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33692ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33693ac_compiler_gnu=$ac_cv_c_compiler_gnu
33694if test -n "$ac_tool_prefix"; then
33695  for ac_prog in $CC
33696  do
33697    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33698set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33700$as_echo_n "checking for $ac_word... " >&6; }
33701if ${ac_cv_prog_CC+:} false; then :
33702  $as_echo_n "(cached) " >&6
33703else
33704  if test -n "$CC"; then
33705  ac_cv_prog_CC="$CC" # Let the user override the test.
33706else
33707as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33708for as_dir in $PATH
33709do
33710  IFS=$as_save_IFS
33711  test -z "$as_dir" && as_dir=.
33712    for ac_exec_ext in '' $ac_executable_extensions; do
33713  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33714    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
33715    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33716    break 2
33717  fi
33718done
33719  done
33720IFS=$as_save_IFS
33721
33722fi
33723fi
33724CC=$ac_cv_prog_CC
33725if test -n "$CC"; then
33726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
33727$as_echo "$CC" >&6; }
33728else
33729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33730$as_echo "no" >&6; }
33731fi
33732
33733
33734    test -n "$CC" && break
33735  done
33736fi
33737if test -z "$CC"; then
33738  ac_ct_CC=$CC
33739  for ac_prog in $CC
33740do
33741  # Extract the first word of "$ac_prog", so it can be a program name with args.
33742set dummy $ac_prog; ac_word=$2
33743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33744$as_echo_n "checking for $ac_word... " >&6; }
33745if ${ac_cv_prog_ac_ct_CC+:} false; then :
33746  $as_echo_n "(cached) " >&6
33747else
33748  if test -n "$ac_ct_CC"; then
33749  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
33750else
33751as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33752for as_dir in $PATH
33753do
33754  IFS=$as_save_IFS
33755  test -z "$as_dir" && as_dir=.
33756    for ac_exec_ext in '' $ac_executable_extensions; do
33757  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33758    ac_cv_prog_ac_ct_CC="$ac_prog"
33759    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33760    break 2
33761  fi
33762done
33763  done
33764IFS=$as_save_IFS
33765
33766fi
33767fi
33768ac_ct_CC=$ac_cv_prog_ac_ct_CC
33769if test -n "$ac_ct_CC"; then
33770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
33771$as_echo "$ac_ct_CC" >&6; }
33772else
33773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33774$as_echo "no" >&6; }
33775fi
33776
33777
33778  test -n "$ac_ct_CC" && break
33779done
33780
33781  if test "x$ac_ct_CC" = x; then
33782    CC=""
33783  else
33784    case $cross_compiling:$ac_tool_warned in
33785yes:)
33786{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33787$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33788ac_tool_warned=yes ;;
33789esac
33790    CC=$ac_ct_CC
33791  fi
33792fi
33793
33794
33795test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33796$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33797as_fn_error $? "no acceptable C compiler found in \$PATH
33798See \`config.log' for more details" "$LINENO" 5; }
33799
33800# Provide some information about the compiler.
33801$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
33802set X $ac_compile
33803ac_compiler=$2
33804for ac_option in --version -v -V -qversion; do
33805  { { ac_try="$ac_compiler $ac_option >&5"
33806case "(($ac_try" in
33807  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33808  *) ac_try_echo=$ac_try;;
33809esac
33810eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33811$as_echo "$ac_try_echo"; } >&5
33812  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33813  ac_status=$?
33814  if test -s conftest.err; then
33815    sed '10a\
33816... rest of stderr output deleted ...
33817         10q' conftest.err >conftest.er1
33818    cat conftest.er1 >&5
33819  fi
33820  rm -f conftest.er1 conftest.err
33821  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33822  test $ac_status = 0; }
33823done
33824
33825cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33826/* end confdefs.h.  */
33827
33828int
33829main ()
33830{
33831
33832  ;
33833  return 0;
33834}
33835_ACEOF
33836ac_clean_files_save=$ac_clean_files
33837ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
33838# Try to create an executable without -o first, disregard a.out.
33839# It will help us diagnose broken compilers, and finding out an intuition
33840# of exeext.
33841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
33842$as_echo_n "checking whether the C compiler works... " >&6; }
33843ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
33844
33845# The possible output files:
33846ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
33847
33848ac_rmfiles=
33849for ac_file in $ac_files
33850do
33851  case $ac_file in
33852    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33853    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
33854  esac
33855done
33856rm -f $ac_rmfiles
33857
33858if { { ac_try="$ac_link_default"
33859case "(($ac_try" in
33860  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33861  *) ac_try_echo=$ac_try;;
33862esac
33863eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33864$as_echo "$ac_try_echo"; } >&5
33865  (eval "$ac_link_default") 2>&5
33866  ac_status=$?
33867  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33868  test $ac_status = 0; }; then :
33869  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
33870# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
33871# in a Makefile.  We should not override ac_cv_exeext if it was cached,
33872# so that the user can short-circuit this test for compilers unknown to
33873# Autoconf.
33874for ac_file in $ac_files ''
33875do
33876  test -f "$ac_file" || continue
33877  case $ac_file in
33878    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
33879	;;
33880    [ab].out )
33881	# We found the default executable, but exeext='' is most
33882	# certainly right.
33883	break;;
33884    *.* )
33885	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
33886	then :; else
33887	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33888	fi
33889	# We set ac_cv_exeext here because the later test for it is not
33890	# safe: cross compilers may not add the suffix if given an `-o'
33891	# argument, so we may need to know it at that point already.
33892	# Even if this section looks crufty: it has the advantage of
33893	# actually working.
33894	break;;
33895    * )
33896	break;;
33897  esac
33898done
33899test "$ac_cv_exeext" = no && ac_cv_exeext=
33900
33901else
33902  ac_file=''
33903fi
33904if test -z "$ac_file"; then :
33905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33906$as_echo "no" >&6; }
33907$as_echo "$as_me: failed program was:" >&5
33908sed 's/^/| /' conftest.$ac_ext >&5
33909
33910{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33911$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33912as_fn_error 77 "C compiler cannot create executables
33913See \`config.log' for more details" "$LINENO" 5; }
33914else
33915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33916$as_echo "yes" >&6; }
33917fi
33918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
33919$as_echo_n "checking for C compiler default output file name... " >&6; }
33920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
33921$as_echo "$ac_file" >&6; }
33922ac_exeext=$ac_cv_exeext
33923
33924rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
33925ac_clean_files=$ac_clean_files_save
33926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
33927$as_echo_n "checking for suffix of executables... " >&6; }
33928if { { ac_try="$ac_link"
33929case "(($ac_try" in
33930  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33931  *) ac_try_echo=$ac_try;;
33932esac
33933eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33934$as_echo "$ac_try_echo"; } >&5
33935  (eval "$ac_link") 2>&5
33936  ac_status=$?
33937  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33938  test $ac_status = 0; }; then :
33939  # If both `conftest.exe' and `conftest' are `present' (well, observable)
33940# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
33941# work properly (i.e., refer to `conftest.exe'), while it won't with
33942# `rm'.
33943for ac_file in conftest.exe conftest conftest.*; do
33944  test -f "$ac_file" || continue
33945  case $ac_file in
33946    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33947    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33948	  break;;
33949    * ) break;;
33950  esac
33951done
33952else
33953  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33954$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33955as_fn_error $? "cannot compute suffix of executables: cannot compile and link
33956See \`config.log' for more details" "$LINENO" 5; }
33957fi
33958rm -f conftest conftest$ac_cv_exeext
33959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
33960$as_echo "$ac_cv_exeext" >&6; }
33961
33962rm -f conftest.$ac_ext
33963EXEEXT=$ac_cv_exeext
33964ac_exeext=$EXEEXT
33965cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33966/* end confdefs.h.  */
33967#include <stdio.h>
33968int
33969main ()
33970{
33971FILE *f = fopen ("conftest.out", "w");
33972 return ferror (f) || fclose (f) != 0;
33973
33974  ;
33975  return 0;
33976}
33977_ACEOF
33978ac_clean_files="$ac_clean_files conftest.out"
33979# Check that the compiler produces executables we can run.  If not, either
33980# the compiler is broken, or we cross compile.
33981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
33982$as_echo_n "checking whether we are cross compiling... " >&6; }
33983if test "$cross_compiling" != yes; then
33984  { { ac_try="$ac_link"
33985case "(($ac_try" in
33986  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33987  *) ac_try_echo=$ac_try;;
33988esac
33989eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33990$as_echo "$ac_try_echo"; } >&5
33991  (eval "$ac_link") 2>&5
33992  ac_status=$?
33993  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33994  test $ac_status = 0; }
33995  if { ac_try='./conftest$ac_cv_exeext'
33996  { { case "(($ac_try" in
33997  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33998  *) ac_try_echo=$ac_try;;
33999esac
34000eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34001$as_echo "$ac_try_echo"; } >&5
34002  (eval "$ac_try") 2>&5
34003  ac_status=$?
34004  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34005  test $ac_status = 0; }; }; then
34006    cross_compiling=no
34007  else
34008    if test "$cross_compiling" = maybe; then
34009	cross_compiling=yes
34010    else
34011	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34012$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34013as_fn_error $? "cannot run C compiled programs.
34014If you meant to cross compile, use \`--host'.
34015See \`config.log' for more details" "$LINENO" 5; }
34016    fi
34017  fi
34018fi
34019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
34020$as_echo "$cross_compiling" >&6; }
34021
34022rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
34023ac_clean_files=$ac_clean_files_save
34024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
34025$as_echo_n "checking for suffix of object files... " >&6; }
34026if ${ac_cv_objext+:} false; then :
34027  $as_echo_n "(cached) " >&6
34028else
34029  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34030/* end confdefs.h.  */
34031
34032int
34033main ()
34034{
34035
34036  ;
34037  return 0;
34038}
34039_ACEOF
34040rm -f conftest.o conftest.obj
34041if { { ac_try="$ac_compile"
34042case "(($ac_try" in
34043  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34044  *) ac_try_echo=$ac_try;;
34045esac
34046eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34047$as_echo "$ac_try_echo"; } >&5
34048  (eval "$ac_compile") 2>&5
34049  ac_status=$?
34050  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34051  test $ac_status = 0; }; then :
34052  for ac_file in conftest.o conftest.obj conftest.*; do
34053  test -f "$ac_file" || continue;
34054  case $ac_file in
34055    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
34056    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
34057       break;;
34058  esac
34059done
34060else
34061  $as_echo "$as_me: failed program was:" >&5
34062sed 's/^/| /' conftest.$ac_ext >&5
34063
34064{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34065$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34066as_fn_error $? "cannot compute suffix of object files: cannot compile
34067See \`config.log' for more details" "$LINENO" 5; }
34068fi
34069rm -f conftest.$ac_cv_objext conftest.$ac_ext
34070fi
34071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
34072$as_echo "$ac_cv_objext" >&6; }
34073OBJEXT=$ac_cv_objext
34074ac_objext=$OBJEXT
34075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
34076$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
34077if ${ac_cv_c_compiler_gnu+:} false; then :
34078  $as_echo_n "(cached) " >&6
34079else
34080  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34081/* end confdefs.h.  */
34082
34083int
34084main ()
34085{
34086#ifndef __GNUC__
34087       choke me
34088#endif
34089
34090  ;
34091  return 0;
34092}
34093_ACEOF
34094if ac_fn_c_try_compile "$LINENO"; then :
34095  ac_compiler_gnu=yes
34096else
34097  ac_compiler_gnu=no
34098fi
34099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34100ac_cv_c_compiler_gnu=$ac_compiler_gnu
34101
34102fi
34103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
34104$as_echo "$ac_cv_c_compiler_gnu" >&6; }
34105if test $ac_compiler_gnu = yes; then
34106  GCC=yes
34107else
34108  GCC=
34109fi
34110ac_test_CFLAGS=${CFLAGS+set}
34111ac_save_CFLAGS=$CFLAGS
34112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
34113$as_echo_n "checking whether $CC accepts -g... " >&6; }
34114if ${ac_cv_prog_cc_g+:} false; then :
34115  $as_echo_n "(cached) " >&6
34116else
34117  ac_save_c_werror_flag=$ac_c_werror_flag
34118   ac_c_werror_flag=yes
34119   ac_cv_prog_cc_g=no
34120   CFLAGS="-g"
34121   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34122/* end confdefs.h.  */
34123
34124int
34125main ()
34126{
34127
34128  ;
34129  return 0;
34130}
34131_ACEOF
34132if ac_fn_c_try_compile "$LINENO"; then :
34133  ac_cv_prog_cc_g=yes
34134else
34135  CFLAGS=""
34136      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34137/* end confdefs.h.  */
34138
34139int
34140main ()
34141{
34142
34143  ;
34144  return 0;
34145}
34146_ACEOF
34147if ac_fn_c_try_compile "$LINENO"; then :
34148
34149else
34150  ac_c_werror_flag=$ac_save_c_werror_flag
34151	 CFLAGS="-g"
34152	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34153/* end confdefs.h.  */
34154
34155int
34156main ()
34157{
34158
34159  ;
34160  return 0;
34161}
34162_ACEOF
34163if ac_fn_c_try_compile "$LINENO"; then :
34164  ac_cv_prog_cc_g=yes
34165fi
34166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34167fi
34168rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34169fi
34170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34171   ac_c_werror_flag=$ac_save_c_werror_flag
34172fi
34173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
34174$as_echo "$ac_cv_prog_cc_g" >&6; }
34175if test "$ac_test_CFLAGS" = set; then
34176  CFLAGS=$ac_save_CFLAGS
34177elif test $ac_cv_prog_cc_g = yes; then
34178  if test "$GCC" = yes; then
34179    CFLAGS="-g -O2"
34180  else
34181    CFLAGS="-g"
34182  fi
34183else
34184  if test "$GCC" = yes; then
34185    CFLAGS="-O2"
34186  else
34187    CFLAGS=
34188  fi
34189fi
34190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
34191$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
34192if ${ac_cv_prog_cc_c89+:} false; then :
34193  $as_echo_n "(cached) " >&6
34194else
34195  ac_cv_prog_cc_c89=no
34196ac_save_CC=$CC
34197cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34198/* end confdefs.h.  */
34199#include <stdarg.h>
34200#include <stdio.h>
34201struct stat;
34202/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
34203struct buf { int x; };
34204FILE * (*rcsopen) (struct buf *, struct stat *, int);
34205static char *e (p, i)
34206     char **p;
34207     int i;
34208{
34209  return p[i];
34210}
34211static char *f (char * (*g) (char **, int), char **p, ...)
34212{
34213  char *s;
34214  va_list v;
34215  va_start (v,p);
34216  s = g (p, va_arg (v,int));
34217  va_end (v);
34218  return s;
34219}
34220
34221/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
34222   function prototypes and stuff, but not '\xHH' hex character constants.
34223   These don't provoke an error unfortunately, instead are silently treated
34224   as 'x'.  The following induces an error, until -std is added to get
34225   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
34226   array size at least.  It's necessary to write '\x00'==0 to get something
34227   that's true only with -std.  */
34228int osf4_cc_array ['\x00' == 0 ? 1 : -1];
34229
34230/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
34231   inside strings and character constants.  */
34232#define FOO(x) 'x'
34233int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
34234
34235int test (int i, double x);
34236struct s1 {int (*f) (int a);};
34237struct s2 {int (*f) (double a);};
34238int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
34239int argc;
34240char **argv;
34241int
34242main ()
34243{
34244return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
34245  ;
34246  return 0;
34247}
34248_ACEOF
34249for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
34250	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
34251do
34252  CC="$ac_save_CC $ac_arg"
34253  if ac_fn_c_try_compile "$LINENO"; then :
34254  ac_cv_prog_cc_c89=$ac_arg
34255fi
34256rm -f core conftest.err conftest.$ac_objext
34257  test "x$ac_cv_prog_cc_c89" != "xno" && break
34258done
34259rm -f conftest.$ac_ext
34260CC=$ac_save_CC
34261
34262fi
34263# AC_CACHE_VAL
34264case "x$ac_cv_prog_cc_c89" in
34265  x)
34266    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
34267$as_echo "none needed" >&6; } ;;
34268  xno)
34269    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
34270$as_echo "unsupported" >&6; } ;;
34271  *)
34272    CC="$CC $ac_cv_prog_cc_c89"
34273    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
34274$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
34275esac
34276if test "x$ac_cv_prog_cc_c89" != xno; then :
34277
34278fi
34279
34280ac_ext=cpp
34281ac_cpp='$CXXCPP $CPPFLAGS'
34282ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34283ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34284ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34285
34286
34287
34288  COMPILER_NAME=C++
34289  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
34290
34291  if test "x$CXX" != x; then
34292    # User has supplied compiler name already, always let that override.
34293    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
34294$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
34295    if test "x`basename $CXX`" = "x$CXX"; then
34296      # A command without a complete path is provided, search $PATH.
34297
34298      for ac_prog in $CXX
34299do
34300  # Extract the first word of "$ac_prog", so it can be a program name with args.
34301set dummy $ac_prog; ac_word=$2
34302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34303$as_echo_n "checking for $ac_word... " >&6; }
34304if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34305  $as_echo_n "(cached) " >&6
34306else
34307  case $POTENTIAL_CXX in
34308  [\\/]* | ?:[\\/]*)
34309  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34310  ;;
34311  *)
34312  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34313for as_dir in $PATH
34314do
34315  IFS=$as_save_IFS
34316  test -z "$as_dir" && as_dir=.
34317    for ac_exec_ext in '' $ac_executable_extensions; do
34318  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34319    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34320    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34321    break 2
34322  fi
34323done
34324  done
34325IFS=$as_save_IFS
34326
34327  ;;
34328esac
34329fi
34330POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34331if test -n "$POTENTIAL_CXX"; then
34332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34333$as_echo "$POTENTIAL_CXX" >&6; }
34334else
34335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34336$as_echo "no" >&6; }
34337fi
34338
34339
34340  test -n "$POTENTIAL_CXX" && break
34341done
34342
34343      if test "x$POTENTIAL_CXX" != x; then
34344        CXX=$POTENTIAL_CXX
34345      else
34346        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
34347      fi
34348    else
34349      # Otherwise it might already be a complete path
34350      if test ! -x "$CXX"; then
34351        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
34352      fi
34353    fi
34354  else
34355    # No user supplied value. Locate compiler ourselves.
34356
34357    # If we are cross compiling, assume cross compilation tools follows the
34358    # cross compilation standard where they are prefixed with the autoconf
34359    # standard name for the target. For example the binary
34360    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
34361    # If we are not cross compiling, then the default compiler name will be
34362    # used.
34363
34364    CXX=
34365    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
34366    # before checking the rest of the PATH.
34367    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
34368    # step, this should not be necessary.
34369    if test -n "$TOOLCHAIN_PATH"; then
34370      PATH_save="$PATH"
34371      PATH="$TOOLCHAIN_PATH"
34372      for ac_prog in $SEARCH_LIST
34373do
34374  # Extract the first word of "$ac_prog", so it can be a program name with args.
34375set dummy $ac_prog; ac_word=$2
34376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34377$as_echo_n "checking for $ac_word... " >&6; }
34378if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
34379  $as_echo_n "(cached) " >&6
34380else
34381  case $TOOLCHAIN_PATH_CXX in
34382  [\\/]* | ?:[\\/]*)
34383  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
34384  ;;
34385  *)
34386  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34387for as_dir in $PATH
34388do
34389  IFS=$as_save_IFS
34390  test -z "$as_dir" && as_dir=.
34391    for ac_exec_ext in '' $ac_executable_extensions; do
34392  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34393    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
34394    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34395    break 2
34396  fi
34397done
34398  done
34399IFS=$as_save_IFS
34400
34401  ;;
34402esac
34403fi
34404TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
34405if test -n "$TOOLCHAIN_PATH_CXX"; then
34406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
34407$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
34408else
34409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34410$as_echo "no" >&6; }
34411fi
34412
34413
34414  test -n "$TOOLCHAIN_PATH_CXX" && break
34415done
34416
34417      CXX=$TOOLCHAIN_PATH_CXX
34418      PATH="$PATH_save"
34419    fi
34420
34421    # AC_PATH_PROGS can't be run multiple times with the same variable,
34422    # so create a new name for this run.
34423    if test "x$CXX" = x; then
34424      for ac_prog in $SEARCH_LIST
34425do
34426  # Extract the first word of "$ac_prog", so it can be a program name with args.
34427set dummy $ac_prog; ac_word=$2
34428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34429$as_echo_n "checking for $ac_word... " >&6; }
34430if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34431  $as_echo_n "(cached) " >&6
34432else
34433  case $POTENTIAL_CXX in
34434  [\\/]* | ?:[\\/]*)
34435  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34436  ;;
34437  *)
34438  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34439for as_dir in $PATH
34440do
34441  IFS=$as_save_IFS
34442  test -z "$as_dir" && as_dir=.
34443    for ac_exec_ext in '' $ac_executable_extensions; do
34444  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34445    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34446    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34447    break 2
34448  fi
34449done
34450  done
34451IFS=$as_save_IFS
34452
34453  ;;
34454esac
34455fi
34456POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34457if test -n "$POTENTIAL_CXX"; then
34458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34459$as_echo "$POTENTIAL_CXX" >&6; }
34460else
34461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34462$as_echo "no" >&6; }
34463fi
34464
34465
34466  test -n "$POTENTIAL_CXX" && break
34467done
34468
34469      CXX=$POTENTIAL_CXX
34470    fi
34471
34472    if test "x$CXX" = x; then
34473
34474  # Print a helpful message on how to acquire the necessary build dependency.
34475  # devkit is the help tag: freetype, cups, alsa etc
34476  MISSING_DEPENDENCY=devkit
34477
34478  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34479    cygwin_help $MISSING_DEPENDENCY
34480  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34481    msys_help $MISSING_DEPENDENCY
34482  else
34483    PKGHANDLER_COMMAND=
34484
34485    case $PKGHANDLER in
34486      apt-get)
34487        apt_help     $MISSING_DEPENDENCY ;;
34488      yum)
34489        yum_help     $MISSING_DEPENDENCY ;;
34490      port)
34491        port_help    $MISSING_DEPENDENCY ;;
34492      pkgutil)
34493        pkgutil_help $MISSING_DEPENDENCY ;;
34494      pkgadd)
34495        pkgadd_help  $MISSING_DEPENDENCY ;;
34496    esac
34497
34498    if test "x$PKGHANDLER_COMMAND" != x; then
34499      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34500    fi
34501  fi
34502
34503      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
34504    fi
34505  fi
34506
34507  # Now we have a compiler binary in CXX. Make sure it's okay.
34508
34509  # Only process if variable expands to non-empty
34510
34511  if test "x$CXX" != x; then
34512    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34513
34514  # First separate the path from the arguments. This will split at the first
34515  # space.
34516  complete="$CXX"
34517  path="${complete%% *}"
34518  tmp="$complete EOL"
34519  arguments="${tmp#* }"
34520
34521  # Input might be given as Windows format, start by converting to
34522  # unix format.
34523  new_path=`$CYGPATH -u "$path"`
34524
34525  # Now try to locate executable using which
34526  new_path=`$WHICH "$new_path" 2> /dev/null`
34527  # bat and cmd files are not always considered executable in cygwin causing which
34528  # to not find them
34529  if test "x$new_path" = x \
34530      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34531      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34532    new_path=`$CYGPATH -u "$path"`
34533  fi
34534  if test "x$new_path" = x; then
34535    # Oops. Which didn't find the executable.
34536    # The splitting of arguments from the executable at a space might have been incorrect,
34537    # since paths with space are more likely in Windows. Give it another try with the whole
34538    # argument.
34539    path="$complete"
34540    arguments="EOL"
34541    new_path=`$CYGPATH -u "$path"`
34542    new_path=`$WHICH "$new_path" 2> /dev/null`
34543    # bat and cmd files are not always considered executable in cygwin causing which
34544    # to not find them
34545    if test "x$new_path" = x \
34546        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34547        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34548      new_path=`$CYGPATH -u "$path"`
34549    fi
34550    if test "x$new_path" = x; then
34551      # It's still not found. Now this is an unrecoverable error.
34552      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34553$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34554      has_space=`$ECHO "$complete" | $GREP " "`
34555      if test "x$has_space" != x; then
34556        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34557$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34558      fi
34559      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34560    fi
34561  fi
34562
34563  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34564  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34565  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34566  # "foo.exe" is OK but "foo" is an error.
34567  #
34568  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34569  # It is also a way to make sure we got the proper file name for the real test later on.
34570  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34571  if test "x$test_shortpath" = x; then
34572    # Short path failed, file does not exist as specified.
34573    # Try adding .exe or .cmd
34574    if test -f "${new_path}.exe"; then
34575      input_to_shortpath="${new_path}.exe"
34576    elif test -f "${new_path}.cmd"; then
34577      input_to_shortpath="${new_path}.cmd"
34578    else
34579      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
34580$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
34581      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34582$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34583      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34584    fi
34585  else
34586    input_to_shortpath="$new_path"
34587  fi
34588
34589  # Call helper function which possibly converts this using DOS-style short mode.
34590  # If so, the updated path is stored in $new_path.
34591  new_path="$input_to_shortpath"
34592
34593  input_path="$input_to_shortpath"
34594  # Check if we need to convert this using DOS-style short mode. If the path
34595  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34596  # take no chances and rewrite it.
34597  # Note: m4 eats our [], so we need to use [ and ] instead.
34598  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34599  if test "x$has_forbidden_chars" != x; then
34600    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34601    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34602    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34603    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34604      # Going to short mode and back again did indeed matter. Since short mode is
34605      # case insensitive, let's make it lowercase to improve readability.
34606      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34607      # Now convert it back to Unix-style (cygpath)
34608      input_path=`$CYGPATH -u "$shortmode_path"`
34609      new_path="$input_path"
34610    fi
34611  fi
34612
34613  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34614  if test "x$test_cygdrive_prefix" = x; then
34615    # As a simple fix, exclude /usr/bin since it's not a real path.
34616    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34617      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34618      # a path prefixed by /cygdrive for fixpath to work.
34619      new_path="$CYGWIN_ROOT_PATH$input_path"
34620    fi
34621  fi
34622
34623  # remove trailing .exe if any
34624  new_path="${new_path/%.exe/}"
34625
34626    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34627
34628  # First separate the path from the arguments. This will split at the first
34629  # space.
34630  complete="$CXX"
34631  path="${complete%% *}"
34632  tmp="$complete EOL"
34633  arguments="${tmp#* }"
34634
34635  # Input might be given as Windows format, start by converting to
34636  # unix format.
34637  new_path="$path"
34638
34639  windows_path="$new_path"
34640  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34641    unix_path=`$CYGPATH -u "$windows_path"`
34642    new_path="$unix_path"
34643  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34644    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34645    new_path="$unix_path"
34646  fi
34647
34648
34649  # Now try to locate executable using which
34650  new_path=`$WHICH "$new_path" 2> /dev/null`
34651
34652  if test "x$new_path" = x; then
34653    # Oops. Which didn't find the executable.
34654    # The splitting of arguments from the executable at a space might have been incorrect,
34655    # since paths with space are more likely in Windows. Give it another try with the whole
34656    # argument.
34657    path="$complete"
34658    arguments="EOL"
34659    new_path="$path"
34660
34661  windows_path="$new_path"
34662  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34663    unix_path=`$CYGPATH -u "$windows_path"`
34664    new_path="$unix_path"
34665  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34666    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34667    new_path="$unix_path"
34668  fi
34669
34670
34671    new_path=`$WHICH "$new_path" 2> /dev/null`
34672    # bat and cmd files are not always considered executable in MSYS causing which
34673    # to not find them
34674    if test "x$new_path" = x \
34675        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34676        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34677      new_path="$path"
34678
34679  windows_path="$new_path"
34680  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34681    unix_path=`$CYGPATH -u "$windows_path"`
34682    new_path="$unix_path"
34683  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34684    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34685    new_path="$unix_path"
34686  fi
34687
34688    fi
34689
34690    if test "x$new_path" = x; then
34691      # It's still not found. Now this is an unrecoverable error.
34692      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34693$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34694      has_space=`$ECHO "$complete" | $GREP " "`
34695      if test "x$has_space" != x; then
34696        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34697$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34698      fi
34699      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34700    fi
34701  fi
34702
34703  # Now new_path has a complete unix path to the binary
34704  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34705    # Keep paths in /bin as-is, but remove trailing .exe if any
34706    new_path="${new_path/%.exe/}"
34707    # Do not save /bin paths to all_fixpath_prefixes!
34708  else
34709    # Not in mixed or Windows style, start by that.
34710    new_path=`cmd //c echo $new_path`
34711
34712  input_path="$new_path"
34713  # Check if we need to convert this using DOS-style short mode. If the path
34714  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34715  # take no chances and rewrite it.
34716  # Note: m4 eats our [], so we need to use [ and ] instead.
34717  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34718  if test "x$has_forbidden_chars" != x; then
34719    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34720    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34721  fi
34722
34723    # Output is in $new_path
34724
34725  windows_path="$new_path"
34726  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34727    unix_path=`$CYGPATH -u "$windows_path"`
34728    new_path="$unix_path"
34729  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34730    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34731    new_path="$unix_path"
34732  fi
34733
34734    # remove trailing .exe if any
34735    new_path="${new_path/%.exe/}"
34736
34737    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34738    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34739  fi
34740
34741    else
34742      # We're on a unix platform. Hooray! :)
34743      # First separate the path from the arguments. This will split at the first
34744      # space.
34745      complete="$CXX"
34746      path="${complete%% *}"
34747      tmp="$complete EOL"
34748      arguments="${tmp#* }"
34749
34750      # Cannot rely on the command "which" here since it doesn't always work.
34751      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34752      if test -z "$is_absolute_path"; then
34753        # Path to executable is not absolute. Find it.
34754        IFS_save="$IFS"
34755        IFS=:
34756        for p in $PATH; do
34757          if test -f "$p/$path" && test -x "$p/$path"; then
34758            new_path="$p/$path"
34759            break
34760          fi
34761        done
34762        IFS="$IFS_save"
34763      else
34764        # This is an absolute path, we can use it without further modifications.
34765        new_path="$path"
34766      fi
34767
34768      if test "x$new_path" = x; then
34769        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34770$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34771        has_space=`$ECHO "$complete" | $GREP " "`
34772        if test "x$has_space" != x; then
34773          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34774$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34775        fi
34776        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34777      fi
34778    fi
34779
34780    # Now join together the path and the arguments once again
34781    if test "x$arguments" != xEOL; then
34782      new_complete="$new_path ${arguments% *}"
34783    else
34784      new_complete="$new_path"
34785    fi
34786
34787    if test "x$complete" != "x$new_complete"; then
34788      CXX="$new_complete"
34789      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
34790$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
34791    fi
34792  fi
34793
34794  TEST_COMPILER="$CXX"
34795
34796  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
34797$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
34798  SYMLINK_ORIGINAL="$TEST_COMPILER"
34799
34800  if test "x$OPENJDK_BUILD_OS" != xwindows; then
34801    # Follow a chain of symbolic links. Use readlink
34802    # where it exists, else fall back to horribly
34803    # complicated shell code.
34804    if test "x$READLINK_TESTED" != yes; then
34805      # On MacOSX there is a readlink tool with a different
34806      # purpose than the GNU readlink tool. Check the found readlink.
34807      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34808      if test "x$ISGNU" = x; then
34809        # A readlink that we do not know how to use.
34810        # Are there other non-GNU readlinks out there?
34811        READLINK_TESTED=yes
34812        READLINK=
34813      fi
34814    fi
34815
34816    if test "x$READLINK" != x; then
34817      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34818    else
34819      # Save the current directory for restoring afterwards
34820      STARTDIR=$PWD
34821      COUNTER=0
34822      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34823      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34824      cd $sym_link_dir
34825      # Use -P flag to resolve symlinks in directories.
34826      cd `$THEPWDCMD -P`
34827      sym_link_dir=`$THEPWDCMD -P`
34828      # Resolve file symlinks
34829      while test $COUNTER -lt 20; do
34830        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34831        if test "x$ISLINK" == x; then
34832          # This is not a symbolic link! We are done!
34833          break
34834        fi
34835        # Again resolve directory symlinks since the target of the just found
34836        # link could be in a different directory
34837        cd `$DIRNAME $ISLINK`
34838        sym_link_dir=`$THEPWDCMD -P`
34839        sym_link_file=`$BASENAME $ISLINK`
34840        let COUNTER=COUNTER+1
34841      done
34842      cd $STARTDIR
34843      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34844    fi
34845  fi
34846
34847  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34848    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34849$as_echo "no symlink" >&6; }
34850  else
34851    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34852$as_echo "$SYMLINK_ORIGINAL" >&6; }
34853
34854    # We can't handle ccache by gcc wrappers, since we need to know if we're
34855    # using ccache. Instead ccache usage must be controlled by a configure option.
34856    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34857    if test "x$COMPILER_BASENAME" = "xccache"; then
34858      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34859$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34860      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34861    fi
34862  fi
34863
34864
34865  COMPILER=$CXX
34866  COMPILER_NAME=$COMPILER_NAME
34867
34868  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34869    # cc -V output typically looks like
34870    #     cc: Sun C 5.12 Linux_i386 2011/11/16
34871    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34872    # Check that this is likely to be the Solaris Studio cc.
34873    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
34874    if test $? -ne 0; then
34875      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34876      { $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
34877$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34878      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34879$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34880      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34881$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34882      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34883    fi
34884    # Remove usage instructions (if present), and
34885    # collapse compiler output into a single line
34886    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34887        $SED -e 's/ *[Uu]sage:.*//'`
34888    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34889        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34890  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34891    # xlc -qversion output typically looks like
34892    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34893    #     Version: 11.01.0000.0015
34894    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34895    # Check that this is likely to be the IBM XL C compiler.
34896    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34897    if test $? -ne 0; then
34898      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34899      { $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
34900$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34901      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34902$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34903      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34904$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34905      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34906    fi
34907    # Collapse compiler output into a single line
34908    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34909    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34910        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34911  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34912    # There is no specific version flag, but all output starts with a version string.
34913    # First line typically looks something like:
34914    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34915    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34916    # Check that this is likely to be Microsoft CL.EXE.
34917    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34918    if test $? -ne 0; then
34919      { $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
34920$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34921      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34922$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34923      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34924    fi
34925    # Collapse compiler output into a single line
34926    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34927    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34928        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34929  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34930    # gcc --version output typically looks like
34931    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34932    #     Copyright (C) 2013 Free Software Foundation, Inc.
34933    #     This is free software; see the source for copying conditions.  There is NO
34934    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34935    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34936    # Check that this is likely to be GCC.
34937    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34938    if test $? -ne 0; then
34939      { $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
34940$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34941      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34942$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34943      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34944    fi
34945    # Remove Copyright and legalese from version string, and
34946    # collapse into a single line
34947    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34948        $SED -e 's/ *Copyright .*//'`
34949    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34950        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
34951  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34952    # clang --version output typically looks like
34953    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34954    #    clang version 3.3 (tags/RELEASE_33/final)
34955    # or
34956    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34957    #    Target: x86_64-pc-linux-gnu
34958    #    Thread model: posix
34959    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34960    # Check that this is likely to be clang
34961    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34962    if test $? -ne 0; then
34963      { $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
34964$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34965      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34966$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34967      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34968    fi
34969    # Collapse compiler output into a single line
34970    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34971    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34972        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
34973  else
34974      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34975  fi
34976  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34977  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34978  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34979  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
34980
34981  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
34982$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
34983
34984
34985  # Now that we have resolved CXX ourself, let autoconf have its go at it
34986  ac_ext=cpp
34987ac_cpp='$CXXCPP $CPPFLAGS'
34988ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34989ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34990ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34991if test -z "$CXX"; then
34992  if test -n "$CCC"; then
34993    CXX=$CCC
34994  else
34995    if test -n "$ac_tool_prefix"; then
34996  for ac_prog in $CXX
34997  do
34998    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
34999set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35001$as_echo_n "checking for $ac_word... " >&6; }
35002if ${ac_cv_prog_CXX+:} false; then :
35003  $as_echo_n "(cached) " >&6
35004else
35005  if test -n "$CXX"; then
35006  ac_cv_prog_CXX="$CXX" # Let the user override the test.
35007else
35008as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35009for as_dir in $PATH
35010do
35011  IFS=$as_save_IFS
35012  test -z "$as_dir" && as_dir=.
35013    for ac_exec_ext in '' $ac_executable_extensions; do
35014  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35015    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
35016    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35017    break 2
35018  fi
35019done
35020  done
35021IFS=$as_save_IFS
35022
35023fi
35024fi
35025CXX=$ac_cv_prog_CXX
35026if test -n "$CXX"; then
35027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
35028$as_echo "$CXX" >&6; }
35029else
35030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35031$as_echo "no" >&6; }
35032fi
35033
35034
35035    test -n "$CXX" && break
35036  done
35037fi
35038if test -z "$CXX"; then
35039  ac_ct_CXX=$CXX
35040  for ac_prog in $CXX
35041do
35042  # Extract the first word of "$ac_prog", so it can be a program name with args.
35043set dummy $ac_prog; ac_word=$2
35044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35045$as_echo_n "checking for $ac_word... " >&6; }
35046if ${ac_cv_prog_ac_ct_CXX+:} false; then :
35047  $as_echo_n "(cached) " >&6
35048else
35049  if test -n "$ac_ct_CXX"; then
35050  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
35051else
35052as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35053for as_dir in $PATH
35054do
35055  IFS=$as_save_IFS
35056  test -z "$as_dir" && as_dir=.
35057    for ac_exec_ext in '' $ac_executable_extensions; do
35058  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35059    ac_cv_prog_ac_ct_CXX="$ac_prog"
35060    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35061    break 2
35062  fi
35063done
35064  done
35065IFS=$as_save_IFS
35066
35067fi
35068fi
35069ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
35070if test -n "$ac_ct_CXX"; then
35071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
35072$as_echo "$ac_ct_CXX" >&6; }
35073else
35074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35075$as_echo "no" >&6; }
35076fi
35077
35078
35079  test -n "$ac_ct_CXX" && break
35080done
35081
35082  if test "x$ac_ct_CXX" = x; then
35083    CXX="g++"
35084  else
35085    case $cross_compiling:$ac_tool_warned in
35086yes:)
35087{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35088$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35089ac_tool_warned=yes ;;
35090esac
35091    CXX=$ac_ct_CXX
35092  fi
35093fi
35094
35095  fi
35096fi
35097# Provide some information about the compiler.
35098$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
35099set X $ac_compile
35100ac_compiler=$2
35101for ac_option in --version -v -V -qversion; do
35102  { { ac_try="$ac_compiler $ac_option >&5"
35103case "(($ac_try" in
35104  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
35105  *) ac_try_echo=$ac_try;;
35106esac
35107eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
35108$as_echo "$ac_try_echo"; } >&5
35109  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
35110  ac_status=$?
35111  if test -s conftest.err; then
35112    sed '10a\
35113... rest of stderr output deleted ...
35114         10q' conftest.err >conftest.er1
35115    cat conftest.er1 >&5
35116  fi
35117  rm -f conftest.er1 conftest.err
35118  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35119  test $ac_status = 0; }
35120done
35121
35122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
35123$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
35124if ${ac_cv_cxx_compiler_gnu+:} false; then :
35125  $as_echo_n "(cached) " >&6
35126else
35127  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35128/* end confdefs.h.  */
35129
35130int
35131main ()
35132{
35133#ifndef __GNUC__
35134       choke me
35135#endif
35136
35137  ;
35138  return 0;
35139}
35140_ACEOF
35141if ac_fn_cxx_try_compile "$LINENO"; then :
35142  ac_compiler_gnu=yes
35143else
35144  ac_compiler_gnu=no
35145fi
35146rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35147ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
35148
35149fi
35150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
35151$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
35152if test $ac_compiler_gnu = yes; then
35153  GXX=yes
35154else
35155  GXX=
35156fi
35157ac_test_CXXFLAGS=${CXXFLAGS+set}
35158ac_save_CXXFLAGS=$CXXFLAGS
35159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
35160$as_echo_n "checking whether $CXX accepts -g... " >&6; }
35161if ${ac_cv_prog_cxx_g+:} false; then :
35162  $as_echo_n "(cached) " >&6
35163else
35164  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
35165   ac_cxx_werror_flag=yes
35166   ac_cv_prog_cxx_g=no
35167   CXXFLAGS="-g"
35168   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35169/* end confdefs.h.  */
35170
35171int
35172main ()
35173{
35174
35175  ;
35176  return 0;
35177}
35178_ACEOF
35179if ac_fn_cxx_try_compile "$LINENO"; then :
35180  ac_cv_prog_cxx_g=yes
35181else
35182  CXXFLAGS=""
35183      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35184/* end confdefs.h.  */
35185
35186int
35187main ()
35188{
35189
35190  ;
35191  return 0;
35192}
35193_ACEOF
35194if ac_fn_cxx_try_compile "$LINENO"; then :
35195
35196else
35197  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35198	 CXXFLAGS="-g"
35199	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35200/* end confdefs.h.  */
35201
35202int
35203main ()
35204{
35205
35206  ;
35207  return 0;
35208}
35209_ACEOF
35210if ac_fn_cxx_try_compile "$LINENO"; then :
35211  ac_cv_prog_cxx_g=yes
35212fi
35213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35214fi
35215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35216fi
35217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35218   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35219fi
35220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
35221$as_echo "$ac_cv_prog_cxx_g" >&6; }
35222if test "$ac_test_CXXFLAGS" = set; then
35223  CXXFLAGS=$ac_save_CXXFLAGS
35224elif test $ac_cv_prog_cxx_g = yes; then
35225  if test "$GXX" = yes; then
35226    CXXFLAGS="-g -O2"
35227  else
35228    CXXFLAGS="-g"
35229  fi
35230else
35231  if test "$GXX" = yes; then
35232    CXXFLAGS="-O2"
35233  else
35234    CXXFLAGS=
35235  fi
35236fi
35237ac_ext=cpp
35238ac_cpp='$CXXCPP $CPPFLAGS'
35239ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35240ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35241ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35242
35243
35244  # This is the compiler version number on the form X.Y[.Z]
35245
35246
35247
35248
35249  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
35250    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
35251$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
35252    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
35253$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
35254  fi
35255
35256  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
35257  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
35258    { $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
35259$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;}
35260  fi
35261
35262  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
35263    { $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
35264$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
35265  fi
35266
35267  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$CC_VERSION_NUMBER"`
35268
35269
35270  if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
35271
35272
35273
35274
35275
35276
35277
35278
35279
35280
35281
35282
35283
35284
35285
35286
35287
35288
35289
35290
35291
35292
35293
35294
35295
35296
35297
35298
35299
35300
35301
35302
35303
35304
35305
35306
35307
35308
35309
35310
35311
35312
35313
35314
35315
35316
35317
35318
35319
35320    # Execute function body
35321
35322  # Need to assign to a variable since m4 is blocked from modifying parts in [].
35323  REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
35324
35325  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
35326    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only three parts (X.Y.Z) is supported" "$LINENO" 5
35327  fi
35328
35329  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
35330    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
35331  fi
35332
35333  # Version comparison method inspired by http://stackoverflow.com/a/24067243
35334  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
35335
35336  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
35337    :
35338
35339  else
35340    :
35341
35342          { $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
35343$as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
35344
35345
35346  fi
35347
35348
35349
35350
35351
35352
35353
35354
35355
35356
35357
35358
35359
35360
35361  fi
35362
35363  #
35364  # Setup the preprocessor (CPP and CXXCPP)
35365  #
35366  ac_ext=c
35367ac_cpp='$CPP $CPPFLAGS'
35368ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35369ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35370ac_compiler_gnu=$ac_cv_c_compiler_gnu
35371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
35372$as_echo_n "checking how to run the C preprocessor... " >&6; }
35373# On Suns, sometimes $CPP names a directory.
35374if test -n "$CPP" && test -d "$CPP"; then
35375  CPP=
35376fi
35377if test -z "$CPP"; then
35378  if ${ac_cv_prog_CPP+:} false; then :
35379  $as_echo_n "(cached) " >&6
35380else
35381      # Double quotes because CPP needs to be expanded
35382    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
35383    do
35384      ac_preproc_ok=false
35385for ac_c_preproc_warn_flag in '' yes
35386do
35387  # Use a header file that comes with gcc, so configuring glibc
35388  # with a fresh cross-compiler works.
35389  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35390  # <limits.h> exists even on freestanding compilers.
35391  # On the NeXT, cc -E runs the code through the compiler's parser,
35392  # not just through cpp. "Syntax error" is here to catch this case.
35393  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35394/* end confdefs.h.  */
35395#ifdef __STDC__
35396# include <limits.h>
35397#else
35398# include <assert.h>
35399#endif
35400		     Syntax error
35401_ACEOF
35402if ac_fn_c_try_cpp "$LINENO"; then :
35403
35404else
35405  # Broken: fails on valid input.
35406continue
35407fi
35408rm -f conftest.err conftest.i conftest.$ac_ext
35409
35410  # OK, works on sane cases.  Now check whether nonexistent headers
35411  # can be detected and how.
35412  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35413/* end confdefs.h.  */
35414#include <ac_nonexistent.h>
35415_ACEOF
35416if ac_fn_c_try_cpp "$LINENO"; then :
35417  # Broken: success on invalid input.
35418continue
35419else
35420  # Passes both tests.
35421ac_preproc_ok=:
35422break
35423fi
35424rm -f conftest.err conftest.i conftest.$ac_ext
35425
35426done
35427# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35428rm -f conftest.i conftest.err conftest.$ac_ext
35429if $ac_preproc_ok; then :
35430  break
35431fi
35432
35433    done
35434    ac_cv_prog_CPP=$CPP
35435
35436fi
35437  CPP=$ac_cv_prog_CPP
35438else
35439  ac_cv_prog_CPP=$CPP
35440fi
35441{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
35442$as_echo "$CPP" >&6; }
35443ac_preproc_ok=false
35444for ac_c_preproc_warn_flag in '' yes
35445do
35446  # Use a header file that comes with gcc, so configuring glibc
35447  # with a fresh cross-compiler works.
35448  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35449  # <limits.h> exists even on freestanding compilers.
35450  # On the NeXT, cc -E runs the code through the compiler's parser,
35451  # not just through cpp. "Syntax error" is here to catch this case.
35452  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35453/* end confdefs.h.  */
35454#ifdef __STDC__
35455# include <limits.h>
35456#else
35457# include <assert.h>
35458#endif
35459		     Syntax error
35460_ACEOF
35461if ac_fn_c_try_cpp "$LINENO"; then :
35462
35463else
35464  # Broken: fails on valid input.
35465continue
35466fi
35467rm -f conftest.err conftest.i conftest.$ac_ext
35468
35469  # OK, works on sane cases.  Now check whether nonexistent headers
35470  # can be detected and how.
35471  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35472/* end confdefs.h.  */
35473#include <ac_nonexistent.h>
35474_ACEOF
35475if ac_fn_c_try_cpp "$LINENO"; then :
35476  # Broken: success on invalid input.
35477continue
35478else
35479  # Passes both tests.
35480ac_preproc_ok=:
35481break
35482fi
35483rm -f conftest.err conftest.i conftest.$ac_ext
35484
35485done
35486# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35487rm -f conftest.i conftest.err conftest.$ac_ext
35488if $ac_preproc_ok; then :
35489
35490else
35491  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35492$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35493as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
35494See \`config.log' for more details" "$LINENO" 5; }
35495fi
35496
35497ac_ext=cpp
35498ac_cpp='$CXXCPP $CPPFLAGS'
35499ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35500ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35501ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35502
35503
35504  # Only process if variable expands to non-empty
35505
35506  if test "x$CPP" != x; then
35507    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35508
35509  # First separate the path from the arguments. This will split at the first
35510  # space.
35511  complete="$CPP"
35512  path="${complete%% *}"
35513  tmp="$complete EOL"
35514  arguments="${tmp#* }"
35515
35516  # Input might be given as Windows format, start by converting to
35517  # unix format.
35518  new_path=`$CYGPATH -u "$path"`
35519
35520  # Now try to locate executable using which
35521  new_path=`$WHICH "$new_path" 2> /dev/null`
35522  # bat and cmd files are not always considered executable in cygwin causing which
35523  # to not find them
35524  if test "x$new_path" = x \
35525      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35526      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35527    new_path=`$CYGPATH -u "$path"`
35528  fi
35529  if test "x$new_path" = x; then
35530    # Oops. Which didn't find the executable.
35531    # The splitting of arguments from the executable at a space might have been incorrect,
35532    # since paths with space are more likely in Windows. Give it another try with the whole
35533    # argument.
35534    path="$complete"
35535    arguments="EOL"
35536    new_path=`$CYGPATH -u "$path"`
35537    new_path=`$WHICH "$new_path" 2> /dev/null`
35538    # bat and cmd files are not always considered executable in cygwin causing which
35539    # to not find them
35540    if test "x$new_path" = x \
35541        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35542        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35543      new_path=`$CYGPATH -u "$path"`
35544    fi
35545    if test "x$new_path" = x; then
35546      # It's still not found. Now this is an unrecoverable error.
35547      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35548$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35549      has_space=`$ECHO "$complete" | $GREP " "`
35550      if test "x$has_space" != x; then
35551        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35552$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35553      fi
35554      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35555    fi
35556  fi
35557
35558  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35559  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35560  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35561  # "foo.exe" is OK but "foo" is an error.
35562  #
35563  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35564  # It is also a way to make sure we got the proper file name for the real test later on.
35565  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35566  if test "x$test_shortpath" = x; then
35567    # Short path failed, file does not exist as specified.
35568    # Try adding .exe or .cmd
35569    if test -f "${new_path}.exe"; then
35570      input_to_shortpath="${new_path}.exe"
35571    elif test -f "${new_path}.cmd"; then
35572      input_to_shortpath="${new_path}.cmd"
35573    else
35574      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
35575$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
35576      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35577$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35578      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35579    fi
35580  else
35581    input_to_shortpath="$new_path"
35582  fi
35583
35584  # Call helper function which possibly converts this using DOS-style short mode.
35585  # If so, the updated path is stored in $new_path.
35586  new_path="$input_to_shortpath"
35587
35588  input_path="$input_to_shortpath"
35589  # Check if we need to convert this using DOS-style short mode. If the path
35590  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35591  # take no chances and rewrite it.
35592  # Note: m4 eats our [], so we need to use [ and ] instead.
35593  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35594  if test "x$has_forbidden_chars" != x; then
35595    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35596    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35597    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35598    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35599      # Going to short mode and back again did indeed matter. Since short mode is
35600      # case insensitive, let's make it lowercase to improve readability.
35601      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35602      # Now convert it back to Unix-style (cygpath)
35603      input_path=`$CYGPATH -u "$shortmode_path"`
35604      new_path="$input_path"
35605    fi
35606  fi
35607
35608  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35609  if test "x$test_cygdrive_prefix" = x; then
35610    # As a simple fix, exclude /usr/bin since it's not a real path.
35611    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35612      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35613      # a path prefixed by /cygdrive for fixpath to work.
35614      new_path="$CYGWIN_ROOT_PATH$input_path"
35615    fi
35616  fi
35617
35618  # remove trailing .exe if any
35619  new_path="${new_path/%.exe/}"
35620
35621    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35622
35623  # First separate the path from the arguments. This will split at the first
35624  # space.
35625  complete="$CPP"
35626  path="${complete%% *}"
35627  tmp="$complete EOL"
35628  arguments="${tmp#* }"
35629
35630  # Input might be given as Windows format, start by converting to
35631  # unix format.
35632  new_path="$path"
35633
35634  windows_path="$new_path"
35635  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35636    unix_path=`$CYGPATH -u "$windows_path"`
35637    new_path="$unix_path"
35638  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35639    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35640    new_path="$unix_path"
35641  fi
35642
35643
35644  # Now try to locate executable using which
35645  new_path=`$WHICH "$new_path" 2> /dev/null`
35646
35647  if test "x$new_path" = x; then
35648    # Oops. Which didn't find the executable.
35649    # The splitting of arguments from the executable at a space might have been incorrect,
35650    # since paths with space are more likely in Windows. Give it another try with the whole
35651    # argument.
35652    path="$complete"
35653    arguments="EOL"
35654    new_path="$path"
35655
35656  windows_path="$new_path"
35657  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35658    unix_path=`$CYGPATH -u "$windows_path"`
35659    new_path="$unix_path"
35660  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35661    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35662    new_path="$unix_path"
35663  fi
35664
35665
35666    new_path=`$WHICH "$new_path" 2> /dev/null`
35667    # bat and cmd files are not always considered executable in MSYS causing which
35668    # to not find them
35669    if test "x$new_path" = x \
35670        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35671        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35672      new_path="$path"
35673
35674  windows_path="$new_path"
35675  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35676    unix_path=`$CYGPATH -u "$windows_path"`
35677    new_path="$unix_path"
35678  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35679    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35680    new_path="$unix_path"
35681  fi
35682
35683    fi
35684
35685    if test "x$new_path" = x; then
35686      # It's still not found. Now this is an unrecoverable error.
35687      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35688$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35689      has_space=`$ECHO "$complete" | $GREP " "`
35690      if test "x$has_space" != x; then
35691        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35692$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35693      fi
35694      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35695    fi
35696  fi
35697
35698  # Now new_path has a complete unix path to the binary
35699  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35700    # Keep paths in /bin as-is, but remove trailing .exe if any
35701    new_path="${new_path/%.exe/}"
35702    # Do not save /bin paths to all_fixpath_prefixes!
35703  else
35704    # Not in mixed or Windows style, start by that.
35705    new_path=`cmd //c echo $new_path`
35706
35707  input_path="$new_path"
35708  # Check if we need to convert this using DOS-style short mode. If the path
35709  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35710  # take no chances and rewrite it.
35711  # Note: m4 eats our [], so we need to use [ and ] instead.
35712  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35713  if test "x$has_forbidden_chars" != x; then
35714    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35715    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35716  fi
35717
35718    # Output is in $new_path
35719
35720  windows_path="$new_path"
35721  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35722    unix_path=`$CYGPATH -u "$windows_path"`
35723    new_path="$unix_path"
35724  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35725    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35726    new_path="$unix_path"
35727  fi
35728
35729    # remove trailing .exe if any
35730    new_path="${new_path/%.exe/}"
35731
35732    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35733    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35734  fi
35735
35736    else
35737      # We're on a unix platform. Hooray! :)
35738      # First separate the path from the arguments. This will split at the first
35739      # space.
35740      complete="$CPP"
35741      path="${complete%% *}"
35742      tmp="$complete EOL"
35743      arguments="${tmp#* }"
35744
35745      # Cannot rely on the command "which" here since it doesn't always work.
35746      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35747      if test -z "$is_absolute_path"; then
35748        # Path to executable is not absolute. Find it.
35749        IFS_save="$IFS"
35750        IFS=:
35751        for p in $PATH; do
35752          if test -f "$p/$path" && test -x "$p/$path"; then
35753            new_path="$p/$path"
35754            break
35755          fi
35756        done
35757        IFS="$IFS_save"
35758      else
35759        # This is an absolute path, we can use it without further modifications.
35760        new_path="$path"
35761      fi
35762
35763      if test "x$new_path" = x; then
35764        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35765$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35766        has_space=`$ECHO "$complete" | $GREP " "`
35767        if test "x$has_space" != x; then
35768          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35769$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35770        fi
35771        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35772      fi
35773    fi
35774
35775    # Now join together the path and the arguments once again
35776    if test "x$arguments" != xEOL; then
35777      new_complete="$new_path ${arguments% *}"
35778    else
35779      new_complete="$new_path"
35780    fi
35781
35782    if test "x$complete" != "x$new_complete"; then
35783      CPP="$new_complete"
35784      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
35785$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
35786    fi
35787  fi
35788
35789  ac_ext=cpp
35790ac_cpp='$CXXCPP $CPPFLAGS'
35791ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35792ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35793ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
35795$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
35796if test -z "$CXXCPP"; then
35797  if ${ac_cv_prog_CXXCPP+:} false; then :
35798  $as_echo_n "(cached) " >&6
35799else
35800      # Double quotes because CXXCPP needs to be expanded
35801    for CXXCPP in "$CXX -E" "/lib/cpp"
35802    do
35803      ac_preproc_ok=false
35804for ac_cxx_preproc_warn_flag in '' yes
35805do
35806  # Use a header file that comes with gcc, so configuring glibc
35807  # with a fresh cross-compiler works.
35808  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35809  # <limits.h> exists even on freestanding compilers.
35810  # On the NeXT, cc -E runs the code through the compiler's parser,
35811  # not just through cpp. "Syntax error" is here to catch this case.
35812  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35813/* end confdefs.h.  */
35814#ifdef __STDC__
35815# include <limits.h>
35816#else
35817# include <assert.h>
35818#endif
35819		     Syntax error
35820_ACEOF
35821if ac_fn_cxx_try_cpp "$LINENO"; then :
35822
35823else
35824  # Broken: fails on valid input.
35825continue
35826fi
35827rm -f conftest.err conftest.i conftest.$ac_ext
35828
35829  # OK, works on sane cases.  Now check whether nonexistent headers
35830  # can be detected and how.
35831  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35832/* end confdefs.h.  */
35833#include <ac_nonexistent.h>
35834_ACEOF
35835if ac_fn_cxx_try_cpp "$LINENO"; then :
35836  # Broken: success on invalid input.
35837continue
35838else
35839  # Passes both tests.
35840ac_preproc_ok=:
35841break
35842fi
35843rm -f conftest.err conftest.i conftest.$ac_ext
35844
35845done
35846# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35847rm -f conftest.i conftest.err conftest.$ac_ext
35848if $ac_preproc_ok; then :
35849  break
35850fi
35851
35852    done
35853    ac_cv_prog_CXXCPP=$CXXCPP
35854
35855fi
35856  CXXCPP=$ac_cv_prog_CXXCPP
35857else
35858  ac_cv_prog_CXXCPP=$CXXCPP
35859fi
35860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
35861$as_echo "$CXXCPP" >&6; }
35862ac_preproc_ok=false
35863for ac_cxx_preproc_warn_flag in '' yes
35864do
35865  # Use a header file that comes with gcc, so configuring glibc
35866  # with a fresh cross-compiler works.
35867  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35868  # <limits.h> exists even on freestanding compilers.
35869  # On the NeXT, cc -E runs the code through the compiler's parser,
35870  # not just through cpp. "Syntax error" is here to catch this case.
35871  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35872/* end confdefs.h.  */
35873#ifdef __STDC__
35874# include <limits.h>
35875#else
35876# include <assert.h>
35877#endif
35878		     Syntax error
35879_ACEOF
35880if ac_fn_cxx_try_cpp "$LINENO"; then :
35881
35882else
35883  # Broken: fails on valid input.
35884continue
35885fi
35886rm -f conftest.err conftest.i conftest.$ac_ext
35887
35888  # OK, works on sane cases.  Now check whether nonexistent headers
35889  # can be detected and how.
35890  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35891/* end confdefs.h.  */
35892#include <ac_nonexistent.h>
35893_ACEOF
35894if ac_fn_cxx_try_cpp "$LINENO"; then :
35895  # Broken: success on invalid input.
35896continue
35897else
35898  # Passes both tests.
35899ac_preproc_ok=:
35900break
35901fi
35902rm -f conftest.err conftest.i conftest.$ac_ext
35903
35904done
35905# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35906rm -f conftest.i conftest.err conftest.$ac_ext
35907if $ac_preproc_ok; then :
35908
35909else
35910  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35911$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35912as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
35913See \`config.log' for more details" "$LINENO" 5; }
35914fi
35915
35916ac_ext=cpp
35917ac_cpp='$CXXCPP $CPPFLAGS'
35918ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35919ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35920ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35921
35922
35923  # Only process if variable expands to non-empty
35924
35925  if test "x$CXXCPP" != x; then
35926    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35927
35928  # First separate the path from the arguments. This will split at the first
35929  # space.
35930  complete="$CXXCPP"
35931  path="${complete%% *}"
35932  tmp="$complete EOL"
35933  arguments="${tmp#* }"
35934
35935  # Input might be given as Windows format, start by converting to
35936  # unix format.
35937  new_path=`$CYGPATH -u "$path"`
35938
35939  # Now try to locate executable using which
35940  new_path=`$WHICH "$new_path" 2> /dev/null`
35941  # bat and cmd files are not always considered executable in cygwin causing which
35942  # to not find them
35943  if test "x$new_path" = x \
35944      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35945      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35946    new_path=`$CYGPATH -u "$path"`
35947  fi
35948  if test "x$new_path" = x; then
35949    # Oops. Which didn't find the executable.
35950    # The splitting of arguments from the executable at a space might have been incorrect,
35951    # since paths with space are more likely in Windows. Give it another try with the whole
35952    # argument.
35953    path="$complete"
35954    arguments="EOL"
35955    new_path=`$CYGPATH -u "$path"`
35956    new_path=`$WHICH "$new_path" 2> /dev/null`
35957    # bat and cmd files are not always considered executable in cygwin causing which
35958    # to not find them
35959    if test "x$new_path" = x \
35960        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35961        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35962      new_path=`$CYGPATH -u "$path"`
35963    fi
35964    if test "x$new_path" = x; then
35965      # It's still not found. Now this is an unrecoverable error.
35966      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35967$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35968      has_space=`$ECHO "$complete" | $GREP " "`
35969      if test "x$has_space" != x; then
35970        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35971$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35972      fi
35973      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35974    fi
35975  fi
35976
35977  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35978  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35979  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35980  # "foo.exe" is OK but "foo" is an error.
35981  #
35982  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35983  # It is also a way to make sure we got the proper file name for the real test later on.
35984  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35985  if test "x$test_shortpath" = x; then
35986    # Short path failed, file does not exist as specified.
35987    # Try adding .exe or .cmd
35988    if test -f "${new_path}.exe"; then
35989      input_to_shortpath="${new_path}.exe"
35990    elif test -f "${new_path}.cmd"; then
35991      input_to_shortpath="${new_path}.cmd"
35992    else
35993      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
35994$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
35995      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35996$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35997      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35998    fi
35999  else
36000    input_to_shortpath="$new_path"
36001  fi
36002
36003  # Call helper function which possibly converts this using DOS-style short mode.
36004  # If so, the updated path is stored in $new_path.
36005  new_path="$input_to_shortpath"
36006
36007  input_path="$input_to_shortpath"
36008  # Check if we need to convert this using DOS-style short mode. If the path
36009  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36010  # take no chances and rewrite it.
36011  # Note: m4 eats our [], so we need to use [ and ] instead.
36012  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36013  if test "x$has_forbidden_chars" != x; then
36014    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36015    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36016    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36017    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36018      # Going to short mode and back again did indeed matter. Since short mode is
36019      # case insensitive, let's make it lowercase to improve readability.
36020      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36021      # Now convert it back to Unix-style (cygpath)
36022      input_path=`$CYGPATH -u "$shortmode_path"`
36023      new_path="$input_path"
36024    fi
36025  fi
36026
36027  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36028  if test "x$test_cygdrive_prefix" = x; then
36029    # As a simple fix, exclude /usr/bin since it's not a real path.
36030    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36031      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36032      # a path prefixed by /cygdrive for fixpath to work.
36033      new_path="$CYGWIN_ROOT_PATH$input_path"
36034    fi
36035  fi
36036
36037  # remove trailing .exe if any
36038  new_path="${new_path/%.exe/}"
36039
36040    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36041
36042  # First separate the path from the arguments. This will split at the first
36043  # space.
36044  complete="$CXXCPP"
36045  path="${complete%% *}"
36046  tmp="$complete EOL"
36047  arguments="${tmp#* }"
36048
36049  # Input might be given as Windows format, start by converting to
36050  # unix format.
36051  new_path="$path"
36052
36053  windows_path="$new_path"
36054  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36055    unix_path=`$CYGPATH -u "$windows_path"`
36056    new_path="$unix_path"
36057  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36058    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36059    new_path="$unix_path"
36060  fi
36061
36062
36063  # Now try to locate executable using which
36064  new_path=`$WHICH "$new_path" 2> /dev/null`
36065
36066  if test "x$new_path" = x; then
36067    # Oops. Which didn't find the executable.
36068    # The splitting of arguments from the executable at a space might have been incorrect,
36069    # since paths with space are more likely in Windows. Give it another try with the whole
36070    # argument.
36071    path="$complete"
36072    arguments="EOL"
36073    new_path="$path"
36074
36075  windows_path="$new_path"
36076  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36077    unix_path=`$CYGPATH -u "$windows_path"`
36078    new_path="$unix_path"
36079  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36080    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36081    new_path="$unix_path"
36082  fi
36083
36084
36085    new_path=`$WHICH "$new_path" 2> /dev/null`
36086    # bat and cmd files are not always considered executable in MSYS causing which
36087    # to not find them
36088    if test "x$new_path" = x \
36089        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36090        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36091      new_path="$path"
36092
36093  windows_path="$new_path"
36094  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36095    unix_path=`$CYGPATH -u "$windows_path"`
36096    new_path="$unix_path"
36097  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36098    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36099    new_path="$unix_path"
36100  fi
36101
36102    fi
36103
36104    if test "x$new_path" = x; then
36105      # It's still not found. Now this is an unrecoverable error.
36106      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36107$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36108      has_space=`$ECHO "$complete" | $GREP " "`
36109      if test "x$has_space" != x; then
36110        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36111$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36112      fi
36113      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36114    fi
36115  fi
36116
36117  # Now new_path has a complete unix path to the binary
36118  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36119    # Keep paths in /bin as-is, but remove trailing .exe if any
36120    new_path="${new_path/%.exe/}"
36121    # Do not save /bin paths to all_fixpath_prefixes!
36122  else
36123    # Not in mixed or Windows style, start by that.
36124    new_path=`cmd //c echo $new_path`
36125
36126  input_path="$new_path"
36127  # Check if we need to convert this using DOS-style short mode. If the path
36128  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36129  # take no chances and rewrite it.
36130  # Note: m4 eats our [], so we need to use [ and ] instead.
36131  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36132  if test "x$has_forbidden_chars" != x; then
36133    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36134    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36135  fi
36136
36137    # Output is in $new_path
36138
36139  windows_path="$new_path"
36140  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36141    unix_path=`$CYGPATH -u "$windows_path"`
36142    new_path="$unix_path"
36143  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36144    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36145    new_path="$unix_path"
36146  fi
36147
36148    # remove trailing .exe if any
36149    new_path="${new_path/%.exe/}"
36150
36151    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36152    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36153  fi
36154
36155    else
36156      # We're on a unix platform. Hooray! :)
36157      # First separate the path from the arguments. This will split at the first
36158      # space.
36159      complete="$CXXCPP"
36160      path="${complete%% *}"
36161      tmp="$complete EOL"
36162      arguments="${tmp#* }"
36163
36164      # Cannot rely on the command "which" here since it doesn't always work.
36165      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36166      if test -z "$is_absolute_path"; then
36167        # Path to executable is not absolute. Find it.
36168        IFS_save="$IFS"
36169        IFS=:
36170        for p in $PATH; do
36171          if test -f "$p/$path" && test -x "$p/$path"; then
36172            new_path="$p/$path"
36173            break
36174          fi
36175        done
36176        IFS="$IFS_save"
36177      else
36178        # This is an absolute path, we can use it without further modifications.
36179        new_path="$path"
36180      fi
36181
36182      if test "x$new_path" = x; then
36183        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36184$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36185        has_space=`$ECHO "$complete" | $GREP " "`
36186        if test "x$has_space" != x; then
36187          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36188$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36189        fi
36190        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36191      fi
36192    fi
36193
36194    # Now join together the path and the arguments once again
36195    if test "x$arguments" != xEOL; then
36196      new_complete="$new_path ${arguments% *}"
36197    else
36198      new_complete="$new_path"
36199    fi
36200
36201    if test "x$complete" != "x$new_complete"; then
36202      CXXCPP="$new_complete"
36203      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
36204$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
36205    fi
36206  fi
36207
36208
36209  #
36210  # Setup the linker (LD)
36211  #
36212  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36213    # In the Microsoft toolchain we have a separate LD command "link".
36214    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
36215    # a cygwin program for something completely different.
36216    # Extract the first word of "link", so it can be a program name with args.
36217set dummy link; ac_word=$2
36218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36219$as_echo_n "checking for $ac_word... " >&6; }
36220if ${ac_cv_prog_LD+:} false; then :
36221  $as_echo_n "(cached) " >&6
36222else
36223  if test -n "$LD"; then
36224  ac_cv_prog_LD="$LD" # Let the user override the test.
36225else
36226  ac_prog_rejected=no
36227as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36228for as_dir in $PATH
36229do
36230  IFS=$as_save_IFS
36231  test -z "$as_dir" && as_dir=.
36232    for ac_exec_ext in '' $ac_executable_extensions; do
36233  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36234    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
36235       ac_prog_rejected=yes
36236       continue
36237     fi
36238    ac_cv_prog_LD="link"
36239    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36240    break 2
36241  fi
36242done
36243  done
36244IFS=$as_save_IFS
36245
36246if test $ac_prog_rejected = yes; then
36247  # We found a bogon in the path, so make sure we never use it.
36248  set dummy $ac_cv_prog_LD
36249  shift
36250  if test $# != 0; then
36251    # We chose a different compiler from the bogus one.
36252    # However, it has the same basename, so the bogon will be chosen
36253    # first if we set LD to just the basename; use the full file name.
36254    shift
36255    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
36256  fi
36257fi
36258fi
36259fi
36260LD=$ac_cv_prog_LD
36261if test -n "$LD"; then
36262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
36263$as_echo "$LD" >&6; }
36264else
36265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36266$as_echo "no" >&6; }
36267fi
36268
36269
36270
36271  # Only process if variable expands to non-empty
36272
36273  if test "x$LD" != x; then
36274    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36275
36276  # First separate the path from the arguments. This will split at the first
36277  # space.
36278  complete="$LD"
36279  path="${complete%% *}"
36280  tmp="$complete EOL"
36281  arguments="${tmp#* }"
36282
36283  # Input might be given as Windows format, start by converting to
36284  # unix format.
36285  new_path=`$CYGPATH -u "$path"`
36286
36287  # Now try to locate executable using which
36288  new_path=`$WHICH "$new_path" 2> /dev/null`
36289  # bat and cmd files are not always considered executable in cygwin causing which
36290  # to not find them
36291  if test "x$new_path" = x \
36292      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36293      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36294    new_path=`$CYGPATH -u "$path"`
36295  fi
36296  if test "x$new_path" = x; then
36297    # Oops. Which didn't find the executable.
36298    # The splitting of arguments from the executable at a space might have been incorrect,
36299    # since paths with space are more likely in Windows. Give it another try with the whole
36300    # argument.
36301    path="$complete"
36302    arguments="EOL"
36303    new_path=`$CYGPATH -u "$path"`
36304    new_path=`$WHICH "$new_path" 2> /dev/null`
36305    # bat and cmd files are not always considered executable in cygwin causing which
36306    # to not find them
36307    if test "x$new_path" = x \
36308        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36309        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36310      new_path=`$CYGPATH -u "$path"`
36311    fi
36312    if test "x$new_path" = x; then
36313      # It's still not found. Now this is an unrecoverable error.
36314      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36315$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36316      has_space=`$ECHO "$complete" | $GREP " "`
36317      if test "x$has_space" != x; then
36318        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36319$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36320      fi
36321      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36322    fi
36323  fi
36324
36325  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36326  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36327  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36328  # "foo.exe" is OK but "foo" is an error.
36329  #
36330  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36331  # It is also a way to make sure we got the proper file name for the real test later on.
36332  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36333  if test "x$test_shortpath" = x; then
36334    # Short path failed, file does not exist as specified.
36335    # Try adding .exe or .cmd
36336    if test -f "${new_path}.exe"; then
36337      input_to_shortpath="${new_path}.exe"
36338    elif test -f "${new_path}.cmd"; then
36339      input_to_shortpath="${new_path}.cmd"
36340    else
36341      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
36342$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
36343      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36344$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36345      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36346    fi
36347  else
36348    input_to_shortpath="$new_path"
36349  fi
36350
36351  # Call helper function which possibly converts this using DOS-style short mode.
36352  # If so, the updated path is stored in $new_path.
36353  new_path="$input_to_shortpath"
36354
36355  input_path="$input_to_shortpath"
36356  # Check if we need to convert this using DOS-style short mode. If the path
36357  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36358  # take no chances and rewrite it.
36359  # Note: m4 eats our [], so we need to use [ and ] instead.
36360  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36361  if test "x$has_forbidden_chars" != x; then
36362    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36363    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36364    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36365    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36366      # Going to short mode and back again did indeed matter. Since short mode is
36367      # case insensitive, let's make it lowercase to improve readability.
36368      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36369      # Now convert it back to Unix-style (cygpath)
36370      input_path=`$CYGPATH -u "$shortmode_path"`
36371      new_path="$input_path"
36372    fi
36373  fi
36374
36375  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36376  if test "x$test_cygdrive_prefix" = x; then
36377    # As a simple fix, exclude /usr/bin since it's not a real path.
36378    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36379      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36380      # a path prefixed by /cygdrive for fixpath to work.
36381      new_path="$CYGWIN_ROOT_PATH$input_path"
36382    fi
36383  fi
36384
36385  # remove trailing .exe if any
36386  new_path="${new_path/%.exe/}"
36387
36388    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36389
36390  # First separate the path from the arguments. This will split at the first
36391  # space.
36392  complete="$LD"
36393  path="${complete%% *}"
36394  tmp="$complete EOL"
36395  arguments="${tmp#* }"
36396
36397  # Input might be given as Windows format, start by converting to
36398  # unix format.
36399  new_path="$path"
36400
36401  windows_path="$new_path"
36402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36403    unix_path=`$CYGPATH -u "$windows_path"`
36404    new_path="$unix_path"
36405  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36406    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36407    new_path="$unix_path"
36408  fi
36409
36410
36411  # Now try to locate executable using which
36412  new_path=`$WHICH "$new_path" 2> /dev/null`
36413
36414  if test "x$new_path" = x; then
36415    # Oops. Which didn't find the executable.
36416    # The splitting of arguments from the executable at a space might have been incorrect,
36417    # since paths with space are more likely in Windows. Give it another try with the whole
36418    # argument.
36419    path="$complete"
36420    arguments="EOL"
36421    new_path="$path"
36422
36423  windows_path="$new_path"
36424  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36425    unix_path=`$CYGPATH -u "$windows_path"`
36426    new_path="$unix_path"
36427  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36428    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36429    new_path="$unix_path"
36430  fi
36431
36432
36433    new_path=`$WHICH "$new_path" 2> /dev/null`
36434    # bat and cmd files are not always considered executable in MSYS causing which
36435    # to not find them
36436    if test "x$new_path" = x \
36437        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36438        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36439      new_path="$path"
36440
36441  windows_path="$new_path"
36442  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36443    unix_path=`$CYGPATH -u "$windows_path"`
36444    new_path="$unix_path"
36445  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36446    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36447    new_path="$unix_path"
36448  fi
36449
36450    fi
36451
36452    if test "x$new_path" = x; then
36453      # It's still not found. Now this is an unrecoverable error.
36454      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36455$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36456      has_space=`$ECHO "$complete" | $GREP " "`
36457      if test "x$has_space" != x; then
36458        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36459$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36460      fi
36461      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36462    fi
36463  fi
36464
36465  # Now new_path has a complete unix path to the binary
36466  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36467    # Keep paths in /bin as-is, but remove trailing .exe if any
36468    new_path="${new_path/%.exe/}"
36469    # Do not save /bin paths to all_fixpath_prefixes!
36470  else
36471    # Not in mixed or Windows style, start by that.
36472    new_path=`cmd //c echo $new_path`
36473
36474  input_path="$new_path"
36475  # Check if we need to convert this using DOS-style short mode. If the path
36476  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36477  # take no chances and rewrite it.
36478  # Note: m4 eats our [], so we need to use [ and ] instead.
36479  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36480  if test "x$has_forbidden_chars" != x; then
36481    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36482    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36483  fi
36484
36485    # Output is in $new_path
36486
36487  windows_path="$new_path"
36488  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36489    unix_path=`$CYGPATH -u "$windows_path"`
36490    new_path="$unix_path"
36491  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36492    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36493    new_path="$unix_path"
36494  fi
36495
36496    # remove trailing .exe if any
36497    new_path="${new_path/%.exe/}"
36498
36499    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36500    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36501  fi
36502
36503    else
36504      # We're on a unix platform. Hooray! :)
36505      # First separate the path from the arguments. This will split at the first
36506      # space.
36507      complete="$LD"
36508      path="${complete%% *}"
36509      tmp="$complete EOL"
36510      arguments="${tmp#* }"
36511
36512      # Cannot rely on the command "which" here since it doesn't always work.
36513      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36514      if test -z "$is_absolute_path"; then
36515        # Path to executable is not absolute. Find it.
36516        IFS_save="$IFS"
36517        IFS=:
36518        for p in $PATH; do
36519          if test -f "$p/$path" && test -x "$p/$path"; then
36520            new_path="$p/$path"
36521            break
36522          fi
36523        done
36524        IFS="$IFS_save"
36525      else
36526        # This is an absolute path, we can use it without further modifications.
36527        new_path="$path"
36528      fi
36529
36530      if test "x$new_path" = x; then
36531        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36532$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36533        has_space=`$ECHO "$complete" | $GREP " "`
36534        if test "x$has_space" != x; then
36535          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36536$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36537        fi
36538        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36539      fi
36540    fi
36541
36542    # Now join together the path and the arguments once again
36543    if test "x$arguments" != xEOL; then
36544      new_complete="$new_path ${arguments% *}"
36545    else
36546      new_complete="$new_path"
36547    fi
36548
36549    if test "x$complete" != "x$new_complete"; then
36550      LD="$new_complete"
36551      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
36552$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
36553    fi
36554  fi
36555
36556    # Verify that we indeed succeeded with this trick.
36557    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
36558$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
36559    "$LD" --version > /dev/null
36560    if test $? -eq 0 ; then
36561      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36562$as_echo "no" >&6; }
36563      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
36564    else
36565      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36566$as_echo "yes" >&6; }
36567    fi
36568    LDCXX="$LD"
36569  else
36570    # All other toolchains use the compiler to link.
36571    LD="$CC"
36572    LDCXX="$CXX"
36573  fi
36574
36575  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
36576
36577
36578  #
36579  # Setup the assembler (AS)
36580  #
36581  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
36582
36583
36584  # Publish this variable in the help.
36585
36586
36587  if [ -z "${AS+x}" ]; then
36588    # The variable is not set by user, try to locate tool using the code snippet
36589    for ac_prog in as
36590do
36591  # Extract the first word of "$ac_prog", so it can be a program name with args.
36592set dummy $ac_prog; ac_word=$2
36593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36594$as_echo_n "checking for $ac_word... " >&6; }
36595if ${ac_cv_path_AS+:} false; then :
36596  $as_echo_n "(cached) " >&6
36597else
36598  case $AS in
36599  [\\/]* | ?:[\\/]*)
36600  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36601  ;;
36602  *)
36603  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36604for as_dir in $PATH
36605do
36606  IFS=$as_save_IFS
36607  test -z "$as_dir" && as_dir=.
36608    for ac_exec_ext in '' $ac_executable_extensions; do
36609  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36610    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36611    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36612    break 2
36613  fi
36614done
36615  done
36616IFS=$as_save_IFS
36617
36618  ;;
36619esac
36620fi
36621AS=$ac_cv_path_AS
36622if test -n "$AS"; then
36623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36624$as_echo "$AS" >&6; }
36625else
36626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36627$as_echo "no" >&6; }
36628fi
36629
36630
36631  test -n "$AS" && break
36632done
36633
36634  else
36635    # The variable is set, but is it from the command line or the environment?
36636
36637    # Try to remove the string !AS! from our list.
36638    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
36639    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36640      # If it failed, the variable was not from the command line. Ignore it,
36641      # but warn the user (except for BASH, which is always set by the calling BASH).
36642      if test "xAS" != xBASH; then
36643        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
36644$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
36645      fi
36646      # Try to locate tool using the code snippet
36647      for ac_prog in as
36648do
36649  # Extract the first word of "$ac_prog", so it can be a program name with args.
36650set dummy $ac_prog; ac_word=$2
36651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36652$as_echo_n "checking for $ac_word... " >&6; }
36653if ${ac_cv_path_AS+:} false; then :
36654  $as_echo_n "(cached) " >&6
36655else
36656  case $AS in
36657  [\\/]* | ?:[\\/]*)
36658  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36659  ;;
36660  *)
36661  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36662for as_dir in $PATH
36663do
36664  IFS=$as_save_IFS
36665  test -z "$as_dir" && as_dir=.
36666    for ac_exec_ext in '' $ac_executable_extensions; do
36667  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36668    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36669    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36670    break 2
36671  fi
36672done
36673  done
36674IFS=$as_save_IFS
36675
36676  ;;
36677esac
36678fi
36679AS=$ac_cv_path_AS
36680if test -n "$AS"; then
36681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36682$as_echo "$AS" >&6; }
36683else
36684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36685$as_echo "no" >&6; }
36686fi
36687
36688
36689  test -n "$AS" && break
36690done
36691
36692    else
36693      # If it succeeded, then it was overridden by the user. We will use it
36694      # for the tool.
36695
36696      # First remove it from the list of overridden variables, so we can test
36697      # for unknown variables in the end.
36698      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36699
36700      # Check if we try to supply an empty value
36701      if test "x$AS" = x; then
36702        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
36703$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
36704        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36705$as_echo_n "checking for AS... " >&6; }
36706        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36707$as_echo "disabled" >&6; }
36708      else
36709        # Check if the provided tool contains a complete path.
36710        tool_specified="$AS"
36711        tool_basename="${tool_specified##*/}"
36712        if test "x$tool_basename" = "x$tool_specified"; then
36713          # A command without a complete path is provided, search $PATH.
36714          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
36715$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
36716          # Extract the first word of "$tool_basename", so it can be a program name with args.
36717set dummy $tool_basename; ac_word=$2
36718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36719$as_echo_n "checking for $ac_word... " >&6; }
36720if ${ac_cv_path_AS+:} false; then :
36721  $as_echo_n "(cached) " >&6
36722else
36723  case $AS in
36724  [\\/]* | ?:[\\/]*)
36725  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36726  ;;
36727  *)
36728  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36729for as_dir in $PATH
36730do
36731  IFS=$as_save_IFS
36732  test -z "$as_dir" && as_dir=.
36733    for ac_exec_ext in '' $ac_executable_extensions; do
36734  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36735    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36736    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36737    break 2
36738  fi
36739done
36740  done
36741IFS=$as_save_IFS
36742
36743  ;;
36744esac
36745fi
36746AS=$ac_cv_path_AS
36747if test -n "$AS"; then
36748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36749$as_echo "$AS" >&6; }
36750else
36751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36752$as_echo "no" >&6; }
36753fi
36754
36755
36756          if test "x$AS" = x; then
36757            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36758          fi
36759        else
36760          # Otherwise we believe it is a complete path. Use it as it is.
36761          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
36762$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
36763          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36764$as_echo_n "checking for AS... " >&6; }
36765          if test ! -x "$tool_specified"; then
36766            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36767$as_echo "not found" >&6; }
36768            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
36769          fi
36770          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36771$as_echo "$tool_specified" >&6; }
36772        fi
36773      fi
36774    fi
36775
36776  fi
36777
36778
36779
36780  # Only process if variable expands to non-empty
36781
36782  if test "x$AS" != x; then
36783    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36784
36785  # First separate the path from the arguments. This will split at the first
36786  # space.
36787  complete="$AS"
36788  path="${complete%% *}"
36789  tmp="$complete EOL"
36790  arguments="${tmp#* }"
36791
36792  # Input might be given as Windows format, start by converting to
36793  # unix format.
36794  new_path=`$CYGPATH -u "$path"`
36795
36796  # Now try to locate executable using which
36797  new_path=`$WHICH "$new_path" 2> /dev/null`
36798  # bat and cmd files are not always considered executable in cygwin causing which
36799  # to not find them
36800  if test "x$new_path" = x \
36801      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36802      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36803    new_path=`$CYGPATH -u "$path"`
36804  fi
36805  if test "x$new_path" = x; then
36806    # Oops. Which didn't find the executable.
36807    # The splitting of arguments from the executable at a space might have been incorrect,
36808    # since paths with space are more likely in Windows. Give it another try with the whole
36809    # argument.
36810    path="$complete"
36811    arguments="EOL"
36812    new_path=`$CYGPATH -u "$path"`
36813    new_path=`$WHICH "$new_path" 2> /dev/null`
36814    # bat and cmd files are not always considered executable in cygwin causing which
36815    # to not find them
36816    if test "x$new_path" = x \
36817        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36818        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36819      new_path=`$CYGPATH -u "$path"`
36820    fi
36821    if test "x$new_path" = x; then
36822      # It's still not found. Now this is an unrecoverable error.
36823      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36824$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36825      has_space=`$ECHO "$complete" | $GREP " "`
36826      if test "x$has_space" != x; then
36827        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36828$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36829      fi
36830      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36831    fi
36832  fi
36833
36834  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36835  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36836  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36837  # "foo.exe" is OK but "foo" is an error.
36838  #
36839  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36840  # It is also a way to make sure we got the proper file name for the real test later on.
36841  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36842  if test "x$test_shortpath" = x; then
36843    # Short path failed, file does not exist as specified.
36844    # Try adding .exe or .cmd
36845    if test -f "${new_path}.exe"; then
36846      input_to_shortpath="${new_path}.exe"
36847    elif test -f "${new_path}.cmd"; then
36848      input_to_shortpath="${new_path}.cmd"
36849    else
36850      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
36851$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
36852      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36853$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36854      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36855    fi
36856  else
36857    input_to_shortpath="$new_path"
36858  fi
36859
36860  # Call helper function which possibly converts this using DOS-style short mode.
36861  # If so, the updated path is stored in $new_path.
36862  new_path="$input_to_shortpath"
36863
36864  input_path="$input_to_shortpath"
36865  # Check if we need to convert this using DOS-style short mode. If the path
36866  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36867  # take no chances and rewrite it.
36868  # Note: m4 eats our [], so we need to use [ and ] instead.
36869  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36870  if test "x$has_forbidden_chars" != x; then
36871    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36872    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36873    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36874    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36875      # Going to short mode and back again did indeed matter. Since short mode is
36876      # case insensitive, let's make it lowercase to improve readability.
36877      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36878      # Now convert it back to Unix-style (cygpath)
36879      input_path=`$CYGPATH -u "$shortmode_path"`
36880      new_path="$input_path"
36881    fi
36882  fi
36883
36884  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36885  if test "x$test_cygdrive_prefix" = x; then
36886    # As a simple fix, exclude /usr/bin since it's not a real path.
36887    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36888      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36889      # a path prefixed by /cygdrive for fixpath to work.
36890      new_path="$CYGWIN_ROOT_PATH$input_path"
36891    fi
36892  fi
36893
36894  # remove trailing .exe if any
36895  new_path="${new_path/%.exe/}"
36896
36897    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36898
36899  # First separate the path from the arguments. This will split at the first
36900  # space.
36901  complete="$AS"
36902  path="${complete%% *}"
36903  tmp="$complete EOL"
36904  arguments="${tmp#* }"
36905
36906  # Input might be given as Windows format, start by converting to
36907  # unix format.
36908  new_path="$path"
36909
36910  windows_path="$new_path"
36911  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36912    unix_path=`$CYGPATH -u "$windows_path"`
36913    new_path="$unix_path"
36914  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36915    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36916    new_path="$unix_path"
36917  fi
36918
36919
36920  # Now try to locate executable using which
36921  new_path=`$WHICH "$new_path" 2> /dev/null`
36922
36923  if test "x$new_path" = x; then
36924    # Oops. Which didn't find the executable.
36925    # The splitting of arguments from the executable at a space might have been incorrect,
36926    # since paths with space are more likely in Windows. Give it another try with the whole
36927    # argument.
36928    path="$complete"
36929    arguments="EOL"
36930    new_path="$path"
36931
36932  windows_path="$new_path"
36933  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36934    unix_path=`$CYGPATH -u "$windows_path"`
36935    new_path="$unix_path"
36936  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36937    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36938    new_path="$unix_path"
36939  fi
36940
36941
36942    new_path=`$WHICH "$new_path" 2> /dev/null`
36943    # bat and cmd files are not always considered executable in MSYS causing which
36944    # to not find them
36945    if test "x$new_path" = x \
36946        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36947        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36948      new_path="$path"
36949
36950  windows_path="$new_path"
36951  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36952    unix_path=`$CYGPATH -u "$windows_path"`
36953    new_path="$unix_path"
36954  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36955    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36956    new_path="$unix_path"
36957  fi
36958
36959    fi
36960
36961    if test "x$new_path" = x; then
36962      # It's still not found. Now this is an unrecoverable error.
36963      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36964$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36965      has_space=`$ECHO "$complete" | $GREP " "`
36966      if test "x$has_space" != x; then
36967        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36968$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36969      fi
36970      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36971    fi
36972  fi
36973
36974  # Now new_path has a complete unix path to the binary
36975  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36976    # Keep paths in /bin as-is, but remove trailing .exe if any
36977    new_path="${new_path/%.exe/}"
36978    # Do not save /bin paths to all_fixpath_prefixes!
36979  else
36980    # Not in mixed or Windows style, start by that.
36981    new_path=`cmd //c echo $new_path`
36982
36983  input_path="$new_path"
36984  # Check if we need to convert this using DOS-style short mode. If the path
36985  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36986  # take no chances and rewrite it.
36987  # Note: m4 eats our [], so we need to use [ and ] instead.
36988  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36989  if test "x$has_forbidden_chars" != x; then
36990    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36991    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36992  fi
36993
36994    # Output is in $new_path
36995
36996  windows_path="$new_path"
36997  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36998    unix_path=`$CYGPATH -u "$windows_path"`
36999    new_path="$unix_path"
37000  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37001    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37002    new_path="$unix_path"
37003  fi
37004
37005    # remove trailing .exe if any
37006    new_path="${new_path/%.exe/}"
37007
37008    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37009    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37010  fi
37011
37012    else
37013      # We're on a unix platform. Hooray! :)
37014      # First separate the path from the arguments. This will split at the first
37015      # space.
37016      complete="$AS"
37017      path="${complete%% *}"
37018      tmp="$complete EOL"
37019      arguments="${tmp#* }"
37020
37021      # Cannot rely on the command "which" here since it doesn't always work.
37022      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37023      if test -z "$is_absolute_path"; then
37024        # Path to executable is not absolute. Find it.
37025        IFS_save="$IFS"
37026        IFS=:
37027        for p in $PATH; do
37028          if test -f "$p/$path" && test -x "$p/$path"; then
37029            new_path="$p/$path"
37030            break
37031          fi
37032        done
37033        IFS="$IFS_save"
37034      else
37035        # This is an absolute path, we can use it without further modifications.
37036        new_path="$path"
37037      fi
37038
37039      if test "x$new_path" = x; then
37040        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37041$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37042        has_space=`$ECHO "$complete" | $GREP " "`
37043        if test "x$has_space" != x; then
37044          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37045$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37046        fi
37047        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37048      fi
37049    fi
37050
37051    # Now join together the path and the arguments once again
37052    if test "x$arguments" != xEOL; then
37053      new_complete="$new_path ${arguments% *}"
37054    else
37055      new_complete="$new_path"
37056    fi
37057
37058    if test "x$complete" != "x$new_complete"; then
37059      AS="$new_complete"
37060      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
37061$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
37062    fi
37063  fi
37064
37065    if test "x$AS" = x; then
37066      as_fn_error $? "Solaris assembler (as) is required. Please install via \"pkg install pkg:/developer/assembler\"." "$LINENO" 5
37067    fi
37068  else
37069    # FIXME: is this correct for microsoft?
37070    AS="$CC -c"
37071  fi
37072
37073
37074  #
37075  # Setup the archiver (AR)
37076  #
37077  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37078    # The corresponding ar tool is lib.exe (used to create static libraries)
37079    # Extract the first word of "lib", so it can be a program name with args.
37080set dummy lib; ac_word=$2
37081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37082$as_echo_n "checking for $ac_word... " >&6; }
37083if ${ac_cv_prog_AR+:} false; then :
37084  $as_echo_n "(cached) " >&6
37085else
37086  if test -n "$AR"; then
37087  ac_cv_prog_AR="$AR" # Let the user override the test.
37088else
37089as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37090for as_dir in $PATH
37091do
37092  IFS=$as_save_IFS
37093  test -z "$as_dir" && as_dir=.
37094    for ac_exec_ext in '' $ac_executable_extensions; do
37095  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37096    ac_cv_prog_AR="lib"
37097    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37098    break 2
37099  fi
37100done
37101  done
37102IFS=$as_save_IFS
37103
37104fi
37105fi
37106AR=$ac_cv_prog_AR
37107if test -n "$AR"; then
37108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37109$as_echo "$AR" >&6; }
37110else
37111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37112$as_echo "no" >&6; }
37113fi
37114
37115
37116  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
37117
37118
37119  # Publish this variable in the help.
37120
37121
37122  if [ -z "${AR+x}" ]; then
37123    # The variable is not set by user, try to locate tool using the code snippet
37124    if test -n "$ac_tool_prefix"; then
37125  for ac_prog in ar gcc-ar
37126  do
37127    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37128set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37130$as_echo_n "checking for $ac_word... " >&6; }
37131if ${ac_cv_prog_AR+:} false; then :
37132  $as_echo_n "(cached) " >&6
37133else
37134  if test -n "$AR"; then
37135  ac_cv_prog_AR="$AR" # Let the user override the test.
37136else
37137as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37138for as_dir in $PATH
37139do
37140  IFS=$as_save_IFS
37141  test -z "$as_dir" && as_dir=.
37142    for ac_exec_ext in '' $ac_executable_extensions; do
37143  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37144    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37145    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37146    break 2
37147  fi
37148done
37149  done
37150IFS=$as_save_IFS
37151
37152fi
37153fi
37154AR=$ac_cv_prog_AR
37155if test -n "$AR"; then
37156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37157$as_echo "$AR" >&6; }
37158else
37159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37160$as_echo "no" >&6; }
37161fi
37162
37163
37164    test -n "$AR" && break
37165  done
37166fi
37167if test -z "$AR"; then
37168  ac_ct_AR=$AR
37169  for ac_prog in ar gcc-ar
37170do
37171  # Extract the first word of "$ac_prog", so it can be a program name with args.
37172set dummy $ac_prog; ac_word=$2
37173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37174$as_echo_n "checking for $ac_word... " >&6; }
37175if ${ac_cv_prog_ac_ct_AR+:} false; then :
37176  $as_echo_n "(cached) " >&6
37177else
37178  if test -n "$ac_ct_AR"; then
37179  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37180else
37181as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37182for as_dir in $PATH
37183do
37184  IFS=$as_save_IFS
37185  test -z "$as_dir" && as_dir=.
37186    for ac_exec_ext in '' $ac_executable_extensions; do
37187  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37188    ac_cv_prog_ac_ct_AR="$ac_prog"
37189    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37190    break 2
37191  fi
37192done
37193  done
37194IFS=$as_save_IFS
37195
37196fi
37197fi
37198ac_ct_AR=$ac_cv_prog_ac_ct_AR
37199if test -n "$ac_ct_AR"; then
37200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37201$as_echo "$ac_ct_AR" >&6; }
37202else
37203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37204$as_echo "no" >&6; }
37205fi
37206
37207
37208  test -n "$ac_ct_AR" && break
37209done
37210
37211  if test "x$ac_ct_AR" = x; then
37212    AR=""
37213  else
37214    case $cross_compiling:$ac_tool_warned in
37215yes:)
37216{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37217$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37218ac_tool_warned=yes ;;
37219esac
37220    AR=$ac_ct_AR
37221  fi
37222fi
37223
37224  else
37225    # The variable is set, but is it from the command line or the environment?
37226
37227    # Try to remove the string !AR! from our list.
37228    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37229    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37230      # If it failed, the variable was not from the command line. Ignore it,
37231      # but warn the user (except for BASH, which is always set by the calling BASH).
37232      if test "xAR" != xBASH; then
37233        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37234$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37235      fi
37236      # Try to locate tool using the code snippet
37237      if test -n "$ac_tool_prefix"; then
37238  for ac_prog in ar gcc-ar
37239  do
37240    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37241set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37243$as_echo_n "checking for $ac_word... " >&6; }
37244if ${ac_cv_prog_AR+:} false; then :
37245  $as_echo_n "(cached) " >&6
37246else
37247  if test -n "$AR"; then
37248  ac_cv_prog_AR="$AR" # Let the user override the test.
37249else
37250as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37251for as_dir in $PATH
37252do
37253  IFS=$as_save_IFS
37254  test -z "$as_dir" && as_dir=.
37255    for ac_exec_ext in '' $ac_executable_extensions; do
37256  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37257    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37258    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37259    break 2
37260  fi
37261done
37262  done
37263IFS=$as_save_IFS
37264
37265fi
37266fi
37267AR=$ac_cv_prog_AR
37268if test -n "$AR"; then
37269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37270$as_echo "$AR" >&6; }
37271else
37272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37273$as_echo "no" >&6; }
37274fi
37275
37276
37277    test -n "$AR" && break
37278  done
37279fi
37280if test -z "$AR"; then
37281  ac_ct_AR=$AR
37282  for ac_prog in ar gcc-ar
37283do
37284  # Extract the first word of "$ac_prog", so it can be a program name with args.
37285set dummy $ac_prog; ac_word=$2
37286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37287$as_echo_n "checking for $ac_word... " >&6; }
37288if ${ac_cv_prog_ac_ct_AR+:} false; then :
37289  $as_echo_n "(cached) " >&6
37290else
37291  if test -n "$ac_ct_AR"; then
37292  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37293else
37294as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37295for as_dir in $PATH
37296do
37297  IFS=$as_save_IFS
37298  test -z "$as_dir" && as_dir=.
37299    for ac_exec_ext in '' $ac_executable_extensions; do
37300  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37301    ac_cv_prog_ac_ct_AR="$ac_prog"
37302    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37303    break 2
37304  fi
37305done
37306  done
37307IFS=$as_save_IFS
37308
37309fi
37310fi
37311ac_ct_AR=$ac_cv_prog_ac_ct_AR
37312if test -n "$ac_ct_AR"; then
37313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37314$as_echo "$ac_ct_AR" >&6; }
37315else
37316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37317$as_echo "no" >&6; }
37318fi
37319
37320
37321  test -n "$ac_ct_AR" && break
37322done
37323
37324  if test "x$ac_ct_AR" = x; then
37325    AR=""
37326  else
37327    case $cross_compiling:$ac_tool_warned in
37328yes:)
37329{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37330$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37331ac_tool_warned=yes ;;
37332esac
37333    AR=$ac_ct_AR
37334  fi
37335fi
37336
37337    else
37338      # If it succeeded, then it was overridden by the user. We will use it
37339      # for the tool.
37340
37341      # First remove it from the list of overridden variables, so we can test
37342      # for unknown variables in the end.
37343      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37344
37345      # Check if we try to supply an empty value
37346      if test "x$AR" = x; then
37347        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37348$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37349        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37350$as_echo_n "checking for AR... " >&6; }
37351        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37352$as_echo "disabled" >&6; }
37353      else
37354        # Check if the provided tool contains a complete path.
37355        tool_specified="$AR"
37356        tool_basename="${tool_specified##*/}"
37357        if test "x$tool_basename" = "x$tool_specified"; then
37358          # A command without a complete path is provided, search $PATH.
37359          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37360$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37361          # Extract the first word of "$tool_basename", so it can be a program name with args.
37362set dummy $tool_basename; ac_word=$2
37363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37364$as_echo_n "checking for $ac_word... " >&6; }
37365if ${ac_cv_path_AR+:} false; then :
37366  $as_echo_n "(cached) " >&6
37367else
37368  case $AR in
37369  [\\/]* | ?:[\\/]*)
37370  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37371  ;;
37372  *)
37373  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37374for as_dir in $PATH
37375do
37376  IFS=$as_save_IFS
37377  test -z "$as_dir" && as_dir=.
37378    for ac_exec_ext in '' $ac_executable_extensions; do
37379  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37380    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37381    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37382    break 2
37383  fi
37384done
37385  done
37386IFS=$as_save_IFS
37387
37388  ;;
37389esac
37390fi
37391AR=$ac_cv_path_AR
37392if test -n "$AR"; then
37393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37394$as_echo "$AR" >&6; }
37395else
37396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37397$as_echo "no" >&6; }
37398fi
37399
37400
37401          if test "x$AR" = x; then
37402            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37403          fi
37404        else
37405          # Otherwise we believe it is a complete path. Use it as it is.
37406          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37407$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37408          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37409$as_echo_n "checking for AR... " >&6; }
37410          if test ! -x "$tool_specified"; then
37411            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37412$as_echo "not found" >&6; }
37413            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37414          fi
37415          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37416$as_echo "$tool_specified" >&6; }
37417        fi
37418      fi
37419    fi
37420
37421  fi
37422
37423
37424  else
37425
37426
37427  # Publish this variable in the help.
37428
37429
37430  if [ -z "${AR+x}" ]; then
37431    # The variable is not set by user, try to locate tool using the code snippet
37432    if test -n "$ac_tool_prefix"; then
37433  for ac_prog in ar
37434  do
37435    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37436set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37438$as_echo_n "checking for $ac_word... " >&6; }
37439if ${ac_cv_prog_AR+:} false; then :
37440  $as_echo_n "(cached) " >&6
37441else
37442  if test -n "$AR"; then
37443  ac_cv_prog_AR="$AR" # Let the user override the test.
37444else
37445as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37446for as_dir in $PATH
37447do
37448  IFS=$as_save_IFS
37449  test -z "$as_dir" && as_dir=.
37450    for ac_exec_ext in '' $ac_executable_extensions; do
37451  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37452    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37453    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37454    break 2
37455  fi
37456done
37457  done
37458IFS=$as_save_IFS
37459
37460fi
37461fi
37462AR=$ac_cv_prog_AR
37463if test -n "$AR"; then
37464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37465$as_echo "$AR" >&6; }
37466else
37467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37468$as_echo "no" >&6; }
37469fi
37470
37471
37472    test -n "$AR" && break
37473  done
37474fi
37475if test -z "$AR"; then
37476  ac_ct_AR=$AR
37477  for ac_prog in ar
37478do
37479  # Extract the first word of "$ac_prog", so it can be a program name with args.
37480set dummy $ac_prog; ac_word=$2
37481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37482$as_echo_n "checking for $ac_word... " >&6; }
37483if ${ac_cv_prog_ac_ct_AR+:} false; then :
37484  $as_echo_n "(cached) " >&6
37485else
37486  if test -n "$ac_ct_AR"; then
37487  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37488else
37489as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37490for as_dir in $PATH
37491do
37492  IFS=$as_save_IFS
37493  test -z "$as_dir" && as_dir=.
37494    for ac_exec_ext in '' $ac_executable_extensions; do
37495  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37496    ac_cv_prog_ac_ct_AR="$ac_prog"
37497    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37498    break 2
37499  fi
37500done
37501  done
37502IFS=$as_save_IFS
37503
37504fi
37505fi
37506ac_ct_AR=$ac_cv_prog_ac_ct_AR
37507if test -n "$ac_ct_AR"; then
37508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37509$as_echo "$ac_ct_AR" >&6; }
37510else
37511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37512$as_echo "no" >&6; }
37513fi
37514
37515
37516  test -n "$ac_ct_AR" && break
37517done
37518
37519  if test "x$ac_ct_AR" = x; then
37520    AR=""
37521  else
37522    case $cross_compiling:$ac_tool_warned in
37523yes:)
37524{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37525$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37526ac_tool_warned=yes ;;
37527esac
37528    AR=$ac_ct_AR
37529  fi
37530fi
37531
37532  else
37533    # The variable is set, but is it from the command line or the environment?
37534
37535    # Try to remove the string !AR! from our list.
37536    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37537    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37538      # If it failed, the variable was not from the command line. Ignore it,
37539      # but warn the user (except for BASH, which is always set by the calling BASH).
37540      if test "xAR" != xBASH; then
37541        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37542$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37543      fi
37544      # Try to locate tool using the code snippet
37545      if test -n "$ac_tool_prefix"; then
37546  for ac_prog in ar
37547  do
37548    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37549set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37551$as_echo_n "checking for $ac_word... " >&6; }
37552if ${ac_cv_prog_AR+:} false; then :
37553  $as_echo_n "(cached) " >&6
37554else
37555  if test -n "$AR"; then
37556  ac_cv_prog_AR="$AR" # Let the user override the test.
37557else
37558as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37559for as_dir in $PATH
37560do
37561  IFS=$as_save_IFS
37562  test -z "$as_dir" && as_dir=.
37563    for ac_exec_ext in '' $ac_executable_extensions; do
37564  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37565    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37566    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37567    break 2
37568  fi
37569done
37570  done
37571IFS=$as_save_IFS
37572
37573fi
37574fi
37575AR=$ac_cv_prog_AR
37576if test -n "$AR"; then
37577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37578$as_echo "$AR" >&6; }
37579else
37580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37581$as_echo "no" >&6; }
37582fi
37583
37584
37585    test -n "$AR" && break
37586  done
37587fi
37588if test -z "$AR"; then
37589  ac_ct_AR=$AR
37590  for ac_prog in ar
37591do
37592  # Extract the first word of "$ac_prog", so it can be a program name with args.
37593set dummy $ac_prog; ac_word=$2
37594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37595$as_echo_n "checking for $ac_word... " >&6; }
37596if ${ac_cv_prog_ac_ct_AR+:} false; then :
37597  $as_echo_n "(cached) " >&6
37598else
37599  if test -n "$ac_ct_AR"; then
37600  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37601else
37602as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37603for as_dir in $PATH
37604do
37605  IFS=$as_save_IFS
37606  test -z "$as_dir" && as_dir=.
37607    for ac_exec_ext in '' $ac_executable_extensions; do
37608  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37609    ac_cv_prog_ac_ct_AR="$ac_prog"
37610    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37611    break 2
37612  fi
37613done
37614  done
37615IFS=$as_save_IFS
37616
37617fi
37618fi
37619ac_ct_AR=$ac_cv_prog_ac_ct_AR
37620if test -n "$ac_ct_AR"; then
37621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37622$as_echo "$ac_ct_AR" >&6; }
37623else
37624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37625$as_echo "no" >&6; }
37626fi
37627
37628
37629  test -n "$ac_ct_AR" && break
37630done
37631
37632  if test "x$ac_ct_AR" = x; then
37633    AR=""
37634  else
37635    case $cross_compiling:$ac_tool_warned in
37636yes:)
37637{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37638$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37639ac_tool_warned=yes ;;
37640esac
37641    AR=$ac_ct_AR
37642  fi
37643fi
37644
37645    else
37646      # If it succeeded, then it was overridden by the user. We will use it
37647      # for the tool.
37648
37649      # First remove it from the list of overridden variables, so we can test
37650      # for unknown variables in the end.
37651      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37652
37653      # Check if we try to supply an empty value
37654      if test "x$AR" = x; then
37655        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37656$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37657        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37658$as_echo_n "checking for AR... " >&6; }
37659        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37660$as_echo "disabled" >&6; }
37661      else
37662        # Check if the provided tool contains a complete path.
37663        tool_specified="$AR"
37664        tool_basename="${tool_specified##*/}"
37665        if test "x$tool_basename" = "x$tool_specified"; then
37666          # A command without a complete path is provided, search $PATH.
37667          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37668$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37669          # Extract the first word of "$tool_basename", so it can be a program name with args.
37670set dummy $tool_basename; ac_word=$2
37671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37672$as_echo_n "checking for $ac_word... " >&6; }
37673if ${ac_cv_path_AR+:} false; then :
37674  $as_echo_n "(cached) " >&6
37675else
37676  case $AR in
37677  [\\/]* | ?:[\\/]*)
37678  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37679  ;;
37680  *)
37681  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37682for as_dir in $PATH
37683do
37684  IFS=$as_save_IFS
37685  test -z "$as_dir" && as_dir=.
37686    for ac_exec_ext in '' $ac_executable_extensions; do
37687  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37688    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37689    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37690    break 2
37691  fi
37692done
37693  done
37694IFS=$as_save_IFS
37695
37696  ;;
37697esac
37698fi
37699AR=$ac_cv_path_AR
37700if test -n "$AR"; then
37701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37702$as_echo "$AR" >&6; }
37703else
37704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37705$as_echo "no" >&6; }
37706fi
37707
37708
37709          if test "x$AR" = x; then
37710            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37711          fi
37712        else
37713          # Otherwise we believe it is a complete path. Use it as it is.
37714          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37715$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37716          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37717$as_echo_n "checking for AR... " >&6; }
37718          if test ! -x "$tool_specified"; then
37719            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37720$as_echo "not found" >&6; }
37721            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37722          fi
37723          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37724$as_echo "$tool_specified" >&6; }
37725        fi
37726      fi
37727    fi
37728
37729  fi
37730
37731
37732  fi
37733
37734  # Only process if variable expands to non-empty
37735
37736  if test "x$AR" != x; then
37737    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37738
37739  # First separate the path from the arguments. This will split at the first
37740  # space.
37741  complete="$AR"
37742  path="${complete%% *}"
37743  tmp="$complete EOL"
37744  arguments="${tmp#* }"
37745
37746  # Input might be given as Windows format, start by converting to
37747  # unix format.
37748  new_path=`$CYGPATH -u "$path"`
37749
37750  # Now try to locate executable using which
37751  new_path=`$WHICH "$new_path" 2> /dev/null`
37752  # bat and cmd files are not always considered executable in cygwin causing which
37753  # to not find them
37754  if test "x$new_path" = x \
37755      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37756      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37757    new_path=`$CYGPATH -u "$path"`
37758  fi
37759  if test "x$new_path" = x; then
37760    # Oops. Which didn't find the executable.
37761    # The splitting of arguments from the executable at a space might have been incorrect,
37762    # since paths with space are more likely in Windows. Give it another try with the whole
37763    # argument.
37764    path="$complete"
37765    arguments="EOL"
37766    new_path=`$CYGPATH -u "$path"`
37767    new_path=`$WHICH "$new_path" 2> /dev/null`
37768    # bat and cmd files are not always considered executable in cygwin causing which
37769    # to not find them
37770    if test "x$new_path" = x \
37771        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37772        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37773      new_path=`$CYGPATH -u "$path"`
37774    fi
37775    if test "x$new_path" = x; then
37776      # It's still not found. Now this is an unrecoverable error.
37777      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37778$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37779      has_space=`$ECHO "$complete" | $GREP " "`
37780      if test "x$has_space" != x; then
37781        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37782$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37783      fi
37784      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37785    fi
37786  fi
37787
37788  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37789  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37790  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37791  # "foo.exe" is OK but "foo" is an error.
37792  #
37793  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37794  # It is also a way to make sure we got the proper file name for the real test later on.
37795  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37796  if test "x$test_shortpath" = x; then
37797    # Short path failed, file does not exist as specified.
37798    # Try adding .exe or .cmd
37799    if test -f "${new_path}.exe"; then
37800      input_to_shortpath="${new_path}.exe"
37801    elif test -f "${new_path}.cmd"; then
37802      input_to_shortpath="${new_path}.cmd"
37803    else
37804      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
37805$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
37806      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37807$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37808      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37809    fi
37810  else
37811    input_to_shortpath="$new_path"
37812  fi
37813
37814  # Call helper function which possibly converts this using DOS-style short mode.
37815  # If so, the updated path is stored in $new_path.
37816  new_path="$input_to_shortpath"
37817
37818  input_path="$input_to_shortpath"
37819  # Check if we need to convert this using DOS-style short mode. If the path
37820  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37821  # take no chances and rewrite it.
37822  # Note: m4 eats our [], so we need to use [ and ] instead.
37823  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37824  if test "x$has_forbidden_chars" != x; then
37825    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37826    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37827    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37828    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37829      # Going to short mode and back again did indeed matter. Since short mode is
37830      # case insensitive, let's make it lowercase to improve readability.
37831      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37832      # Now convert it back to Unix-style (cygpath)
37833      input_path=`$CYGPATH -u "$shortmode_path"`
37834      new_path="$input_path"
37835    fi
37836  fi
37837
37838  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37839  if test "x$test_cygdrive_prefix" = x; then
37840    # As a simple fix, exclude /usr/bin since it's not a real path.
37841    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37842      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37843      # a path prefixed by /cygdrive for fixpath to work.
37844      new_path="$CYGWIN_ROOT_PATH$input_path"
37845    fi
37846  fi
37847
37848  # remove trailing .exe if any
37849  new_path="${new_path/%.exe/}"
37850
37851    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37852
37853  # First separate the path from the arguments. This will split at the first
37854  # space.
37855  complete="$AR"
37856  path="${complete%% *}"
37857  tmp="$complete EOL"
37858  arguments="${tmp#* }"
37859
37860  # Input might be given as Windows format, start by converting to
37861  # unix format.
37862  new_path="$path"
37863
37864  windows_path="$new_path"
37865  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37866    unix_path=`$CYGPATH -u "$windows_path"`
37867    new_path="$unix_path"
37868  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37869    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37870    new_path="$unix_path"
37871  fi
37872
37873
37874  # Now try to locate executable using which
37875  new_path=`$WHICH "$new_path" 2> /dev/null`
37876
37877  if test "x$new_path" = x; then
37878    # Oops. Which didn't find the executable.
37879    # The splitting of arguments from the executable at a space might have been incorrect,
37880    # since paths with space are more likely in Windows. Give it another try with the whole
37881    # argument.
37882    path="$complete"
37883    arguments="EOL"
37884    new_path="$path"
37885
37886  windows_path="$new_path"
37887  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37888    unix_path=`$CYGPATH -u "$windows_path"`
37889    new_path="$unix_path"
37890  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37891    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37892    new_path="$unix_path"
37893  fi
37894
37895
37896    new_path=`$WHICH "$new_path" 2> /dev/null`
37897    # bat and cmd files are not always considered executable in MSYS causing which
37898    # to not find them
37899    if test "x$new_path" = x \
37900        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37901        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37902      new_path="$path"
37903
37904  windows_path="$new_path"
37905  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37906    unix_path=`$CYGPATH -u "$windows_path"`
37907    new_path="$unix_path"
37908  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37909    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37910    new_path="$unix_path"
37911  fi
37912
37913    fi
37914
37915    if test "x$new_path" = x; then
37916      # It's still not found. Now this is an unrecoverable error.
37917      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37918$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37919      has_space=`$ECHO "$complete" | $GREP " "`
37920      if test "x$has_space" != x; then
37921        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37922$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37923      fi
37924      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37925    fi
37926  fi
37927
37928  # Now new_path has a complete unix path to the binary
37929  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37930    # Keep paths in /bin as-is, but remove trailing .exe if any
37931    new_path="${new_path/%.exe/}"
37932    # Do not save /bin paths to all_fixpath_prefixes!
37933  else
37934    # Not in mixed or Windows style, start by that.
37935    new_path=`cmd //c echo $new_path`
37936
37937  input_path="$new_path"
37938  # Check if we need to convert this using DOS-style short mode. If the path
37939  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37940  # take no chances and rewrite it.
37941  # Note: m4 eats our [], so we need to use [ and ] instead.
37942  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37943  if test "x$has_forbidden_chars" != x; then
37944    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37945    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37946  fi
37947
37948    # Output is in $new_path
37949
37950  windows_path="$new_path"
37951  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37952    unix_path=`$CYGPATH -u "$windows_path"`
37953    new_path="$unix_path"
37954  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37955    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37956    new_path="$unix_path"
37957  fi
37958
37959    # remove trailing .exe if any
37960    new_path="${new_path/%.exe/}"
37961
37962    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37963    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37964  fi
37965
37966    else
37967      # We're on a unix platform. Hooray! :)
37968      # First separate the path from the arguments. This will split at the first
37969      # space.
37970      complete="$AR"
37971      path="${complete%% *}"
37972      tmp="$complete EOL"
37973      arguments="${tmp#* }"
37974
37975      # Cannot rely on the command "which" here since it doesn't always work.
37976      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37977      if test -z "$is_absolute_path"; then
37978        # Path to executable is not absolute. Find it.
37979        IFS_save="$IFS"
37980        IFS=:
37981        for p in $PATH; do
37982          if test -f "$p/$path" && test -x "$p/$path"; then
37983            new_path="$p/$path"
37984            break
37985          fi
37986        done
37987        IFS="$IFS_save"
37988      else
37989        # This is an absolute path, we can use it without further modifications.
37990        new_path="$path"
37991      fi
37992
37993      if test "x$new_path" = x; then
37994        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37995$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37996        has_space=`$ECHO "$complete" | $GREP " "`
37997        if test "x$has_space" != x; then
37998          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37999$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38000        fi
38001        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38002      fi
38003    fi
38004
38005    # Now join together the path and the arguments once again
38006    if test "x$arguments" != xEOL; then
38007      new_complete="$new_path ${arguments% *}"
38008    else
38009      new_complete="$new_path"
38010    fi
38011
38012    if test "x$complete" != "x$new_complete"; then
38013      AR="$new_complete"
38014      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
38015$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
38016    fi
38017  fi
38018
38019
38020
38021  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
38022
38023
38024  # Publish this variable in the help.
38025
38026
38027  if [ -z "${LIPO+x}" ]; then
38028    # The variable is not set by user, try to locate tool using the code snippet
38029    for ac_prog in lipo
38030do
38031  # Extract the first word of "$ac_prog", so it can be a program name with args.
38032set dummy $ac_prog; ac_word=$2
38033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38034$as_echo_n "checking for $ac_word... " >&6; }
38035if ${ac_cv_path_LIPO+:} false; then :
38036  $as_echo_n "(cached) " >&6
38037else
38038  case $LIPO in
38039  [\\/]* | ?:[\\/]*)
38040  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38041  ;;
38042  *)
38043  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38044for as_dir in $PATH
38045do
38046  IFS=$as_save_IFS
38047  test -z "$as_dir" && as_dir=.
38048    for ac_exec_ext in '' $ac_executable_extensions; do
38049  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38050    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38051    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38052    break 2
38053  fi
38054done
38055  done
38056IFS=$as_save_IFS
38057
38058  ;;
38059esac
38060fi
38061LIPO=$ac_cv_path_LIPO
38062if test -n "$LIPO"; then
38063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38064$as_echo "$LIPO" >&6; }
38065else
38066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38067$as_echo "no" >&6; }
38068fi
38069
38070
38071  test -n "$LIPO" && break
38072done
38073
38074  else
38075    # The variable is set, but is it from the command line or the environment?
38076
38077    # Try to remove the string !LIPO! from our list.
38078    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
38079    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38080      # If it failed, the variable was not from the command line. Ignore it,
38081      # but warn the user (except for BASH, which is always set by the calling BASH).
38082      if test "xLIPO" != xBASH; then
38083        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
38084$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
38085      fi
38086      # Try to locate tool using the code snippet
38087      for ac_prog in lipo
38088do
38089  # Extract the first word of "$ac_prog", so it can be a program name with args.
38090set dummy $ac_prog; ac_word=$2
38091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38092$as_echo_n "checking for $ac_word... " >&6; }
38093if ${ac_cv_path_LIPO+:} false; then :
38094  $as_echo_n "(cached) " >&6
38095else
38096  case $LIPO in
38097  [\\/]* | ?:[\\/]*)
38098  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38099  ;;
38100  *)
38101  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38102for as_dir in $PATH
38103do
38104  IFS=$as_save_IFS
38105  test -z "$as_dir" && as_dir=.
38106    for ac_exec_ext in '' $ac_executable_extensions; do
38107  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38108    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38109    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38110    break 2
38111  fi
38112done
38113  done
38114IFS=$as_save_IFS
38115
38116  ;;
38117esac
38118fi
38119LIPO=$ac_cv_path_LIPO
38120if test -n "$LIPO"; then
38121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38122$as_echo "$LIPO" >&6; }
38123else
38124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38125$as_echo "no" >&6; }
38126fi
38127
38128
38129  test -n "$LIPO" && break
38130done
38131
38132    else
38133      # If it succeeded, then it was overridden by the user. We will use it
38134      # for the tool.
38135
38136      # First remove it from the list of overridden variables, so we can test
38137      # for unknown variables in the end.
38138      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38139
38140      # Check if we try to supply an empty value
38141      if test "x$LIPO" = x; then
38142        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
38143$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
38144        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38145$as_echo_n "checking for LIPO... " >&6; }
38146        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38147$as_echo "disabled" >&6; }
38148      else
38149        # Check if the provided tool contains a complete path.
38150        tool_specified="$LIPO"
38151        tool_basename="${tool_specified##*/}"
38152        if test "x$tool_basename" = "x$tool_specified"; then
38153          # A command without a complete path is provided, search $PATH.
38154          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
38155$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
38156          # Extract the first word of "$tool_basename", so it can be a program name with args.
38157set dummy $tool_basename; ac_word=$2
38158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38159$as_echo_n "checking for $ac_word... " >&6; }
38160if ${ac_cv_path_LIPO+:} false; then :
38161  $as_echo_n "(cached) " >&6
38162else
38163  case $LIPO in
38164  [\\/]* | ?:[\\/]*)
38165  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38166  ;;
38167  *)
38168  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38169for as_dir in $PATH
38170do
38171  IFS=$as_save_IFS
38172  test -z "$as_dir" && as_dir=.
38173    for ac_exec_ext in '' $ac_executable_extensions; do
38174  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38175    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38176    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38177    break 2
38178  fi
38179done
38180  done
38181IFS=$as_save_IFS
38182
38183  ;;
38184esac
38185fi
38186LIPO=$ac_cv_path_LIPO
38187if test -n "$LIPO"; then
38188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38189$as_echo "$LIPO" >&6; }
38190else
38191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38192$as_echo "no" >&6; }
38193fi
38194
38195
38196          if test "x$LIPO" = x; then
38197            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38198          fi
38199        else
38200          # Otherwise we believe it is a complete path. Use it as it is.
38201          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
38202$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
38203          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38204$as_echo_n "checking for LIPO... " >&6; }
38205          if test ! -x "$tool_specified"; then
38206            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38207$as_echo "not found" >&6; }
38208            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
38209          fi
38210          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38211$as_echo "$tool_specified" >&6; }
38212        fi
38213      fi
38214    fi
38215
38216  fi
38217
38218
38219
38220  # Only process if variable expands to non-empty
38221
38222  if test "x$LIPO" != x; then
38223    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38224
38225  # First separate the path from the arguments. This will split at the first
38226  # space.
38227  complete="$LIPO"
38228  path="${complete%% *}"
38229  tmp="$complete EOL"
38230  arguments="${tmp#* }"
38231
38232  # Input might be given as Windows format, start by converting to
38233  # unix format.
38234  new_path=`$CYGPATH -u "$path"`
38235
38236  # Now try to locate executable using which
38237  new_path=`$WHICH "$new_path" 2> /dev/null`
38238  # bat and cmd files are not always considered executable in cygwin causing which
38239  # to not find them
38240  if test "x$new_path" = x \
38241      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38242      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38243    new_path=`$CYGPATH -u "$path"`
38244  fi
38245  if test "x$new_path" = x; then
38246    # Oops. Which didn't find the executable.
38247    # The splitting of arguments from the executable at a space might have been incorrect,
38248    # since paths with space are more likely in Windows. Give it another try with the whole
38249    # argument.
38250    path="$complete"
38251    arguments="EOL"
38252    new_path=`$CYGPATH -u "$path"`
38253    new_path=`$WHICH "$new_path" 2> /dev/null`
38254    # bat and cmd files are not always considered executable in cygwin causing which
38255    # to not find them
38256    if test "x$new_path" = x \
38257        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38258        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38259      new_path=`$CYGPATH -u "$path"`
38260    fi
38261    if test "x$new_path" = x; then
38262      # It's still not found. Now this is an unrecoverable error.
38263      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38264$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38265      has_space=`$ECHO "$complete" | $GREP " "`
38266      if test "x$has_space" != x; then
38267        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38268$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38269      fi
38270      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38271    fi
38272  fi
38273
38274  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38275  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38276  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38277  # "foo.exe" is OK but "foo" is an error.
38278  #
38279  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38280  # It is also a way to make sure we got the proper file name for the real test later on.
38281  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38282  if test "x$test_shortpath" = x; then
38283    # Short path failed, file does not exist as specified.
38284    # Try adding .exe or .cmd
38285    if test -f "${new_path}.exe"; then
38286      input_to_shortpath="${new_path}.exe"
38287    elif test -f "${new_path}.cmd"; then
38288      input_to_shortpath="${new_path}.cmd"
38289    else
38290      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
38291$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
38292      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38293$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38294      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38295    fi
38296  else
38297    input_to_shortpath="$new_path"
38298  fi
38299
38300  # Call helper function which possibly converts this using DOS-style short mode.
38301  # If so, the updated path is stored in $new_path.
38302  new_path="$input_to_shortpath"
38303
38304  input_path="$input_to_shortpath"
38305  # Check if we need to convert this using DOS-style short mode. If the path
38306  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38307  # take no chances and rewrite it.
38308  # Note: m4 eats our [], so we need to use [ and ] instead.
38309  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38310  if test "x$has_forbidden_chars" != x; then
38311    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38312    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38313    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38314    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38315      # Going to short mode and back again did indeed matter. Since short mode is
38316      # case insensitive, let's make it lowercase to improve readability.
38317      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38318      # Now convert it back to Unix-style (cygpath)
38319      input_path=`$CYGPATH -u "$shortmode_path"`
38320      new_path="$input_path"
38321    fi
38322  fi
38323
38324  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38325  if test "x$test_cygdrive_prefix" = x; then
38326    # As a simple fix, exclude /usr/bin since it's not a real path.
38327    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38328      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38329      # a path prefixed by /cygdrive for fixpath to work.
38330      new_path="$CYGWIN_ROOT_PATH$input_path"
38331    fi
38332  fi
38333
38334  # remove trailing .exe if any
38335  new_path="${new_path/%.exe/}"
38336
38337    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38338
38339  # First separate the path from the arguments. This will split at the first
38340  # space.
38341  complete="$LIPO"
38342  path="${complete%% *}"
38343  tmp="$complete EOL"
38344  arguments="${tmp#* }"
38345
38346  # Input might be given as Windows format, start by converting to
38347  # unix format.
38348  new_path="$path"
38349
38350  windows_path="$new_path"
38351  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38352    unix_path=`$CYGPATH -u "$windows_path"`
38353    new_path="$unix_path"
38354  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38355    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38356    new_path="$unix_path"
38357  fi
38358
38359
38360  # Now try to locate executable using which
38361  new_path=`$WHICH "$new_path" 2> /dev/null`
38362
38363  if test "x$new_path" = x; then
38364    # Oops. Which didn't find the executable.
38365    # The splitting of arguments from the executable at a space might have been incorrect,
38366    # since paths with space are more likely in Windows. Give it another try with the whole
38367    # argument.
38368    path="$complete"
38369    arguments="EOL"
38370    new_path="$path"
38371
38372  windows_path="$new_path"
38373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38374    unix_path=`$CYGPATH -u "$windows_path"`
38375    new_path="$unix_path"
38376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38377    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38378    new_path="$unix_path"
38379  fi
38380
38381
38382    new_path=`$WHICH "$new_path" 2> /dev/null`
38383    # bat and cmd files are not always considered executable in MSYS causing which
38384    # to not find them
38385    if test "x$new_path" = x \
38386        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38387        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38388      new_path="$path"
38389
38390  windows_path="$new_path"
38391  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38392    unix_path=`$CYGPATH -u "$windows_path"`
38393    new_path="$unix_path"
38394  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38395    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38396    new_path="$unix_path"
38397  fi
38398
38399    fi
38400
38401    if test "x$new_path" = x; then
38402      # It's still not found. Now this is an unrecoverable error.
38403      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38404$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38405      has_space=`$ECHO "$complete" | $GREP " "`
38406      if test "x$has_space" != x; then
38407        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38408$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38409      fi
38410      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38411    fi
38412  fi
38413
38414  # Now new_path has a complete unix path to the binary
38415  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38416    # Keep paths in /bin as-is, but remove trailing .exe if any
38417    new_path="${new_path/%.exe/}"
38418    # Do not save /bin paths to all_fixpath_prefixes!
38419  else
38420    # Not in mixed or Windows style, start by that.
38421    new_path=`cmd //c echo $new_path`
38422
38423  input_path="$new_path"
38424  # Check if we need to convert this using DOS-style short mode. If the path
38425  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38426  # take no chances and rewrite it.
38427  # Note: m4 eats our [], so we need to use [ and ] instead.
38428  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38429  if test "x$has_forbidden_chars" != x; then
38430    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38431    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38432  fi
38433
38434    # Output is in $new_path
38435
38436  windows_path="$new_path"
38437  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38438    unix_path=`$CYGPATH -u "$windows_path"`
38439    new_path="$unix_path"
38440  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38441    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38442    new_path="$unix_path"
38443  fi
38444
38445    # remove trailing .exe if any
38446    new_path="${new_path/%.exe/}"
38447
38448    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38449    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38450  fi
38451
38452    else
38453      # We're on a unix platform. Hooray! :)
38454      # First separate the path from the arguments. This will split at the first
38455      # space.
38456      complete="$LIPO"
38457      path="${complete%% *}"
38458      tmp="$complete EOL"
38459      arguments="${tmp#* }"
38460
38461      # Cannot rely on the command "which" here since it doesn't always work.
38462      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38463      if test -z "$is_absolute_path"; then
38464        # Path to executable is not absolute. Find it.
38465        IFS_save="$IFS"
38466        IFS=:
38467        for p in $PATH; do
38468          if test -f "$p/$path" && test -x "$p/$path"; then
38469            new_path="$p/$path"
38470            break
38471          fi
38472        done
38473        IFS="$IFS_save"
38474      else
38475        # This is an absolute path, we can use it without further modifications.
38476        new_path="$path"
38477      fi
38478
38479      if test "x$new_path" = x; then
38480        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38481$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38482        has_space=`$ECHO "$complete" | $GREP " "`
38483        if test "x$has_space" != x; then
38484          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38485$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38486        fi
38487        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38488      fi
38489    fi
38490
38491    # Now join together the path and the arguments once again
38492    if test "x$arguments" != xEOL; then
38493      new_complete="$new_path ${arguments% *}"
38494    else
38495      new_complete="$new_path"
38496    fi
38497
38498    if test "x$complete" != "x$new_complete"; then
38499      LIPO="$new_complete"
38500      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
38501$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
38502    fi
38503  fi
38504
38505  fi
38506
38507  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
38508    # Extract the first word of "mt", so it can be a program name with args.
38509set dummy mt; ac_word=$2
38510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38511$as_echo_n "checking for $ac_word... " >&6; }
38512if ${ac_cv_prog_MT+:} false; then :
38513  $as_echo_n "(cached) " >&6
38514else
38515  if test -n "$MT"; then
38516  ac_cv_prog_MT="$MT" # Let the user override the test.
38517else
38518  ac_prog_rejected=no
38519as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38520for as_dir in $PATH
38521do
38522  IFS=$as_save_IFS
38523  test -z "$as_dir" && as_dir=.
38524    for ac_exec_ext in '' $ac_executable_extensions; do
38525  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38526    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
38527       ac_prog_rejected=yes
38528       continue
38529     fi
38530    ac_cv_prog_MT="mt"
38531    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38532    break 2
38533  fi
38534done
38535  done
38536IFS=$as_save_IFS
38537
38538if test $ac_prog_rejected = yes; then
38539  # We found a bogon in the path, so make sure we never use it.
38540  set dummy $ac_cv_prog_MT
38541  shift
38542  if test $# != 0; then
38543    # We chose a different compiler from the bogus one.
38544    # However, it has the same basename, so the bogon will be chosen
38545    # first if we set MT to just the basename; use the full file name.
38546    shift
38547    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
38548  fi
38549fi
38550fi
38551fi
38552MT=$ac_cv_prog_MT
38553if test -n "$MT"; then
38554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
38555$as_echo "$MT" >&6; }
38556else
38557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38558$as_echo "no" >&6; }
38559fi
38560
38561
38562
38563  # Only process if variable expands to non-empty
38564
38565  if test "x$MT" != x; then
38566    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38567
38568  # First separate the path from the arguments. This will split at the first
38569  # space.
38570  complete="$MT"
38571  path="${complete%% *}"
38572  tmp="$complete EOL"
38573  arguments="${tmp#* }"
38574
38575  # Input might be given as Windows format, start by converting to
38576  # unix format.
38577  new_path=`$CYGPATH -u "$path"`
38578
38579  # Now try to locate executable using which
38580  new_path=`$WHICH "$new_path" 2> /dev/null`
38581  # bat and cmd files are not always considered executable in cygwin causing which
38582  # to not find them
38583  if test "x$new_path" = x \
38584      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38585      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38586    new_path=`$CYGPATH -u "$path"`
38587  fi
38588  if test "x$new_path" = x; then
38589    # Oops. Which didn't find the executable.
38590    # The splitting of arguments from the executable at a space might have been incorrect,
38591    # since paths with space are more likely in Windows. Give it another try with the whole
38592    # argument.
38593    path="$complete"
38594    arguments="EOL"
38595    new_path=`$CYGPATH -u "$path"`
38596    new_path=`$WHICH "$new_path" 2> /dev/null`
38597    # bat and cmd files are not always considered executable in cygwin causing which
38598    # to not find them
38599    if test "x$new_path" = x \
38600        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38601        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38602      new_path=`$CYGPATH -u "$path"`
38603    fi
38604    if test "x$new_path" = x; then
38605      # It's still not found. Now this is an unrecoverable error.
38606      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38607$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38608      has_space=`$ECHO "$complete" | $GREP " "`
38609      if test "x$has_space" != x; then
38610        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38611$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38612      fi
38613      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38614    fi
38615  fi
38616
38617  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38618  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38619  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38620  # "foo.exe" is OK but "foo" is an error.
38621  #
38622  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38623  # It is also a way to make sure we got the proper file name for the real test later on.
38624  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38625  if test "x$test_shortpath" = x; then
38626    # Short path failed, file does not exist as specified.
38627    # Try adding .exe or .cmd
38628    if test -f "${new_path}.exe"; then
38629      input_to_shortpath="${new_path}.exe"
38630    elif test -f "${new_path}.cmd"; then
38631      input_to_shortpath="${new_path}.cmd"
38632    else
38633      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
38634$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
38635      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38636$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38637      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38638    fi
38639  else
38640    input_to_shortpath="$new_path"
38641  fi
38642
38643  # Call helper function which possibly converts this using DOS-style short mode.
38644  # If so, the updated path is stored in $new_path.
38645  new_path="$input_to_shortpath"
38646
38647  input_path="$input_to_shortpath"
38648  # Check if we need to convert this using DOS-style short mode. If the path
38649  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38650  # take no chances and rewrite it.
38651  # Note: m4 eats our [], so we need to use [ and ] instead.
38652  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38653  if test "x$has_forbidden_chars" != x; then
38654    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38655    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38656    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38657    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38658      # Going to short mode and back again did indeed matter. Since short mode is
38659      # case insensitive, let's make it lowercase to improve readability.
38660      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38661      # Now convert it back to Unix-style (cygpath)
38662      input_path=`$CYGPATH -u "$shortmode_path"`
38663      new_path="$input_path"
38664    fi
38665  fi
38666
38667  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38668  if test "x$test_cygdrive_prefix" = x; then
38669    # As a simple fix, exclude /usr/bin since it's not a real path.
38670    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38671      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38672      # a path prefixed by /cygdrive for fixpath to work.
38673      new_path="$CYGWIN_ROOT_PATH$input_path"
38674    fi
38675  fi
38676
38677  # remove trailing .exe if any
38678  new_path="${new_path/%.exe/}"
38679
38680    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38681
38682  # First separate the path from the arguments. This will split at the first
38683  # space.
38684  complete="$MT"
38685  path="${complete%% *}"
38686  tmp="$complete EOL"
38687  arguments="${tmp#* }"
38688
38689  # Input might be given as Windows format, start by converting to
38690  # unix format.
38691  new_path="$path"
38692
38693  windows_path="$new_path"
38694  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38695    unix_path=`$CYGPATH -u "$windows_path"`
38696    new_path="$unix_path"
38697  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38698    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38699    new_path="$unix_path"
38700  fi
38701
38702
38703  # Now try to locate executable using which
38704  new_path=`$WHICH "$new_path" 2> /dev/null`
38705
38706  if test "x$new_path" = x; then
38707    # Oops. Which didn't find the executable.
38708    # The splitting of arguments from the executable at a space might have been incorrect,
38709    # since paths with space are more likely in Windows. Give it another try with the whole
38710    # argument.
38711    path="$complete"
38712    arguments="EOL"
38713    new_path="$path"
38714
38715  windows_path="$new_path"
38716  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38717    unix_path=`$CYGPATH -u "$windows_path"`
38718    new_path="$unix_path"
38719  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38720    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38721    new_path="$unix_path"
38722  fi
38723
38724
38725    new_path=`$WHICH "$new_path" 2> /dev/null`
38726    # bat and cmd files are not always considered executable in MSYS causing which
38727    # to not find them
38728    if test "x$new_path" = x \
38729        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38730        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38731      new_path="$path"
38732
38733  windows_path="$new_path"
38734  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38735    unix_path=`$CYGPATH -u "$windows_path"`
38736    new_path="$unix_path"
38737  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38738    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38739    new_path="$unix_path"
38740  fi
38741
38742    fi
38743
38744    if test "x$new_path" = x; then
38745      # It's still not found. Now this is an unrecoverable error.
38746      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38747$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38748      has_space=`$ECHO "$complete" | $GREP " "`
38749      if test "x$has_space" != x; then
38750        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38751$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38752      fi
38753      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38754    fi
38755  fi
38756
38757  # Now new_path has a complete unix path to the binary
38758  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38759    # Keep paths in /bin as-is, but remove trailing .exe if any
38760    new_path="${new_path/%.exe/}"
38761    # Do not save /bin paths to all_fixpath_prefixes!
38762  else
38763    # Not in mixed or Windows style, start by that.
38764    new_path=`cmd //c echo $new_path`
38765
38766  input_path="$new_path"
38767  # Check if we need to convert this using DOS-style short mode. If the path
38768  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38769  # take no chances and rewrite it.
38770  # Note: m4 eats our [], so we need to use [ and ] instead.
38771  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38772  if test "x$has_forbidden_chars" != x; then
38773    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38774    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38775  fi
38776
38777    # Output is in $new_path
38778
38779  windows_path="$new_path"
38780  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38781    unix_path=`$CYGPATH -u "$windows_path"`
38782    new_path="$unix_path"
38783  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38784    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38785    new_path="$unix_path"
38786  fi
38787
38788    # remove trailing .exe if any
38789    new_path="${new_path/%.exe/}"
38790
38791    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38792    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38793  fi
38794
38795    else
38796      # We're on a unix platform. Hooray! :)
38797      # First separate the path from the arguments. This will split at the first
38798      # space.
38799      complete="$MT"
38800      path="${complete%% *}"
38801      tmp="$complete EOL"
38802      arguments="${tmp#* }"
38803
38804      # Cannot rely on the command "which" here since it doesn't always work.
38805      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38806      if test -z "$is_absolute_path"; then
38807        # Path to executable is not absolute. Find it.
38808        IFS_save="$IFS"
38809        IFS=:
38810        for p in $PATH; do
38811          if test -f "$p/$path" && test -x "$p/$path"; then
38812            new_path="$p/$path"
38813            break
38814          fi
38815        done
38816        IFS="$IFS_save"
38817      else
38818        # This is an absolute path, we can use it without further modifications.
38819        new_path="$path"
38820      fi
38821
38822      if test "x$new_path" = x; then
38823        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38824$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38825        has_space=`$ECHO "$complete" | $GREP " "`
38826        if test "x$has_space" != x; then
38827          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38828$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38829        fi
38830        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38831      fi
38832    fi
38833
38834    # Now join together the path and the arguments once again
38835    if test "x$arguments" != xEOL; then
38836      new_complete="$new_path ${arguments% *}"
38837    else
38838      new_complete="$new_path"
38839    fi
38840
38841    if test "x$complete" != "x$new_complete"; then
38842      MT="$new_complete"
38843      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
38844$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
38845    fi
38846  fi
38847
38848    # Setup the resource compiler (RC)
38849    # Extract the first word of "rc", so it can be a program name with args.
38850set dummy rc; ac_word=$2
38851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38852$as_echo_n "checking for $ac_word... " >&6; }
38853if ${ac_cv_prog_RC+:} false; then :
38854  $as_echo_n "(cached) " >&6
38855else
38856  if test -n "$RC"; then
38857  ac_cv_prog_RC="$RC" # Let the user override the test.
38858else
38859  ac_prog_rejected=no
38860as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38861for as_dir in $PATH
38862do
38863  IFS=$as_save_IFS
38864  test -z "$as_dir" && as_dir=.
38865    for ac_exec_ext in '' $ac_executable_extensions; do
38866  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38867    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
38868       ac_prog_rejected=yes
38869       continue
38870     fi
38871    ac_cv_prog_RC="rc"
38872    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38873    break 2
38874  fi
38875done
38876  done
38877IFS=$as_save_IFS
38878
38879if test $ac_prog_rejected = yes; then
38880  # We found a bogon in the path, so make sure we never use it.
38881  set dummy $ac_cv_prog_RC
38882  shift
38883  if test $# != 0; then
38884    # We chose a different compiler from the bogus one.
38885    # However, it has the same basename, so the bogon will be chosen
38886    # first if we set RC to just the basename; use the full file name.
38887    shift
38888    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
38889  fi
38890fi
38891fi
38892fi
38893RC=$ac_cv_prog_RC
38894if test -n "$RC"; then
38895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
38896$as_echo "$RC" >&6; }
38897else
38898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38899$as_echo "no" >&6; }
38900fi
38901
38902
38903
38904  # Only process if variable expands to non-empty
38905
38906  if test "x$RC" != x; then
38907    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38908
38909  # First separate the path from the arguments. This will split at the first
38910  # space.
38911  complete="$RC"
38912  path="${complete%% *}"
38913  tmp="$complete EOL"
38914  arguments="${tmp#* }"
38915
38916  # Input might be given as Windows format, start by converting to
38917  # unix format.
38918  new_path=`$CYGPATH -u "$path"`
38919
38920  # Now try to locate executable using which
38921  new_path=`$WHICH "$new_path" 2> /dev/null`
38922  # bat and cmd files are not always considered executable in cygwin causing which
38923  # to not find them
38924  if test "x$new_path" = x \
38925      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38926      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38927    new_path=`$CYGPATH -u "$path"`
38928  fi
38929  if test "x$new_path" = x; then
38930    # Oops. Which didn't find the executable.
38931    # The splitting of arguments from the executable at a space might have been incorrect,
38932    # since paths with space are more likely in Windows. Give it another try with the whole
38933    # argument.
38934    path="$complete"
38935    arguments="EOL"
38936    new_path=`$CYGPATH -u "$path"`
38937    new_path=`$WHICH "$new_path" 2> /dev/null`
38938    # bat and cmd files are not always considered executable in cygwin causing which
38939    # to not find them
38940    if test "x$new_path" = x \
38941        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38942        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38943      new_path=`$CYGPATH -u "$path"`
38944    fi
38945    if test "x$new_path" = x; then
38946      # It's still not found. Now this is an unrecoverable error.
38947      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38948$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38949      has_space=`$ECHO "$complete" | $GREP " "`
38950      if test "x$has_space" != x; then
38951        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38952$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38953      fi
38954      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38955    fi
38956  fi
38957
38958  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38959  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38960  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38961  # "foo.exe" is OK but "foo" is an error.
38962  #
38963  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38964  # It is also a way to make sure we got the proper file name for the real test later on.
38965  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38966  if test "x$test_shortpath" = x; then
38967    # Short path failed, file does not exist as specified.
38968    # Try adding .exe or .cmd
38969    if test -f "${new_path}.exe"; then
38970      input_to_shortpath="${new_path}.exe"
38971    elif test -f "${new_path}.cmd"; then
38972      input_to_shortpath="${new_path}.cmd"
38973    else
38974      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
38975$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
38976      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38977$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38978      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38979    fi
38980  else
38981    input_to_shortpath="$new_path"
38982  fi
38983
38984  # Call helper function which possibly converts this using DOS-style short mode.
38985  # If so, the updated path is stored in $new_path.
38986  new_path="$input_to_shortpath"
38987
38988  input_path="$input_to_shortpath"
38989  # Check if we need to convert this using DOS-style short mode. If the path
38990  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38991  # take no chances and rewrite it.
38992  # Note: m4 eats our [], so we need to use [ and ] instead.
38993  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38994  if test "x$has_forbidden_chars" != x; then
38995    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38996    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38997    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38998    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38999      # Going to short mode and back again did indeed matter. Since short mode is
39000      # case insensitive, let's make it lowercase to improve readability.
39001      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39002      # Now convert it back to Unix-style (cygpath)
39003      input_path=`$CYGPATH -u "$shortmode_path"`
39004      new_path="$input_path"
39005    fi
39006  fi
39007
39008  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39009  if test "x$test_cygdrive_prefix" = x; then
39010    # As a simple fix, exclude /usr/bin since it's not a real path.
39011    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39012      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39013      # a path prefixed by /cygdrive for fixpath to work.
39014      new_path="$CYGWIN_ROOT_PATH$input_path"
39015    fi
39016  fi
39017
39018  # remove trailing .exe if any
39019  new_path="${new_path/%.exe/}"
39020
39021    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39022
39023  # First separate the path from the arguments. This will split at the first
39024  # space.
39025  complete="$RC"
39026  path="${complete%% *}"
39027  tmp="$complete EOL"
39028  arguments="${tmp#* }"
39029
39030  # Input might be given as Windows format, start by converting to
39031  # unix format.
39032  new_path="$path"
39033
39034  windows_path="$new_path"
39035  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39036    unix_path=`$CYGPATH -u "$windows_path"`
39037    new_path="$unix_path"
39038  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39039    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39040    new_path="$unix_path"
39041  fi
39042
39043
39044  # Now try to locate executable using which
39045  new_path=`$WHICH "$new_path" 2> /dev/null`
39046
39047  if test "x$new_path" = x; then
39048    # Oops. Which didn't find the executable.
39049    # The splitting of arguments from the executable at a space might have been incorrect,
39050    # since paths with space are more likely in Windows. Give it another try with the whole
39051    # argument.
39052    path="$complete"
39053    arguments="EOL"
39054    new_path="$path"
39055
39056  windows_path="$new_path"
39057  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39058    unix_path=`$CYGPATH -u "$windows_path"`
39059    new_path="$unix_path"
39060  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39061    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39062    new_path="$unix_path"
39063  fi
39064
39065
39066    new_path=`$WHICH "$new_path" 2> /dev/null`
39067    # bat and cmd files are not always considered executable in MSYS causing which
39068    # to not find them
39069    if test "x$new_path" = x \
39070        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39071        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39072      new_path="$path"
39073
39074  windows_path="$new_path"
39075  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39076    unix_path=`$CYGPATH -u "$windows_path"`
39077    new_path="$unix_path"
39078  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39079    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39080    new_path="$unix_path"
39081  fi
39082
39083    fi
39084
39085    if test "x$new_path" = x; then
39086      # It's still not found. Now this is an unrecoverable error.
39087      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39088$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39089      has_space=`$ECHO "$complete" | $GREP " "`
39090      if test "x$has_space" != x; then
39091        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39092$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39093      fi
39094      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39095    fi
39096  fi
39097
39098  # Now new_path has a complete unix path to the binary
39099  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39100    # Keep paths in /bin as-is, but remove trailing .exe if any
39101    new_path="${new_path/%.exe/}"
39102    # Do not save /bin paths to all_fixpath_prefixes!
39103  else
39104    # Not in mixed or Windows style, start by that.
39105    new_path=`cmd //c echo $new_path`
39106
39107  input_path="$new_path"
39108  # Check if we need to convert this using DOS-style short mode. If the path
39109  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39110  # take no chances and rewrite it.
39111  # Note: m4 eats our [], so we need to use [ and ] instead.
39112  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39113  if test "x$has_forbidden_chars" != x; then
39114    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39115    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39116  fi
39117
39118    # Output is in $new_path
39119
39120  windows_path="$new_path"
39121  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39122    unix_path=`$CYGPATH -u "$windows_path"`
39123    new_path="$unix_path"
39124  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39125    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39126    new_path="$unix_path"
39127  fi
39128
39129    # remove trailing .exe if any
39130    new_path="${new_path/%.exe/}"
39131
39132    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39133    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39134  fi
39135
39136    else
39137      # We're on a unix platform. Hooray! :)
39138      # First separate the path from the arguments. This will split at the first
39139      # space.
39140      complete="$RC"
39141      path="${complete%% *}"
39142      tmp="$complete EOL"
39143      arguments="${tmp#* }"
39144
39145      # Cannot rely on the command "which" here since it doesn't always work.
39146      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39147      if test -z "$is_absolute_path"; then
39148        # Path to executable is not absolute. Find it.
39149        IFS_save="$IFS"
39150        IFS=:
39151        for p in $PATH; do
39152          if test -f "$p/$path" && test -x "$p/$path"; then
39153            new_path="$p/$path"
39154            break
39155          fi
39156        done
39157        IFS="$IFS_save"
39158      else
39159        # This is an absolute path, we can use it without further modifications.
39160        new_path="$path"
39161      fi
39162
39163      if test "x$new_path" = x; then
39164        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39165$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39166        has_space=`$ECHO "$complete" | $GREP " "`
39167        if test "x$has_space" != x; then
39168          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39169$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39170        fi
39171        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39172      fi
39173    fi
39174
39175    # Now join together the path and the arguments once again
39176    if test "x$arguments" != xEOL; then
39177      new_complete="$new_path ${arguments% *}"
39178    else
39179      new_complete="$new_path"
39180    fi
39181
39182    if test "x$complete" != "x$new_complete"; then
39183      RC="$new_complete"
39184      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
39185$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
39186    fi
39187  fi
39188
39189    # Extract the first word of "dumpbin", so it can be a program name with args.
39190set dummy dumpbin; ac_word=$2
39191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39192$as_echo_n "checking for $ac_word... " >&6; }
39193if ${ac_cv_prog_DUMPBIN+:} false; then :
39194  $as_echo_n "(cached) " >&6
39195else
39196  if test -n "$DUMPBIN"; then
39197  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
39198else
39199as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39200for as_dir in $PATH
39201do
39202  IFS=$as_save_IFS
39203  test -z "$as_dir" && as_dir=.
39204    for ac_exec_ext in '' $ac_executable_extensions; do
39205  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39206    ac_cv_prog_DUMPBIN="dumpbin"
39207    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39208    break 2
39209  fi
39210done
39211  done
39212IFS=$as_save_IFS
39213
39214fi
39215fi
39216DUMPBIN=$ac_cv_prog_DUMPBIN
39217if test -n "$DUMPBIN"; then
39218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
39219$as_echo "$DUMPBIN" >&6; }
39220else
39221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39222$as_echo "no" >&6; }
39223fi
39224
39225
39226
39227  # Only process if variable expands to non-empty
39228
39229  if test "x$DUMPBIN" != x; then
39230    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39231
39232  # First separate the path from the arguments. This will split at the first
39233  # space.
39234  complete="$DUMPBIN"
39235  path="${complete%% *}"
39236  tmp="$complete EOL"
39237  arguments="${tmp#* }"
39238
39239  # Input might be given as Windows format, start by converting to
39240  # unix format.
39241  new_path=`$CYGPATH -u "$path"`
39242
39243  # Now try to locate executable using which
39244  new_path=`$WHICH "$new_path" 2> /dev/null`
39245  # bat and cmd files are not always considered executable in cygwin causing which
39246  # to not find them
39247  if test "x$new_path" = x \
39248      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39249      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39250    new_path=`$CYGPATH -u "$path"`
39251  fi
39252  if test "x$new_path" = x; then
39253    # Oops. Which didn't find the executable.
39254    # The splitting of arguments from the executable at a space might have been incorrect,
39255    # since paths with space are more likely in Windows. Give it another try with the whole
39256    # argument.
39257    path="$complete"
39258    arguments="EOL"
39259    new_path=`$CYGPATH -u "$path"`
39260    new_path=`$WHICH "$new_path" 2> /dev/null`
39261    # bat and cmd files are not always considered executable in cygwin causing which
39262    # to not find them
39263    if test "x$new_path" = x \
39264        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39265        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39266      new_path=`$CYGPATH -u "$path"`
39267    fi
39268    if test "x$new_path" = x; then
39269      # It's still not found. Now this is an unrecoverable error.
39270      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39271$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39272      has_space=`$ECHO "$complete" | $GREP " "`
39273      if test "x$has_space" != x; then
39274        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39275$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39276      fi
39277      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39278    fi
39279  fi
39280
39281  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39282  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39283  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39284  # "foo.exe" is OK but "foo" is an error.
39285  #
39286  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39287  # It is also a way to make sure we got the proper file name for the real test later on.
39288  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39289  if test "x$test_shortpath" = x; then
39290    # Short path failed, file does not exist as specified.
39291    # Try adding .exe or .cmd
39292    if test -f "${new_path}.exe"; then
39293      input_to_shortpath="${new_path}.exe"
39294    elif test -f "${new_path}.cmd"; then
39295      input_to_shortpath="${new_path}.cmd"
39296    else
39297      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
39298$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
39299      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39300$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39301      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39302    fi
39303  else
39304    input_to_shortpath="$new_path"
39305  fi
39306
39307  # Call helper function which possibly converts this using DOS-style short mode.
39308  # If so, the updated path is stored in $new_path.
39309  new_path="$input_to_shortpath"
39310
39311  input_path="$input_to_shortpath"
39312  # Check if we need to convert this using DOS-style short mode. If the path
39313  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39314  # take no chances and rewrite it.
39315  # Note: m4 eats our [], so we need to use [ and ] instead.
39316  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39317  if test "x$has_forbidden_chars" != x; then
39318    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39319    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39320    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39321    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39322      # Going to short mode and back again did indeed matter. Since short mode is
39323      # case insensitive, let's make it lowercase to improve readability.
39324      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39325      # Now convert it back to Unix-style (cygpath)
39326      input_path=`$CYGPATH -u "$shortmode_path"`
39327      new_path="$input_path"
39328    fi
39329  fi
39330
39331  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39332  if test "x$test_cygdrive_prefix" = x; then
39333    # As a simple fix, exclude /usr/bin since it's not a real path.
39334    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39335      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39336      # a path prefixed by /cygdrive for fixpath to work.
39337      new_path="$CYGWIN_ROOT_PATH$input_path"
39338    fi
39339  fi
39340
39341  # remove trailing .exe if any
39342  new_path="${new_path/%.exe/}"
39343
39344    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39345
39346  # First separate the path from the arguments. This will split at the first
39347  # space.
39348  complete="$DUMPBIN"
39349  path="${complete%% *}"
39350  tmp="$complete EOL"
39351  arguments="${tmp#* }"
39352
39353  # Input might be given as Windows format, start by converting to
39354  # unix format.
39355  new_path="$path"
39356
39357  windows_path="$new_path"
39358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39359    unix_path=`$CYGPATH -u "$windows_path"`
39360    new_path="$unix_path"
39361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39362    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39363    new_path="$unix_path"
39364  fi
39365
39366
39367  # Now try to locate executable using which
39368  new_path=`$WHICH "$new_path" 2> /dev/null`
39369
39370  if test "x$new_path" = x; then
39371    # Oops. Which didn't find the executable.
39372    # The splitting of arguments from the executable at a space might have been incorrect,
39373    # since paths with space are more likely in Windows. Give it another try with the whole
39374    # argument.
39375    path="$complete"
39376    arguments="EOL"
39377    new_path="$path"
39378
39379  windows_path="$new_path"
39380  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39381    unix_path=`$CYGPATH -u "$windows_path"`
39382    new_path="$unix_path"
39383  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39384    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39385    new_path="$unix_path"
39386  fi
39387
39388
39389    new_path=`$WHICH "$new_path" 2> /dev/null`
39390    # bat and cmd files are not always considered executable in MSYS causing which
39391    # to not find them
39392    if test "x$new_path" = x \
39393        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39394        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39395      new_path="$path"
39396
39397  windows_path="$new_path"
39398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39399    unix_path=`$CYGPATH -u "$windows_path"`
39400    new_path="$unix_path"
39401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39402    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39403    new_path="$unix_path"
39404  fi
39405
39406    fi
39407
39408    if test "x$new_path" = x; then
39409      # It's still not found. Now this is an unrecoverable error.
39410      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39411$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39412      has_space=`$ECHO "$complete" | $GREP " "`
39413      if test "x$has_space" != x; then
39414        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39415$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39416      fi
39417      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39418    fi
39419  fi
39420
39421  # Now new_path has a complete unix path to the binary
39422  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39423    # Keep paths in /bin as-is, but remove trailing .exe if any
39424    new_path="${new_path/%.exe/}"
39425    # Do not save /bin paths to all_fixpath_prefixes!
39426  else
39427    # Not in mixed or Windows style, start by that.
39428    new_path=`cmd //c echo $new_path`
39429
39430  input_path="$new_path"
39431  # Check if we need to convert this using DOS-style short mode. If the path
39432  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39433  # take no chances and rewrite it.
39434  # Note: m4 eats our [], so we need to use [ and ] instead.
39435  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39436  if test "x$has_forbidden_chars" != x; then
39437    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39438    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39439  fi
39440
39441    # Output is in $new_path
39442
39443  windows_path="$new_path"
39444  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39445    unix_path=`$CYGPATH -u "$windows_path"`
39446    new_path="$unix_path"
39447  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39448    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39449    new_path="$unix_path"
39450  fi
39451
39452    # remove trailing .exe if any
39453    new_path="${new_path/%.exe/}"
39454
39455    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39456    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39457  fi
39458
39459    else
39460      # We're on a unix platform. Hooray! :)
39461      # First separate the path from the arguments. This will split at the first
39462      # space.
39463      complete="$DUMPBIN"
39464      path="${complete%% *}"
39465      tmp="$complete EOL"
39466      arguments="${tmp#* }"
39467
39468      # Cannot rely on the command "which" here since it doesn't always work.
39469      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39470      if test -z "$is_absolute_path"; then
39471        # Path to executable is not absolute. Find it.
39472        IFS_save="$IFS"
39473        IFS=:
39474        for p in $PATH; do
39475          if test -f "$p/$path" && test -x "$p/$path"; then
39476            new_path="$p/$path"
39477            break
39478          fi
39479        done
39480        IFS="$IFS_save"
39481      else
39482        # This is an absolute path, we can use it without further modifications.
39483        new_path="$path"
39484      fi
39485
39486      if test "x$new_path" = x; then
39487        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39488$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39489        has_space=`$ECHO "$complete" | $GREP " "`
39490        if test "x$has_space" != x; then
39491          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39492$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39493        fi
39494        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39495      fi
39496    fi
39497
39498    # Now join together the path and the arguments once again
39499    if test "x$arguments" != xEOL; then
39500      new_complete="$new_path ${arguments% *}"
39501    else
39502      new_complete="$new_path"
39503    fi
39504
39505    if test "x$complete" != "x$new_complete"; then
39506      DUMPBIN="$new_complete"
39507      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
39508$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
39509    fi
39510  fi
39511
39512    # We need to check for 'msbuild.exe' because at the place where we expect to
39513    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
39514    # won't find the 'msbuild.exe' executable in that case (and the
39515    # 'ac_executable_extensions' is unusable due to performance reasons).
39516    # Notice that we intentionally don't fix up the path to MSBUILD because we
39517    # will call it in a DOS shell during freetype detection on Windows (see
39518    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
39519    # Extract the first word of "msbuild.exe", so it can be a program name with args.
39520set dummy msbuild.exe; ac_word=$2
39521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39522$as_echo_n "checking for $ac_word... " >&6; }
39523if ${ac_cv_prog_MSBUILD+:} false; then :
39524  $as_echo_n "(cached) " >&6
39525else
39526  if test -n "$MSBUILD"; then
39527  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
39528else
39529as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39530for as_dir in $PATH
39531do
39532  IFS=$as_save_IFS
39533  test -z "$as_dir" && as_dir=.
39534    for ac_exec_ext in '' $ac_executable_extensions; do
39535  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39536    ac_cv_prog_MSBUILD="msbuild.exe"
39537    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39538    break 2
39539  fi
39540done
39541  done
39542IFS=$as_save_IFS
39543
39544fi
39545fi
39546MSBUILD=$ac_cv_prog_MSBUILD
39547if test -n "$MSBUILD"; then
39548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
39549$as_echo "$MSBUILD" >&6; }
39550else
39551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39552$as_echo "no" >&6; }
39553fi
39554
39555
39556  fi
39557
39558  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
39559
39560
39561  # Publish this variable in the help.
39562
39563
39564  if [ -z "${STRIP+x}" ]; then
39565    # The variable is not set by user, try to locate tool using the code snippet
39566    for ac_prog in strip
39567do
39568  # Extract the first word of "$ac_prog", so it can be a program name with args.
39569set dummy $ac_prog; ac_word=$2
39570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39571$as_echo_n "checking for $ac_word... " >&6; }
39572if ${ac_cv_path_STRIP+:} false; then :
39573  $as_echo_n "(cached) " >&6
39574else
39575  case $STRIP in
39576  [\\/]* | ?:[\\/]*)
39577  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39578  ;;
39579  *)
39580  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39581for as_dir in $PATH
39582do
39583  IFS=$as_save_IFS
39584  test -z "$as_dir" && as_dir=.
39585    for ac_exec_ext in '' $ac_executable_extensions; do
39586  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39587    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39588    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39589    break 2
39590  fi
39591done
39592  done
39593IFS=$as_save_IFS
39594
39595  ;;
39596esac
39597fi
39598STRIP=$ac_cv_path_STRIP
39599if test -n "$STRIP"; then
39600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39601$as_echo "$STRIP" >&6; }
39602else
39603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39604$as_echo "no" >&6; }
39605fi
39606
39607
39608  test -n "$STRIP" && break
39609done
39610
39611  else
39612    # The variable is set, but is it from the command line or the environment?
39613
39614    # Try to remove the string !STRIP! from our list.
39615    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
39616    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39617      # If it failed, the variable was not from the command line. Ignore it,
39618      # but warn the user (except for BASH, which is always set by the calling BASH).
39619      if test "xSTRIP" != xBASH; then
39620        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
39621$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
39622      fi
39623      # Try to locate tool using the code snippet
39624      for ac_prog in strip
39625do
39626  # Extract the first word of "$ac_prog", so it can be a program name with args.
39627set dummy $ac_prog; ac_word=$2
39628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39629$as_echo_n "checking for $ac_word... " >&6; }
39630if ${ac_cv_path_STRIP+:} false; then :
39631  $as_echo_n "(cached) " >&6
39632else
39633  case $STRIP in
39634  [\\/]* | ?:[\\/]*)
39635  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39636  ;;
39637  *)
39638  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39639for as_dir in $PATH
39640do
39641  IFS=$as_save_IFS
39642  test -z "$as_dir" && as_dir=.
39643    for ac_exec_ext in '' $ac_executable_extensions; do
39644  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39645    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39646    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39647    break 2
39648  fi
39649done
39650  done
39651IFS=$as_save_IFS
39652
39653  ;;
39654esac
39655fi
39656STRIP=$ac_cv_path_STRIP
39657if test -n "$STRIP"; then
39658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39659$as_echo "$STRIP" >&6; }
39660else
39661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39662$as_echo "no" >&6; }
39663fi
39664
39665
39666  test -n "$STRIP" && break
39667done
39668
39669    else
39670      # If it succeeded, then it was overridden by the user. We will use it
39671      # for the tool.
39672
39673      # First remove it from the list of overridden variables, so we can test
39674      # for unknown variables in the end.
39675      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39676
39677      # Check if we try to supply an empty value
39678      if test "x$STRIP" = x; then
39679        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
39680$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
39681        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39682$as_echo_n "checking for STRIP... " >&6; }
39683        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39684$as_echo "disabled" >&6; }
39685      else
39686        # Check if the provided tool contains a complete path.
39687        tool_specified="$STRIP"
39688        tool_basename="${tool_specified##*/}"
39689        if test "x$tool_basename" = "x$tool_specified"; then
39690          # A command without a complete path is provided, search $PATH.
39691          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39692$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39693          # Extract the first word of "$tool_basename", so it can be a program name with args.
39694set dummy $tool_basename; ac_word=$2
39695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39696$as_echo_n "checking for $ac_word... " >&6; }
39697if ${ac_cv_path_STRIP+:} false; then :
39698  $as_echo_n "(cached) " >&6
39699else
39700  case $STRIP in
39701  [\\/]* | ?:[\\/]*)
39702  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39703  ;;
39704  *)
39705  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39706for as_dir in $PATH
39707do
39708  IFS=$as_save_IFS
39709  test -z "$as_dir" && as_dir=.
39710    for ac_exec_ext in '' $ac_executable_extensions; do
39711  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39712    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39713    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39714    break 2
39715  fi
39716done
39717  done
39718IFS=$as_save_IFS
39719
39720  ;;
39721esac
39722fi
39723STRIP=$ac_cv_path_STRIP
39724if test -n "$STRIP"; then
39725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39726$as_echo "$STRIP" >&6; }
39727else
39728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39729$as_echo "no" >&6; }
39730fi
39731
39732
39733          if test "x$STRIP" = x; then
39734            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39735          fi
39736        else
39737          # Otherwise we believe it is a complete path. Use it as it is.
39738          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39739$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39740          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39741$as_echo_n "checking for STRIP... " >&6; }
39742          if test ! -x "$tool_specified"; then
39743            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39744$as_echo "not found" >&6; }
39745            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39746          fi
39747          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39748$as_echo "$tool_specified" >&6; }
39749        fi
39750      fi
39751    fi
39752
39753  fi
39754
39755
39756
39757  # Only process if variable expands to non-empty
39758
39759  if test "x$STRIP" != x; then
39760    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39761
39762  # First separate the path from the arguments. This will split at the first
39763  # space.
39764  complete="$STRIP"
39765  path="${complete%% *}"
39766  tmp="$complete EOL"
39767  arguments="${tmp#* }"
39768
39769  # Input might be given as Windows format, start by converting to
39770  # unix format.
39771  new_path=`$CYGPATH -u "$path"`
39772
39773  # Now try to locate executable using which
39774  new_path=`$WHICH "$new_path" 2> /dev/null`
39775  # bat and cmd files are not always considered executable in cygwin causing which
39776  # to not find them
39777  if test "x$new_path" = x \
39778      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39779      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39780    new_path=`$CYGPATH -u "$path"`
39781  fi
39782  if test "x$new_path" = x; then
39783    # Oops. Which didn't find the executable.
39784    # The splitting of arguments from the executable at a space might have been incorrect,
39785    # since paths with space are more likely in Windows. Give it another try with the whole
39786    # argument.
39787    path="$complete"
39788    arguments="EOL"
39789    new_path=`$CYGPATH -u "$path"`
39790    new_path=`$WHICH "$new_path" 2> /dev/null`
39791    # bat and cmd files are not always considered executable in cygwin causing which
39792    # to not find them
39793    if test "x$new_path" = x \
39794        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39795        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39796      new_path=`$CYGPATH -u "$path"`
39797    fi
39798    if test "x$new_path" = x; then
39799      # It's still not found. Now this is an unrecoverable error.
39800      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39801$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39802      has_space=`$ECHO "$complete" | $GREP " "`
39803      if test "x$has_space" != x; then
39804        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39805$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39806      fi
39807      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39808    fi
39809  fi
39810
39811  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39812  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39813  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39814  # "foo.exe" is OK but "foo" is an error.
39815  #
39816  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39817  # It is also a way to make sure we got the proper file name for the real test later on.
39818  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39819  if test "x$test_shortpath" = x; then
39820    # Short path failed, file does not exist as specified.
39821    # Try adding .exe or .cmd
39822    if test -f "${new_path}.exe"; then
39823      input_to_shortpath="${new_path}.exe"
39824    elif test -f "${new_path}.cmd"; then
39825      input_to_shortpath="${new_path}.cmd"
39826    else
39827      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39828$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39829      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39830$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39831      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39832    fi
39833  else
39834    input_to_shortpath="$new_path"
39835  fi
39836
39837  # Call helper function which possibly converts this using DOS-style short mode.
39838  # If so, the updated path is stored in $new_path.
39839  new_path="$input_to_shortpath"
39840
39841  input_path="$input_to_shortpath"
39842  # Check if we need to convert this using DOS-style short mode. If the path
39843  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39844  # take no chances and rewrite it.
39845  # Note: m4 eats our [], so we need to use [ and ] instead.
39846  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39847  if test "x$has_forbidden_chars" != x; then
39848    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39849    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39850    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39851    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39852      # Going to short mode and back again did indeed matter. Since short mode is
39853      # case insensitive, let's make it lowercase to improve readability.
39854      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39855      # Now convert it back to Unix-style (cygpath)
39856      input_path=`$CYGPATH -u "$shortmode_path"`
39857      new_path="$input_path"
39858    fi
39859  fi
39860
39861  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39862  if test "x$test_cygdrive_prefix" = x; then
39863    # As a simple fix, exclude /usr/bin since it's not a real path.
39864    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39865      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39866      # a path prefixed by /cygdrive for fixpath to work.
39867      new_path="$CYGWIN_ROOT_PATH$input_path"
39868    fi
39869  fi
39870
39871  # remove trailing .exe if any
39872  new_path="${new_path/%.exe/}"
39873
39874    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39875
39876  # First separate the path from the arguments. This will split at the first
39877  # space.
39878  complete="$STRIP"
39879  path="${complete%% *}"
39880  tmp="$complete EOL"
39881  arguments="${tmp#* }"
39882
39883  # Input might be given as Windows format, start by converting to
39884  # unix format.
39885  new_path="$path"
39886
39887  windows_path="$new_path"
39888  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39889    unix_path=`$CYGPATH -u "$windows_path"`
39890    new_path="$unix_path"
39891  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39892    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39893    new_path="$unix_path"
39894  fi
39895
39896
39897  # Now try to locate executable using which
39898  new_path=`$WHICH "$new_path" 2> /dev/null`
39899
39900  if test "x$new_path" = x; then
39901    # Oops. Which didn't find the executable.
39902    # The splitting of arguments from the executable at a space might have been incorrect,
39903    # since paths with space are more likely in Windows. Give it another try with the whole
39904    # argument.
39905    path="$complete"
39906    arguments="EOL"
39907    new_path="$path"
39908
39909  windows_path="$new_path"
39910  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39911    unix_path=`$CYGPATH -u "$windows_path"`
39912    new_path="$unix_path"
39913  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39914    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39915    new_path="$unix_path"
39916  fi
39917
39918
39919    new_path=`$WHICH "$new_path" 2> /dev/null`
39920    # bat and cmd files are not always considered executable in MSYS causing which
39921    # to not find them
39922    if test "x$new_path" = x \
39923        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39924        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39925      new_path="$path"
39926
39927  windows_path="$new_path"
39928  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39929    unix_path=`$CYGPATH -u "$windows_path"`
39930    new_path="$unix_path"
39931  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39932    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39933    new_path="$unix_path"
39934  fi
39935
39936    fi
39937
39938    if test "x$new_path" = x; then
39939      # It's still not found. Now this is an unrecoverable error.
39940      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39941$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39942      has_space=`$ECHO "$complete" | $GREP " "`
39943      if test "x$has_space" != x; then
39944        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39945$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39946      fi
39947      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39948    fi
39949  fi
39950
39951  # Now new_path has a complete unix path to the binary
39952  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39953    # Keep paths in /bin as-is, but remove trailing .exe if any
39954    new_path="${new_path/%.exe/}"
39955    # Do not save /bin paths to all_fixpath_prefixes!
39956  else
39957    # Not in mixed or Windows style, start by that.
39958    new_path=`cmd //c echo $new_path`
39959
39960  input_path="$new_path"
39961  # Check if we need to convert this using DOS-style short mode. If the path
39962  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39963  # take no chances and rewrite it.
39964  # Note: m4 eats our [], so we need to use [ and ] instead.
39965  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39966  if test "x$has_forbidden_chars" != x; then
39967    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39968    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39969  fi
39970
39971    # Output is in $new_path
39972
39973  windows_path="$new_path"
39974  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39975    unix_path=`$CYGPATH -u "$windows_path"`
39976    new_path="$unix_path"
39977  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39978    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39979    new_path="$unix_path"
39980  fi
39981
39982    # remove trailing .exe if any
39983    new_path="${new_path/%.exe/}"
39984
39985    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39986    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39987  fi
39988
39989    else
39990      # We're on a unix platform. Hooray! :)
39991      # First separate the path from the arguments. This will split at the first
39992      # space.
39993      complete="$STRIP"
39994      path="${complete%% *}"
39995      tmp="$complete EOL"
39996      arguments="${tmp#* }"
39997
39998      # Cannot rely on the command "which" here since it doesn't always work.
39999      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40000      if test -z "$is_absolute_path"; then
40001        # Path to executable is not absolute. Find it.
40002        IFS_save="$IFS"
40003        IFS=:
40004        for p in $PATH; do
40005          if test -f "$p/$path" && test -x "$p/$path"; then
40006            new_path="$p/$path"
40007            break
40008          fi
40009        done
40010        IFS="$IFS_save"
40011      else
40012        # This is an absolute path, we can use it without further modifications.
40013        new_path="$path"
40014      fi
40015
40016      if test "x$new_path" = x; then
40017        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40018$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40019        has_space=`$ECHO "$complete" | $GREP " "`
40020        if test "x$has_space" != x; then
40021          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40022$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40023        fi
40024        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40025      fi
40026    fi
40027
40028    # Now join together the path and the arguments once again
40029    if test "x$arguments" != xEOL; then
40030      new_complete="$new_path ${arguments% *}"
40031    else
40032      new_complete="$new_path"
40033    fi
40034
40035    if test "x$complete" != "x$new_complete"; then
40036      STRIP="$new_complete"
40037      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40038$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40039    fi
40040  fi
40041
40042
40043
40044  # Publish this variable in the help.
40045
40046
40047  if [ -z "${NM+x}" ]; then
40048    # The variable is not set by user, try to locate tool using the code snippet
40049    for ac_prog in nm
40050do
40051  # Extract the first word of "$ac_prog", so it can be a program name with args.
40052set dummy $ac_prog; ac_word=$2
40053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40054$as_echo_n "checking for $ac_word... " >&6; }
40055if ${ac_cv_path_NM+:} false; then :
40056  $as_echo_n "(cached) " >&6
40057else
40058  case $NM in
40059  [\\/]* | ?:[\\/]*)
40060  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40061  ;;
40062  *)
40063  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40064for as_dir in $PATH
40065do
40066  IFS=$as_save_IFS
40067  test -z "$as_dir" && as_dir=.
40068    for ac_exec_ext in '' $ac_executable_extensions; do
40069  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40070    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40071    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40072    break 2
40073  fi
40074done
40075  done
40076IFS=$as_save_IFS
40077
40078  ;;
40079esac
40080fi
40081NM=$ac_cv_path_NM
40082if test -n "$NM"; then
40083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40084$as_echo "$NM" >&6; }
40085else
40086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40087$as_echo "no" >&6; }
40088fi
40089
40090
40091  test -n "$NM" && break
40092done
40093
40094  else
40095    # The variable is set, but is it from the command line or the environment?
40096
40097    # Try to remove the string !NM! from our list.
40098    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40099    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40100      # If it failed, the variable was not from the command line. Ignore it,
40101      # but warn the user (except for BASH, which is always set by the calling BASH).
40102      if test "xNM" != xBASH; then
40103        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40104$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40105      fi
40106      # Try to locate tool using the code snippet
40107      for ac_prog in nm
40108do
40109  # Extract the first word of "$ac_prog", so it can be a program name with args.
40110set dummy $ac_prog; ac_word=$2
40111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40112$as_echo_n "checking for $ac_word... " >&6; }
40113if ${ac_cv_path_NM+:} false; then :
40114  $as_echo_n "(cached) " >&6
40115else
40116  case $NM in
40117  [\\/]* | ?:[\\/]*)
40118  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40119  ;;
40120  *)
40121  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40122for as_dir in $PATH
40123do
40124  IFS=$as_save_IFS
40125  test -z "$as_dir" && as_dir=.
40126    for ac_exec_ext in '' $ac_executable_extensions; do
40127  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40128    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40129    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40130    break 2
40131  fi
40132done
40133  done
40134IFS=$as_save_IFS
40135
40136  ;;
40137esac
40138fi
40139NM=$ac_cv_path_NM
40140if test -n "$NM"; then
40141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40142$as_echo "$NM" >&6; }
40143else
40144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40145$as_echo "no" >&6; }
40146fi
40147
40148
40149  test -n "$NM" && break
40150done
40151
40152    else
40153      # If it succeeded, then it was overridden by the user. We will use it
40154      # for the tool.
40155
40156      # First remove it from the list of overridden variables, so we can test
40157      # for unknown variables in the end.
40158      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40159
40160      # Check if we try to supply an empty value
40161      if test "x$NM" = x; then
40162        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40163$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40164        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40165$as_echo_n "checking for NM... " >&6; }
40166        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40167$as_echo "disabled" >&6; }
40168      else
40169        # Check if the provided tool contains a complete path.
40170        tool_specified="$NM"
40171        tool_basename="${tool_specified##*/}"
40172        if test "x$tool_basename" = "x$tool_specified"; then
40173          # A command without a complete path is provided, search $PATH.
40174          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40175$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40176          # Extract the first word of "$tool_basename", so it can be a program name with args.
40177set dummy $tool_basename; ac_word=$2
40178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40179$as_echo_n "checking for $ac_word... " >&6; }
40180if ${ac_cv_path_NM+:} false; then :
40181  $as_echo_n "(cached) " >&6
40182else
40183  case $NM in
40184  [\\/]* | ?:[\\/]*)
40185  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40186  ;;
40187  *)
40188  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40189for as_dir in $PATH
40190do
40191  IFS=$as_save_IFS
40192  test -z "$as_dir" && as_dir=.
40193    for ac_exec_ext in '' $ac_executable_extensions; do
40194  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40195    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40196    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40197    break 2
40198  fi
40199done
40200  done
40201IFS=$as_save_IFS
40202
40203  ;;
40204esac
40205fi
40206NM=$ac_cv_path_NM
40207if test -n "$NM"; then
40208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40209$as_echo "$NM" >&6; }
40210else
40211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40212$as_echo "no" >&6; }
40213fi
40214
40215
40216          if test "x$NM" = x; then
40217            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40218          fi
40219        else
40220          # Otherwise we believe it is a complete path. Use it as it is.
40221          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40222$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40223          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40224$as_echo_n "checking for NM... " >&6; }
40225          if test ! -x "$tool_specified"; then
40226            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40227$as_echo "not found" >&6; }
40228            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40229          fi
40230          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40231$as_echo "$tool_specified" >&6; }
40232        fi
40233      fi
40234    fi
40235
40236  fi
40237
40238
40239
40240  # Only process if variable expands to non-empty
40241
40242  if test "x$NM" != x; then
40243    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40244
40245  # First separate the path from the arguments. This will split at the first
40246  # space.
40247  complete="$NM"
40248  path="${complete%% *}"
40249  tmp="$complete EOL"
40250  arguments="${tmp#* }"
40251
40252  # Input might be given as Windows format, start by converting to
40253  # unix format.
40254  new_path=`$CYGPATH -u "$path"`
40255
40256  # Now try to locate executable using which
40257  new_path=`$WHICH "$new_path" 2> /dev/null`
40258  # bat and cmd files are not always considered executable in cygwin causing which
40259  # to not find them
40260  if test "x$new_path" = x \
40261      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40262      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40263    new_path=`$CYGPATH -u "$path"`
40264  fi
40265  if test "x$new_path" = x; then
40266    # Oops. Which didn't find the executable.
40267    # The splitting of arguments from the executable at a space might have been incorrect,
40268    # since paths with space are more likely in Windows. Give it another try with the whole
40269    # argument.
40270    path="$complete"
40271    arguments="EOL"
40272    new_path=`$CYGPATH -u "$path"`
40273    new_path=`$WHICH "$new_path" 2> /dev/null`
40274    # bat and cmd files are not always considered executable in cygwin causing which
40275    # to not find them
40276    if test "x$new_path" = x \
40277        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40278        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40279      new_path=`$CYGPATH -u "$path"`
40280    fi
40281    if test "x$new_path" = x; then
40282      # It's still not found. Now this is an unrecoverable error.
40283      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40284$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40285      has_space=`$ECHO "$complete" | $GREP " "`
40286      if test "x$has_space" != x; then
40287        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40288$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40289      fi
40290      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40291    fi
40292  fi
40293
40294  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40295  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40296  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40297  # "foo.exe" is OK but "foo" is an error.
40298  #
40299  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40300  # It is also a way to make sure we got the proper file name for the real test later on.
40301  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40302  if test "x$test_shortpath" = x; then
40303    # Short path failed, file does not exist as specified.
40304    # Try adding .exe or .cmd
40305    if test -f "${new_path}.exe"; then
40306      input_to_shortpath="${new_path}.exe"
40307    elif test -f "${new_path}.cmd"; then
40308      input_to_shortpath="${new_path}.cmd"
40309    else
40310      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
40311$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
40312      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40313$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40314      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40315    fi
40316  else
40317    input_to_shortpath="$new_path"
40318  fi
40319
40320  # Call helper function which possibly converts this using DOS-style short mode.
40321  # If so, the updated path is stored in $new_path.
40322  new_path="$input_to_shortpath"
40323
40324  input_path="$input_to_shortpath"
40325  # Check if we need to convert this using DOS-style short mode. If the path
40326  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40327  # take no chances and rewrite it.
40328  # Note: m4 eats our [], so we need to use [ and ] instead.
40329  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40330  if test "x$has_forbidden_chars" != x; then
40331    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40332    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40333    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40334    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40335      # Going to short mode and back again did indeed matter. Since short mode is
40336      # case insensitive, let's make it lowercase to improve readability.
40337      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40338      # Now convert it back to Unix-style (cygpath)
40339      input_path=`$CYGPATH -u "$shortmode_path"`
40340      new_path="$input_path"
40341    fi
40342  fi
40343
40344  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40345  if test "x$test_cygdrive_prefix" = x; then
40346    # As a simple fix, exclude /usr/bin since it's not a real path.
40347    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40348      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40349      # a path prefixed by /cygdrive for fixpath to work.
40350      new_path="$CYGWIN_ROOT_PATH$input_path"
40351    fi
40352  fi
40353
40354  # remove trailing .exe if any
40355  new_path="${new_path/%.exe/}"
40356
40357    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40358
40359  # First separate the path from the arguments. This will split at the first
40360  # space.
40361  complete="$NM"
40362  path="${complete%% *}"
40363  tmp="$complete EOL"
40364  arguments="${tmp#* }"
40365
40366  # Input might be given as Windows format, start by converting to
40367  # unix format.
40368  new_path="$path"
40369
40370  windows_path="$new_path"
40371  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40372    unix_path=`$CYGPATH -u "$windows_path"`
40373    new_path="$unix_path"
40374  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40375    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40376    new_path="$unix_path"
40377  fi
40378
40379
40380  # Now try to locate executable using which
40381  new_path=`$WHICH "$new_path" 2> /dev/null`
40382
40383  if test "x$new_path" = x; then
40384    # Oops. Which didn't find the executable.
40385    # The splitting of arguments from the executable at a space might have been incorrect,
40386    # since paths with space are more likely in Windows. Give it another try with the whole
40387    # argument.
40388    path="$complete"
40389    arguments="EOL"
40390    new_path="$path"
40391
40392  windows_path="$new_path"
40393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40394    unix_path=`$CYGPATH -u "$windows_path"`
40395    new_path="$unix_path"
40396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40397    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40398    new_path="$unix_path"
40399  fi
40400
40401
40402    new_path=`$WHICH "$new_path" 2> /dev/null`
40403    # bat and cmd files are not always considered executable in MSYS causing which
40404    # to not find them
40405    if test "x$new_path" = x \
40406        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40407        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40408      new_path="$path"
40409
40410  windows_path="$new_path"
40411  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40412    unix_path=`$CYGPATH -u "$windows_path"`
40413    new_path="$unix_path"
40414  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40415    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40416    new_path="$unix_path"
40417  fi
40418
40419    fi
40420
40421    if test "x$new_path" = x; then
40422      # It's still not found. Now this is an unrecoverable error.
40423      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40424$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40425      has_space=`$ECHO "$complete" | $GREP " "`
40426      if test "x$has_space" != x; then
40427        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40428$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40429      fi
40430      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40431    fi
40432  fi
40433
40434  # Now new_path has a complete unix path to the binary
40435  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40436    # Keep paths in /bin as-is, but remove trailing .exe if any
40437    new_path="${new_path/%.exe/}"
40438    # Do not save /bin paths to all_fixpath_prefixes!
40439  else
40440    # Not in mixed or Windows style, start by that.
40441    new_path=`cmd //c echo $new_path`
40442
40443  input_path="$new_path"
40444  # Check if we need to convert this using DOS-style short mode. If the path
40445  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40446  # take no chances and rewrite it.
40447  # Note: m4 eats our [], so we need to use [ and ] instead.
40448  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40449  if test "x$has_forbidden_chars" != x; then
40450    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40451    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40452  fi
40453
40454    # Output is in $new_path
40455
40456  windows_path="$new_path"
40457  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40458    unix_path=`$CYGPATH -u "$windows_path"`
40459    new_path="$unix_path"
40460  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40461    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40462    new_path="$unix_path"
40463  fi
40464
40465    # remove trailing .exe if any
40466    new_path="${new_path/%.exe/}"
40467
40468    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40469    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40470  fi
40471
40472    else
40473      # We're on a unix platform. Hooray! :)
40474      # First separate the path from the arguments. This will split at the first
40475      # space.
40476      complete="$NM"
40477      path="${complete%% *}"
40478      tmp="$complete EOL"
40479      arguments="${tmp#* }"
40480
40481      # Cannot rely on the command "which" here since it doesn't always work.
40482      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40483      if test -z "$is_absolute_path"; then
40484        # Path to executable is not absolute. Find it.
40485        IFS_save="$IFS"
40486        IFS=:
40487        for p in $PATH; do
40488          if test -f "$p/$path" && test -x "$p/$path"; then
40489            new_path="$p/$path"
40490            break
40491          fi
40492        done
40493        IFS="$IFS_save"
40494      else
40495        # This is an absolute path, we can use it without further modifications.
40496        new_path="$path"
40497      fi
40498
40499      if test "x$new_path" = x; then
40500        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40501$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40502        has_space=`$ECHO "$complete" | $GREP " "`
40503        if test "x$has_space" != x; then
40504          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40505$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40506        fi
40507        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40508      fi
40509    fi
40510
40511    # Now join together the path and the arguments once again
40512    if test "x$arguments" != xEOL; then
40513      new_complete="$new_path ${arguments% *}"
40514    else
40515      new_complete="$new_path"
40516    fi
40517
40518    if test "x$complete" != "x$new_complete"; then
40519      NM="$new_complete"
40520      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
40521$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
40522    fi
40523  fi
40524
40525
40526
40527  # Publish this variable in the help.
40528
40529
40530  if [ -z "${GNM+x}" ]; then
40531    # The variable is not set by user, try to locate tool using the code snippet
40532    for ac_prog in gnm
40533do
40534  # Extract the first word of "$ac_prog", so it can be a program name with args.
40535set dummy $ac_prog; ac_word=$2
40536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40537$as_echo_n "checking for $ac_word... " >&6; }
40538if ${ac_cv_path_GNM+:} false; then :
40539  $as_echo_n "(cached) " >&6
40540else
40541  case $GNM in
40542  [\\/]* | ?:[\\/]*)
40543  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40544  ;;
40545  *)
40546  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40547for as_dir in $PATH
40548do
40549  IFS=$as_save_IFS
40550  test -z "$as_dir" && as_dir=.
40551    for ac_exec_ext in '' $ac_executable_extensions; do
40552  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40553    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40554    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40555    break 2
40556  fi
40557done
40558  done
40559IFS=$as_save_IFS
40560
40561  ;;
40562esac
40563fi
40564GNM=$ac_cv_path_GNM
40565if test -n "$GNM"; then
40566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40567$as_echo "$GNM" >&6; }
40568else
40569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40570$as_echo "no" >&6; }
40571fi
40572
40573
40574  test -n "$GNM" && break
40575done
40576
40577  else
40578    # The variable is set, but is it from the command line or the environment?
40579
40580    # Try to remove the string !GNM! from our list.
40581    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
40582    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40583      # If it failed, the variable was not from the command line. Ignore it,
40584      # but warn the user (except for BASH, which is always set by the calling BASH).
40585      if test "xGNM" != xBASH; then
40586        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
40587$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
40588      fi
40589      # Try to locate tool using the code snippet
40590      for ac_prog in gnm
40591do
40592  # Extract the first word of "$ac_prog", so it can be a program name with args.
40593set dummy $ac_prog; ac_word=$2
40594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40595$as_echo_n "checking for $ac_word... " >&6; }
40596if ${ac_cv_path_GNM+:} false; then :
40597  $as_echo_n "(cached) " >&6
40598else
40599  case $GNM in
40600  [\\/]* | ?:[\\/]*)
40601  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40602  ;;
40603  *)
40604  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40605for as_dir in $PATH
40606do
40607  IFS=$as_save_IFS
40608  test -z "$as_dir" && as_dir=.
40609    for ac_exec_ext in '' $ac_executable_extensions; do
40610  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40611    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40612    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40613    break 2
40614  fi
40615done
40616  done
40617IFS=$as_save_IFS
40618
40619  ;;
40620esac
40621fi
40622GNM=$ac_cv_path_GNM
40623if test -n "$GNM"; then
40624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40625$as_echo "$GNM" >&6; }
40626else
40627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40628$as_echo "no" >&6; }
40629fi
40630
40631
40632  test -n "$GNM" && break
40633done
40634
40635    else
40636      # If it succeeded, then it was overridden by the user. We will use it
40637      # for the tool.
40638
40639      # First remove it from the list of overridden variables, so we can test
40640      # for unknown variables in the end.
40641      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40642
40643      # Check if we try to supply an empty value
40644      if test "x$GNM" = x; then
40645        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
40646$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
40647        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40648$as_echo_n "checking for GNM... " >&6; }
40649        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40650$as_echo "disabled" >&6; }
40651      else
40652        # Check if the provided tool contains a complete path.
40653        tool_specified="$GNM"
40654        tool_basename="${tool_specified##*/}"
40655        if test "x$tool_basename" = "x$tool_specified"; then
40656          # A command without a complete path is provided, search $PATH.
40657          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
40658$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
40659          # Extract the first word of "$tool_basename", so it can be a program name with args.
40660set dummy $tool_basename; ac_word=$2
40661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40662$as_echo_n "checking for $ac_word... " >&6; }
40663if ${ac_cv_path_GNM+:} false; then :
40664  $as_echo_n "(cached) " >&6
40665else
40666  case $GNM in
40667  [\\/]* | ?:[\\/]*)
40668  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40669  ;;
40670  *)
40671  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40672for as_dir in $PATH
40673do
40674  IFS=$as_save_IFS
40675  test -z "$as_dir" && as_dir=.
40676    for ac_exec_ext in '' $ac_executable_extensions; do
40677  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40678    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40679    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40680    break 2
40681  fi
40682done
40683  done
40684IFS=$as_save_IFS
40685
40686  ;;
40687esac
40688fi
40689GNM=$ac_cv_path_GNM
40690if test -n "$GNM"; then
40691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40692$as_echo "$GNM" >&6; }
40693else
40694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40695$as_echo "no" >&6; }
40696fi
40697
40698
40699          if test "x$GNM" = x; then
40700            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40701          fi
40702        else
40703          # Otherwise we believe it is a complete path. Use it as it is.
40704          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
40705$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
40706          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40707$as_echo_n "checking for GNM... " >&6; }
40708          if test ! -x "$tool_specified"; then
40709            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40710$as_echo "not found" >&6; }
40711            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
40712          fi
40713          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40714$as_echo "$tool_specified" >&6; }
40715        fi
40716      fi
40717    fi
40718
40719  fi
40720
40721
40722
40723  # Only process if variable expands to non-empty
40724
40725  if test "x$GNM" != x; then
40726    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40727
40728  # First separate the path from the arguments. This will split at the first
40729  # space.
40730  complete="$GNM"
40731  path="${complete%% *}"
40732  tmp="$complete EOL"
40733  arguments="${tmp#* }"
40734
40735  # Input might be given as Windows format, start by converting to
40736  # unix format.
40737  new_path=`$CYGPATH -u "$path"`
40738
40739  # Now try to locate executable using which
40740  new_path=`$WHICH "$new_path" 2> /dev/null`
40741  # bat and cmd files are not always considered executable in cygwin causing which
40742  # to not find them
40743  if test "x$new_path" = x \
40744      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40745      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40746    new_path=`$CYGPATH -u "$path"`
40747  fi
40748  if test "x$new_path" = x; then
40749    # Oops. Which didn't find the executable.
40750    # The splitting of arguments from the executable at a space might have been incorrect,
40751    # since paths with space are more likely in Windows. Give it another try with the whole
40752    # argument.
40753    path="$complete"
40754    arguments="EOL"
40755    new_path=`$CYGPATH -u "$path"`
40756    new_path=`$WHICH "$new_path" 2> /dev/null`
40757    # bat and cmd files are not always considered executable in cygwin causing which
40758    # to not find them
40759    if test "x$new_path" = x \
40760        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40761        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40762      new_path=`$CYGPATH -u "$path"`
40763    fi
40764    if test "x$new_path" = x; then
40765      # It's still not found. Now this is an unrecoverable error.
40766      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40767$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40768      has_space=`$ECHO "$complete" | $GREP " "`
40769      if test "x$has_space" != x; then
40770        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40771$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40772      fi
40773      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40774    fi
40775  fi
40776
40777  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40778  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40779  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40780  # "foo.exe" is OK but "foo" is an error.
40781  #
40782  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40783  # It is also a way to make sure we got the proper file name for the real test later on.
40784  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40785  if test "x$test_shortpath" = x; then
40786    # Short path failed, file does not exist as specified.
40787    # Try adding .exe or .cmd
40788    if test -f "${new_path}.exe"; then
40789      input_to_shortpath="${new_path}.exe"
40790    elif test -f "${new_path}.cmd"; then
40791      input_to_shortpath="${new_path}.cmd"
40792    else
40793      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
40794$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
40795      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40796$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40797      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40798    fi
40799  else
40800    input_to_shortpath="$new_path"
40801  fi
40802
40803  # Call helper function which possibly converts this using DOS-style short mode.
40804  # If so, the updated path is stored in $new_path.
40805  new_path="$input_to_shortpath"
40806
40807  input_path="$input_to_shortpath"
40808  # Check if we need to convert this using DOS-style short mode. If the path
40809  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40810  # take no chances and rewrite it.
40811  # Note: m4 eats our [], so we need to use [ and ] instead.
40812  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40813  if test "x$has_forbidden_chars" != x; then
40814    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40815    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40816    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40817    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40818      # Going to short mode and back again did indeed matter. Since short mode is
40819      # case insensitive, let's make it lowercase to improve readability.
40820      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40821      # Now convert it back to Unix-style (cygpath)
40822      input_path=`$CYGPATH -u "$shortmode_path"`
40823      new_path="$input_path"
40824    fi
40825  fi
40826
40827  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40828  if test "x$test_cygdrive_prefix" = x; then
40829    # As a simple fix, exclude /usr/bin since it's not a real path.
40830    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40831      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40832      # a path prefixed by /cygdrive for fixpath to work.
40833      new_path="$CYGWIN_ROOT_PATH$input_path"
40834    fi
40835  fi
40836
40837  # remove trailing .exe if any
40838  new_path="${new_path/%.exe/}"
40839
40840    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40841
40842  # First separate the path from the arguments. This will split at the first
40843  # space.
40844  complete="$GNM"
40845  path="${complete%% *}"
40846  tmp="$complete EOL"
40847  arguments="${tmp#* }"
40848
40849  # Input might be given as Windows format, start by converting to
40850  # unix format.
40851  new_path="$path"
40852
40853  windows_path="$new_path"
40854  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40855    unix_path=`$CYGPATH -u "$windows_path"`
40856    new_path="$unix_path"
40857  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40858    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40859    new_path="$unix_path"
40860  fi
40861
40862
40863  # Now try to locate executable using which
40864  new_path=`$WHICH "$new_path" 2> /dev/null`
40865
40866  if test "x$new_path" = x; then
40867    # Oops. Which didn't find the executable.
40868    # The splitting of arguments from the executable at a space might have been incorrect,
40869    # since paths with space are more likely in Windows. Give it another try with the whole
40870    # argument.
40871    path="$complete"
40872    arguments="EOL"
40873    new_path="$path"
40874
40875  windows_path="$new_path"
40876  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40877    unix_path=`$CYGPATH -u "$windows_path"`
40878    new_path="$unix_path"
40879  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40880    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40881    new_path="$unix_path"
40882  fi
40883
40884
40885    new_path=`$WHICH "$new_path" 2> /dev/null`
40886    # bat and cmd files are not always considered executable in MSYS causing which
40887    # to not find them
40888    if test "x$new_path" = x \
40889        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40890        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40891      new_path="$path"
40892
40893  windows_path="$new_path"
40894  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40895    unix_path=`$CYGPATH -u "$windows_path"`
40896    new_path="$unix_path"
40897  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40898    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40899    new_path="$unix_path"
40900  fi
40901
40902    fi
40903
40904    if test "x$new_path" = x; then
40905      # It's still not found. Now this is an unrecoverable error.
40906      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40907$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40908      has_space=`$ECHO "$complete" | $GREP " "`
40909      if test "x$has_space" != x; then
40910        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40911$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40912      fi
40913      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40914    fi
40915  fi
40916
40917  # Now new_path has a complete unix path to the binary
40918  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40919    # Keep paths in /bin as-is, but remove trailing .exe if any
40920    new_path="${new_path/%.exe/}"
40921    # Do not save /bin paths to all_fixpath_prefixes!
40922  else
40923    # Not in mixed or Windows style, start by that.
40924    new_path=`cmd //c echo $new_path`
40925
40926  input_path="$new_path"
40927  # Check if we need to convert this using DOS-style short mode. If the path
40928  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40929  # take no chances and rewrite it.
40930  # Note: m4 eats our [], so we need to use [ and ] instead.
40931  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40932  if test "x$has_forbidden_chars" != x; then
40933    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40934    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40935  fi
40936
40937    # Output is in $new_path
40938
40939  windows_path="$new_path"
40940  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40941    unix_path=`$CYGPATH -u "$windows_path"`
40942    new_path="$unix_path"
40943  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40944    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40945    new_path="$unix_path"
40946  fi
40947
40948    # remove trailing .exe if any
40949    new_path="${new_path/%.exe/}"
40950
40951    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40952    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40953  fi
40954
40955    else
40956      # We're on a unix platform. Hooray! :)
40957      # First separate the path from the arguments. This will split at the first
40958      # space.
40959      complete="$GNM"
40960      path="${complete%% *}"
40961      tmp="$complete EOL"
40962      arguments="${tmp#* }"
40963
40964      # Cannot rely on the command "which" here since it doesn't always work.
40965      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40966      if test -z "$is_absolute_path"; then
40967        # Path to executable is not absolute. Find it.
40968        IFS_save="$IFS"
40969        IFS=:
40970        for p in $PATH; do
40971          if test -f "$p/$path" && test -x "$p/$path"; then
40972            new_path="$p/$path"
40973            break
40974          fi
40975        done
40976        IFS="$IFS_save"
40977      else
40978        # This is an absolute path, we can use it without further modifications.
40979        new_path="$path"
40980      fi
40981
40982      if test "x$new_path" = x; then
40983        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40984$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40985        has_space=`$ECHO "$complete" | $GREP " "`
40986        if test "x$has_space" != x; then
40987          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40988$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40989        fi
40990        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40991      fi
40992    fi
40993
40994    # Now join together the path and the arguments once again
40995    if test "x$arguments" != xEOL; then
40996      new_complete="$new_path ${arguments% *}"
40997    else
40998      new_complete="$new_path"
40999    fi
41000
41001    if test "x$complete" != "x$new_complete"; then
41002      GNM="$new_complete"
41003      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
41004$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
41005    fi
41006  fi
41007
41008  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
41009    # FIXME: we should unify this with the solaris case above.
41010
41011
41012  # Publish this variable in the help.
41013
41014
41015  if [ -z "${STRIP+x}" ]; then
41016    # The variable is not set by user, try to locate tool using the code snippet
41017    if test -n "$ac_tool_prefix"; then
41018  for ac_prog in strip
41019  do
41020    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41021set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41023$as_echo_n "checking for $ac_word... " >&6; }
41024if ${ac_cv_prog_STRIP+:} false; then :
41025  $as_echo_n "(cached) " >&6
41026else
41027  if test -n "$STRIP"; then
41028  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41029else
41030as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41031for as_dir in $PATH
41032do
41033  IFS=$as_save_IFS
41034  test -z "$as_dir" && as_dir=.
41035    for ac_exec_ext in '' $ac_executable_extensions; do
41036  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41037    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41038    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41039    break 2
41040  fi
41041done
41042  done
41043IFS=$as_save_IFS
41044
41045fi
41046fi
41047STRIP=$ac_cv_prog_STRIP
41048if test -n "$STRIP"; then
41049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41050$as_echo "$STRIP" >&6; }
41051else
41052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41053$as_echo "no" >&6; }
41054fi
41055
41056
41057    test -n "$STRIP" && break
41058  done
41059fi
41060if test -z "$STRIP"; then
41061  ac_ct_STRIP=$STRIP
41062  for ac_prog in strip
41063do
41064  # Extract the first word of "$ac_prog", so it can be a program name with args.
41065set dummy $ac_prog; ac_word=$2
41066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41067$as_echo_n "checking for $ac_word... " >&6; }
41068if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41069  $as_echo_n "(cached) " >&6
41070else
41071  if test -n "$ac_ct_STRIP"; then
41072  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41073else
41074as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41075for as_dir in $PATH
41076do
41077  IFS=$as_save_IFS
41078  test -z "$as_dir" && as_dir=.
41079    for ac_exec_ext in '' $ac_executable_extensions; do
41080  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41081    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41082    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41083    break 2
41084  fi
41085done
41086  done
41087IFS=$as_save_IFS
41088
41089fi
41090fi
41091ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41092if test -n "$ac_ct_STRIP"; then
41093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41094$as_echo "$ac_ct_STRIP" >&6; }
41095else
41096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41097$as_echo "no" >&6; }
41098fi
41099
41100
41101  test -n "$ac_ct_STRIP" && break
41102done
41103
41104  if test "x$ac_ct_STRIP" = x; then
41105    STRIP=""
41106  else
41107    case $cross_compiling:$ac_tool_warned in
41108yes:)
41109{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41110$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41111ac_tool_warned=yes ;;
41112esac
41113    STRIP=$ac_ct_STRIP
41114  fi
41115fi
41116
41117  else
41118    # The variable is set, but is it from the command line or the environment?
41119
41120    # Try to remove the string !STRIP! from our list.
41121    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
41122    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41123      # If it failed, the variable was not from the command line. Ignore it,
41124      # but warn the user (except for BASH, which is always set by the calling BASH).
41125      if test "xSTRIP" != xBASH; then
41126        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
41127$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
41128      fi
41129      # Try to locate tool using the code snippet
41130      if test -n "$ac_tool_prefix"; then
41131  for ac_prog in strip
41132  do
41133    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41134set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41136$as_echo_n "checking for $ac_word... " >&6; }
41137if ${ac_cv_prog_STRIP+:} false; then :
41138  $as_echo_n "(cached) " >&6
41139else
41140  if test -n "$STRIP"; then
41141  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41142else
41143as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41144for as_dir in $PATH
41145do
41146  IFS=$as_save_IFS
41147  test -z "$as_dir" && as_dir=.
41148    for ac_exec_ext in '' $ac_executable_extensions; do
41149  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41150    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41151    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41152    break 2
41153  fi
41154done
41155  done
41156IFS=$as_save_IFS
41157
41158fi
41159fi
41160STRIP=$ac_cv_prog_STRIP
41161if test -n "$STRIP"; then
41162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41163$as_echo "$STRIP" >&6; }
41164else
41165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41166$as_echo "no" >&6; }
41167fi
41168
41169
41170    test -n "$STRIP" && break
41171  done
41172fi
41173if test -z "$STRIP"; then
41174  ac_ct_STRIP=$STRIP
41175  for ac_prog in strip
41176do
41177  # Extract the first word of "$ac_prog", so it can be a program name with args.
41178set dummy $ac_prog; ac_word=$2
41179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41180$as_echo_n "checking for $ac_word... " >&6; }
41181if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41182  $as_echo_n "(cached) " >&6
41183else
41184  if test -n "$ac_ct_STRIP"; then
41185  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41186else
41187as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41188for as_dir in $PATH
41189do
41190  IFS=$as_save_IFS
41191  test -z "$as_dir" && as_dir=.
41192    for ac_exec_ext in '' $ac_executable_extensions; do
41193  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41194    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41195    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41196    break 2
41197  fi
41198done
41199  done
41200IFS=$as_save_IFS
41201
41202fi
41203fi
41204ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41205if test -n "$ac_ct_STRIP"; then
41206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41207$as_echo "$ac_ct_STRIP" >&6; }
41208else
41209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41210$as_echo "no" >&6; }
41211fi
41212
41213
41214  test -n "$ac_ct_STRIP" && break
41215done
41216
41217  if test "x$ac_ct_STRIP" = x; then
41218    STRIP=""
41219  else
41220    case $cross_compiling:$ac_tool_warned in
41221yes:)
41222{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41223$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41224ac_tool_warned=yes ;;
41225esac
41226    STRIP=$ac_ct_STRIP
41227  fi
41228fi
41229
41230    else
41231      # If it succeeded, then it was overridden by the user. We will use it
41232      # for the tool.
41233
41234      # First remove it from the list of overridden variables, so we can test
41235      # for unknown variables in the end.
41236      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41237
41238      # Check if we try to supply an empty value
41239      if test "x$STRIP" = x; then
41240        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
41241$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
41242        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41243$as_echo_n "checking for STRIP... " >&6; }
41244        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41245$as_echo "disabled" >&6; }
41246      else
41247        # Check if the provided tool contains a complete path.
41248        tool_specified="$STRIP"
41249        tool_basename="${tool_specified##*/}"
41250        if test "x$tool_basename" = "x$tool_specified"; then
41251          # A command without a complete path is provided, search $PATH.
41252          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
41253$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
41254          # Extract the first word of "$tool_basename", so it can be a program name with args.
41255set dummy $tool_basename; ac_word=$2
41256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41257$as_echo_n "checking for $ac_word... " >&6; }
41258if ${ac_cv_path_STRIP+:} false; then :
41259  $as_echo_n "(cached) " >&6
41260else
41261  case $STRIP in
41262  [\\/]* | ?:[\\/]*)
41263  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
41264  ;;
41265  *)
41266  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41267for as_dir in $PATH
41268do
41269  IFS=$as_save_IFS
41270  test -z "$as_dir" && as_dir=.
41271    for ac_exec_ext in '' $ac_executable_extensions; do
41272  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41273    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
41274    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41275    break 2
41276  fi
41277done
41278  done
41279IFS=$as_save_IFS
41280
41281  ;;
41282esac
41283fi
41284STRIP=$ac_cv_path_STRIP
41285if test -n "$STRIP"; then
41286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41287$as_echo "$STRIP" >&6; }
41288else
41289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41290$as_echo "no" >&6; }
41291fi
41292
41293
41294          if test "x$STRIP" = x; then
41295            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41296          fi
41297        else
41298          # Otherwise we believe it is a complete path. Use it as it is.
41299          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
41300$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
41301          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41302$as_echo_n "checking for STRIP... " >&6; }
41303          if test ! -x "$tool_specified"; then
41304            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41305$as_echo "not found" >&6; }
41306            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
41307          fi
41308          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41309$as_echo "$tool_specified" >&6; }
41310        fi
41311      fi
41312    fi
41313
41314  fi
41315
41316
41317
41318  # Only process if variable expands to non-empty
41319
41320  if test "x$STRIP" != x; then
41321    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41322
41323  # First separate the path from the arguments. This will split at the first
41324  # space.
41325  complete="$STRIP"
41326  path="${complete%% *}"
41327  tmp="$complete EOL"
41328  arguments="${tmp#* }"
41329
41330  # Input might be given as Windows format, start by converting to
41331  # unix format.
41332  new_path=`$CYGPATH -u "$path"`
41333
41334  # Now try to locate executable using which
41335  new_path=`$WHICH "$new_path" 2> /dev/null`
41336  # bat and cmd files are not always considered executable in cygwin causing which
41337  # to not find them
41338  if test "x$new_path" = x \
41339      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41340      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41341    new_path=`$CYGPATH -u "$path"`
41342  fi
41343  if test "x$new_path" = x; then
41344    # Oops. Which didn't find the executable.
41345    # The splitting of arguments from the executable at a space might have been incorrect,
41346    # since paths with space are more likely in Windows. Give it another try with the whole
41347    # argument.
41348    path="$complete"
41349    arguments="EOL"
41350    new_path=`$CYGPATH -u "$path"`
41351    new_path=`$WHICH "$new_path" 2> /dev/null`
41352    # bat and cmd files are not always considered executable in cygwin causing which
41353    # to not find them
41354    if test "x$new_path" = x \
41355        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41356        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41357      new_path=`$CYGPATH -u "$path"`
41358    fi
41359    if test "x$new_path" = x; then
41360      # It's still not found. Now this is an unrecoverable error.
41361      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41362$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41363      has_space=`$ECHO "$complete" | $GREP " "`
41364      if test "x$has_space" != x; then
41365        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41366$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41367      fi
41368      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41369    fi
41370  fi
41371
41372  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41373  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41374  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41375  # "foo.exe" is OK but "foo" is an error.
41376  #
41377  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41378  # It is also a way to make sure we got the proper file name for the real test later on.
41379  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41380  if test "x$test_shortpath" = x; then
41381    # Short path failed, file does not exist as specified.
41382    # Try adding .exe or .cmd
41383    if test -f "${new_path}.exe"; then
41384      input_to_shortpath="${new_path}.exe"
41385    elif test -f "${new_path}.cmd"; then
41386      input_to_shortpath="${new_path}.cmd"
41387    else
41388      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
41389$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
41390      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41391$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41392      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41393    fi
41394  else
41395    input_to_shortpath="$new_path"
41396  fi
41397
41398  # Call helper function which possibly converts this using DOS-style short mode.
41399  # If so, the updated path is stored in $new_path.
41400  new_path="$input_to_shortpath"
41401
41402  input_path="$input_to_shortpath"
41403  # Check if we need to convert this using DOS-style short mode. If the path
41404  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41405  # take no chances and rewrite it.
41406  # Note: m4 eats our [], so we need to use [ and ] instead.
41407  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41408  if test "x$has_forbidden_chars" != x; then
41409    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41410    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41411    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41412    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41413      # Going to short mode and back again did indeed matter. Since short mode is
41414      # case insensitive, let's make it lowercase to improve readability.
41415      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41416      # Now convert it back to Unix-style (cygpath)
41417      input_path=`$CYGPATH -u "$shortmode_path"`
41418      new_path="$input_path"
41419    fi
41420  fi
41421
41422  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41423  if test "x$test_cygdrive_prefix" = x; then
41424    # As a simple fix, exclude /usr/bin since it's not a real path.
41425    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41426      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41427      # a path prefixed by /cygdrive for fixpath to work.
41428      new_path="$CYGWIN_ROOT_PATH$input_path"
41429    fi
41430  fi
41431
41432  # remove trailing .exe if any
41433  new_path="${new_path/%.exe/}"
41434
41435    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41436
41437  # First separate the path from the arguments. This will split at the first
41438  # space.
41439  complete="$STRIP"
41440  path="${complete%% *}"
41441  tmp="$complete EOL"
41442  arguments="${tmp#* }"
41443
41444  # Input might be given as Windows format, start by converting to
41445  # unix format.
41446  new_path="$path"
41447
41448  windows_path="$new_path"
41449  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41450    unix_path=`$CYGPATH -u "$windows_path"`
41451    new_path="$unix_path"
41452  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41453    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41454    new_path="$unix_path"
41455  fi
41456
41457
41458  # Now try to locate executable using which
41459  new_path=`$WHICH "$new_path" 2> /dev/null`
41460
41461  if test "x$new_path" = x; then
41462    # Oops. Which didn't find the executable.
41463    # The splitting of arguments from the executable at a space might have been incorrect,
41464    # since paths with space are more likely in Windows. Give it another try with the whole
41465    # argument.
41466    path="$complete"
41467    arguments="EOL"
41468    new_path="$path"
41469
41470  windows_path="$new_path"
41471  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41472    unix_path=`$CYGPATH -u "$windows_path"`
41473    new_path="$unix_path"
41474  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41475    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41476    new_path="$unix_path"
41477  fi
41478
41479
41480    new_path=`$WHICH "$new_path" 2> /dev/null`
41481    # bat and cmd files are not always considered executable in MSYS causing which
41482    # to not find them
41483    if test "x$new_path" = x \
41484        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41485        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41486      new_path="$path"
41487
41488  windows_path="$new_path"
41489  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41490    unix_path=`$CYGPATH -u "$windows_path"`
41491    new_path="$unix_path"
41492  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41493    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41494    new_path="$unix_path"
41495  fi
41496
41497    fi
41498
41499    if test "x$new_path" = x; then
41500      # It's still not found. Now this is an unrecoverable error.
41501      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41502$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41503      has_space=`$ECHO "$complete" | $GREP " "`
41504      if test "x$has_space" != x; then
41505        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41506$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41507      fi
41508      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41509    fi
41510  fi
41511
41512  # Now new_path has a complete unix path to the binary
41513  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41514    # Keep paths in /bin as-is, but remove trailing .exe if any
41515    new_path="${new_path/%.exe/}"
41516    # Do not save /bin paths to all_fixpath_prefixes!
41517  else
41518    # Not in mixed or Windows style, start by that.
41519    new_path=`cmd //c echo $new_path`
41520
41521  input_path="$new_path"
41522  # Check if we need to convert this using DOS-style short mode. If the path
41523  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41524  # take no chances and rewrite it.
41525  # Note: m4 eats our [], so we need to use [ and ] instead.
41526  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41527  if test "x$has_forbidden_chars" != x; then
41528    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41529    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41530  fi
41531
41532    # Output is in $new_path
41533
41534  windows_path="$new_path"
41535  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41536    unix_path=`$CYGPATH -u "$windows_path"`
41537    new_path="$unix_path"
41538  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41539    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41540    new_path="$unix_path"
41541  fi
41542
41543    # remove trailing .exe if any
41544    new_path="${new_path/%.exe/}"
41545
41546    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41547    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41548  fi
41549
41550    else
41551      # We're on a unix platform. Hooray! :)
41552      # First separate the path from the arguments. This will split at the first
41553      # space.
41554      complete="$STRIP"
41555      path="${complete%% *}"
41556      tmp="$complete EOL"
41557      arguments="${tmp#* }"
41558
41559      # Cannot rely on the command "which" here since it doesn't always work.
41560      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41561      if test -z "$is_absolute_path"; then
41562        # Path to executable is not absolute. Find it.
41563        IFS_save="$IFS"
41564        IFS=:
41565        for p in $PATH; do
41566          if test -f "$p/$path" && test -x "$p/$path"; then
41567            new_path="$p/$path"
41568            break
41569          fi
41570        done
41571        IFS="$IFS_save"
41572      else
41573        # This is an absolute path, we can use it without further modifications.
41574        new_path="$path"
41575      fi
41576
41577      if test "x$new_path" = x; then
41578        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41579$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41580        has_space=`$ECHO "$complete" | $GREP " "`
41581        if test "x$has_space" != x; then
41582          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41583$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41584        fi
41585        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41586      fi
41587    fi
41588
41589    # Now join together the path and the arguments once again
41590    if test "x$arguments" != xEOL; then
41591      new_complete="$new_path ${arguments% *}"
41592    else
41593      new_complete="$new_path"
41594    fi
41595
41596    if test "x$complete" != "x$new_complete"; then
41597      STRIP="$new_complete"
41598      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
41599$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
41600    fi
41601  fi
41602
41603    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41604
41605
41606  # Publish this variable in the help.
41607
41608
41609  if [ -z "${NM+x}" ]; then
41610    # The variable is not set by user, try to locate tool using the code snippet
41611    if test -n "$ac_tool_prefix"; then
41612  for ac_prog in nm gcc-nm
41613  do
41614    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41615set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41617$as_echo_n "checking for $ac_word... " >&6; }
41618if ${ac_cv_prog_NM+:} false; then :
41619  $as_echo_n "(cached) " >&6
41620else
41621  if test -n "$NM"; then
41622  ac_cv_prog_NM="$NM" # Let the user override the test.
41623else
41624as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41625for as_dir in $PATH
41626do
41627  IFS=$as_save_IFS
41628  test -z "$as_dir" && as_dir=.
41629    for ac_exec_ext in '' $ac_executable_extensions; do
41630  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41631    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41632    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41633    break 2
41634  fi
41635done
41636  done
41637IFS=$as_save_IFS
41638
41639fi
41640fi
41641NM=$ac_cv_prog_NM
41642if test -n "$NM"; then
41643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41644$as_echo "$NM" >&6; }
41645else
41646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41647$as_echo "no" >&6; }
41648fi
41649
41650
41651    test -n "$NM" && break
41652  done
41653fi
41654if test -z "$NM"; then
41655  ac_ct_NM=$NM
41656  for ac_prog in nm gcc-nm
41657do
41658  # Extract the first word of "$ac_prog", so it can be a program name with args.
41659set dummy $ac_prog; ac_word=$2
41660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41661$as_echo_n "checking for $ac_word... " >&6; }
41662if ${ac_cv_prog_ac_ct_NM+:} false; then :
41663  $as_echo_n "(cached) " >&6
41664else
41665  if test -n "$ac_ct_NM"; then
41666  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41667else
41668as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41669for as_dir in $PATH
41670do
41671  IFS=$as_save_IFS
41672  test -z "$as_dir" && as_dir=.
41673    for ac_exec_ext in '' $ac_executable_extensions; do
41674  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41675    ac_cv_prog_ac_ct_NM="$ac_prog"
41676    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41677    break 2
41678  fi
41679done
41680  done
41681IFS=$as_save_IFS
41682
41683fi
41684fi
41685ac_ct_NM=$ac_cv_prog_ac_ct_NM
41686if test -n "$ac_ct_NM"; then
41687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41688$as_echo "$ac_ct_NM" >&6; }
41689else
41690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41691$as_echo "no" >&6; }
41692fi
41693
41694
41695  test -n "$ac_ct_NM" && break
41696done
41697
41698  if test "x$ac_ct_NM" = x; then
41699    NM=""
41700  else
41701    case $cross_compiling:$ac_tool_warned in
41702yes:)
41703{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41704$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41705ac_tool_warned=yes ;;
41706esac
41707    NM=$ac_ct_NM
41708  fi
41709fi
41710
41711  else
41712    # The variable is set, but is it from the command line or the environment?
41713
41714    # Try to remove the string !NM! from our list.
41715    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41716    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41717      # If it failed, the variable was not from the command line. Ignore it,
41718      # but warn the user (except for BASH, which is always set by the calling BASH).
41719      if test "xNM" != xBASH; then
41720        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41721$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41722      fi
41723      # Try to locate tool using the code snippet
41724      if test -n "$ac_tool_prefix"; then
41725  for ac_prog in nm gcc-nm
41726  do
41727    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41728set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41730$as_echo_n "checking for $ac_word... " >&6; }
41731if ${ac_cv_prog_NM+:} false; then :
41732  $as_echo_n "(cached) " >&6
41733else
41734  if test -n "$NM"; then
41735  ac_cv_prog_NM="$NM" # Let the user override the test.
41736else
41737as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41738for as_dir in $PATH
41739do
41740  IFS=$as_save_IFS
41741  test -z "$as_dir" && as_dir=.
41742    for ac_exec_ext in '' $ac_executable_extensions; do
41743  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41744    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41745    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41746    break 2
41747  fi
41748done
41749  done
41750IFS=$as_save_IFS
41751
41752fi
41753fi
41754NM=$ac_cv_prog_NM
41755if test -n "$NM"; then
41756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41757$as_echo "$NM" >&6; }
41758else
41759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41760$as_echo "no" >&6; }
41761fi
41762
41763
41764    test -n "$NM" && break
41765  done
41766fi
41767if test -z "$NM"; then
41768  ac_ct_NM=$NM
41769  for ac_prog in nm gcc-nm
41770do
41771  # Extract the first word of "$ac_prog", so it can be a program name with args.
41772set dummy $ac_prog; ac_word=$2
41773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41774$as_echo_n "checking for $ac_word... " >&6; }
41775if ${ac_cv_prog_ac_ct_NM+:} false; then :
41776  $as_echo_n "(cached) " >&6
41777else
41778  if test -n "$ac_ct_NM"; then
41779  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41780else
41781as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41782for as_dir in $PATH
41783do
41784  IFS=$as_save_IFS
41785  test -z "$as_dir" && as_dir=.
41786    for ac_exec_ext in '' $ac_executable_extensions; do
41787  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41788    ac_cv_prog_ac_ct_NM="$ac_prog"
41789    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41790    break 2
41791  fi
41792done
41793  done
41794IFS=$as_save_IFS
41795
41796fi
41797fi
41798ac_ct_NM=$ac_cv_prog_ac_ct_NM
41799if test -n "$ac_ct_NM"; then
41800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41801$as_echo "$ac_ct_NM" >&6; }
41802else
41803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41804$as_echo "no" >&6; }
41805fi
41806
41807
41808  test -n "$ac_ct_NM" && break
41809done
41810
41811  if test "x$ac_ct_NM" = x; then
41812    NM=""
41813  else
41814    case $cross_compiling:$ac_tool_warned in
41815yes:)
41816{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41817$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41818ac_tool_warned=yes ;;
41819esac
41820    NM=$ac_ct_NM
41821  fi
41822fi
41823
41824    else
41825      # If it succeeded, then it was overridden by the user. We will use it
41826      # for the tool.
41827
41828      # First remove it from the list of overridden variables, so we can test
41829      # for unknown variables in the end.
41830      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41831
41832      # Check if we try to supply an empty value
41833      if test "x$NM" = x; then
41834        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41835$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41836        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41837$as_echo_n "checking for NM... " >&6; }
41838        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41839$as_echo "disabled" >&6; }
41840      else
41841        # Check if the provided tool contains a complete path.
41842        tool_specified="$NM"
41843        tool_basename="${tool_specified##*/}"
41844        if test "x$tool_basename" = "x$tool_specified"; then
41845          # A command without a complete path is provided, search $PATH.
41846          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41847$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41848          # Extract the first word of "$tool_basename", so it can be a program name with args.
41849set dummy $tool_basename; ac_word=$2
41850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41851$as_echo_n "checking for $ac_word... " >&6; }
41852if ${ac_cv_path_NM+:} false; then :
41853  $as_echo_n "(cached) " >&6
41854else
41855  case $NM in
41856  [\\/]* | ?:[\\/]*)
41857  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41858  ;;
41859  *)
41860  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41861for as_dir in $PATH
41862do
41863  IFS=$as_save_IFS
41864  test -z "$as_dir" && as_dir=.
41865    for ac_exec_ext in '' $ac_executable_extensions; do
41866  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41867    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41868    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41869    break 2
41870  fi
41871done
41872  done
41873IFS=$as_save_IFS
41874
41875  ;;
41876esac
41877fi
41878NM=$ac_cv_path_NM
41879if test -n "$NM"; then
41880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41881$as_echo "$NM" >&6; }
41882else
41883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41884$as_echo "no" >&6; }
41885fi
41886
41887
41888          if test "x$NM" = x; then
41889            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41890          fi
41891        else
41892          # Otherwise we believe it is a complete path. Use it as it is.
41893          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41894$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41895          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41896$as_echo_n "checking for NM... " >&6; }
41897          if test ! -x "$tool_specified"; then
41898            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41899$as_echo "not found" >&6; }
41900            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41901          fi
41902          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41903$as_echo "$tool_specified" >&6; }
41904        fi
41905      fi
41906    fi
41907
41908  fi
41909
41910
41911    else
41912
41913
41914  # Publish this variable in the help.
41915
41916
41917  if [ -z "${NM+x}" ]; then
41918    # The variable is not set by user, try to locate tool using the code snippet
41919    if test -n "$ac_tool_prefix"; then
41920  for ac_prog in nm
41921  do
41922    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41923set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41925$as_echo_n "checking for $ac_word... " >&6; }
41926if ${ac_cv_prog_NM+:} false; then :
41927  $as_echo_n "(cached) " >&6
41928else
41929  if test -n "$NM"; then
41930  ac_cv_prog_NM="$NM" # Let the user override the test.
41931else
41932as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41933for as_dir in $PATH
41934do
41935  IFS=$as_save_IFS
41936  test -z "$as_dir" && as_dir=.
41937    for ac_exec_ext in '' $ac_executable_extensions; do
41938  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41939    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41940    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41941    break 2
41942  fi
41943done
41944  done
41945IFS=$as_save_IFS
41946
41947fi
41948fi
41949NM=$ac_cv_prog_NM
41950if test -n "$NM"; then
41951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41952$as_echo "$NM" >&6; }
41953else
41954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41955$as_echo "no" >&6; }
41956fi
41957
41958
41959    test -n "$NM" && break
41960  done
41961fi
41962if test -z "$NM"; then
41963  ac_ct_NM=$NM
41964  for ac_prog in nm
41965do
41966  # Extract the first word of "$ac_prog", so it can be a program name with args.
41967set dummy $ac_prog; ac_word=$2
41968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41969$as_echo_n "checking for $ac_word... " >&6; }
41970if ${ac_cv_prog_ac_ct_NM+:} false; then :
41971  $as_echo_n "(cached) " >&6
41972else
41973  if test -n "$ac_ct_NM"; then
41974  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41975else
41976as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41977for as_dir in $PATH
41978do
41979  IFS=$as_save_IFS
41980  test -z "$as_dir" && as_dir=.
41981    for ac_exec_ext in '' $ac_executable_extensions; do
41982  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41983    ac_cv_prog_ac_ct_NM="$ac_prog"
41984    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41985    break 2
41986  fi
41987done
41988  done
41989IFS=$as_save_IFS
41990
41991fi
41992fi
41993ac_ct_NM=$ac_cv_prog_ac_ct_NM
41994if test -n "$ac_ct_NM"; then
41995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41996$as_echo "$ac_ct_NM" >&6; }
41997else
41998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41999$as_echo "no" >&6; }
42000fi
42001
42002
42003  test -n "$ac_ct_NM" && break
42004done
42005
42006  if test "x$ac_ct_NM" = x; then
42007    NM=""
42008  else
42009    case $cross_compiling:$ac_tool_warned in
42010yes:)
42011{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42012$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42013ac_tool_warned=yes ;;
42014esac
42015    NM=$ac_ct_NM
42016  fi
42017fi
42018
42019  else
42020    # The variable is set, but is it from the command line or the environment?
42021
42022    # Try to remove the string !NM! from our list.
42023    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42024    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42025      # If it failed, the variable was not from the command line. Ignore it,
42026      # but warn the user (except for BASH, which is always set by the calling BASH).
42027      if test "xNM" != xBASH; then
42028        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42029$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42030      fi
42031      # Try to locate tool using the code snippet
42032      if test -n "$ac_tool_prefix"; then
42033  for ac_prog in nm
42034  do
42035    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42036set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42038$as_echo_n "checking for $ac_word... " >&6; }
42039if ${ac_cv_prog_NM+:} false; then :
42040  $as_echo_n "(cached) " >&6
42041else
42042  if test -n "$NM"; then
42043  ac_cv_prog_NM="$NM" # Let the user override the test.
42044else
42045as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42046for as_dir in $PATH
42047do
42048  IFS=$as_save_IFS
42049  test -z "$as_dir" && as_dir=.
42050    for ac_exec_ext in '' $ac_executable_extensions; do
42051  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42052    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42053    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42054    break 2
42055  fi
42056done
42057  done
42058IFS=$as_save_IFS
42059
42060fi
42061fi
42062NM=$ac_cv_prog_NM
42063if test -n "$NM"; then
42064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42065$as_echo "$NM" >&6; }
42066else
42067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42068$as_echo "no" >&6; }
42069fi
42070
42071
42072    test -n "$NM" && break
42073  done
42074fi
42075if test -z "$NM"; then
42076  ac_ct_NM=$NM
42077  for ac_prog in nm
42078do
42079  # Extract the first word of "$ac_prog", so it can be a program name with args.
42080set dummy $ac_prog; ac_word=$2
42081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42082$as_echo_n "checking for $ac_word... " >&6; }
42083if ${ac_cv_prog_ac_ct_NM+:} false; then :
42084  $as_echo_n "(cached) " >&6
42085else
42086  if test -n "$ac_ct_NM"; then
42087  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42088else
42089as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42090for as_dir in $PATH
42091do
42092  IFS=$as_save_IFS
42093  test -z "$as_dir" && as_dir=.
42094    for ac_exec_ext in '' $ac_executable_extensions; do
42095  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42096    ac_cv_prog_ac_ct_NM="$ac_prog"
42097    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42098    break 2
42099  fi
42100done
42101  done
42102IFS=$as_save_IFS
42103
42104fi
42105fi
42106ac_ct_NM=$ac_cv_prog_ac_ct_NM
42107if test -n "$ac_ct_NM"; then
42108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42109$as_echo "$ac_ct_NM" >&6; }
42110else
42111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42112$as_echo "no" >&6; }
42113fi
42114
42115
42116  test -n "$ac_ct_NM" && break
42117done
42118
42119  if test "x$ac_ct_NM" = x; then
42120    NM=""
42121  else
42122    case $cross_compiling:$ac_tool_warned in
42123yes:)
42124{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42125$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42126ac_tool_warned=yes ;;
42127esac
42128    NM=$ac_ct_NM
42129  fi
42130fi
42131
42132    else
42133      # If it succeeded, then it was overridden by the user. We will use it
42134      # for the tool.
42135
42136      # First remove it from the list of overridden variables, so we can test
42137      # for unknown variables in the end.
42138      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42139
42140      # Check if we try to supply an empty value
42141      if test "x$NM" = x; then
42142        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42143$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42144        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42145$as_echo_n "checking for NM... " >&6; }
42146        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42147$as_echo "disabled" >&6; }
42148      else
42149        # Check if the provided tool contains a complete path.
42150        tool_specified="$NM"
42151        tool_basename="${tool_specified##*/}"
42152        if test "x$tool_basename" = "x$tool_specified"; then
42153          # A command without a complete path is provided, search $PATH.
42154          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42155$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42156          # Extract the first word of "$tool_basename", so it can be a program name with args.
42157set dummy $tool_basename; ac_word=$2
42158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42159$as_echo_n "checking for $ac_word... " >&6; }
42160if ${ac_cv_path_NM+:} false; then :
42161  $as_echo_n "(cached) " >&6
42162else
42163  case $NM in
42164  [\\/]* | ?:[\\/]*)
42165  ac_cv_path_NM="$NM" # Let the user override the test with a path.
42166  ;;
42167  *)
42168  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42169for as_dir in $PATH
42170do
42171  IFS=$as_save_IFS
42172  test -z "$as_dir" && as_dir=.
42173    for ac_exec_ext in '' $ac_executable_extensions; do
42174  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42175    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42176    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42177    break 2
42178  fi
42179done
42180  done
42181IFS=$as_save_IFS
42182
42183  ;;
42184esac
42185fi
42186NM=$ac_cv_path_NM
42187if test -n "$NM"; then
42188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42189$as_echo "$NM" >&6; }
42190else
42191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42192$as_echo "no" >&6; }
42193fi
42194
42195
42196          if test "x$NM" = x; then
42197            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42198          fi
42199        else
42200          # Otherwise we believe it is a complete path. Use it as it is.
42201          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42202$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42203          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42204$as_echo_n "checking for NM... " >&6; }
42205          if test ! -x "$tool_specified"; then
42206            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42207$as_echo "not found" >&6; }
42208            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42209          fi
42210          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42211$as_echo "$tool_specified" >&6; }
42212        fi
42213      fi
42214    fi
42215
42216  fi
42217
42218
42219    fi
42220
42221  # Only process if variable expands to non-empty
42222
42223  if test "x$NM" != x; then
42224    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42225
42226  # First separate the path from the arguments. This will split at the first
42227  # space.
42228  complete="$NM"
42229  path="${complete%% *}"
42230  tmp="$complete EOL"
42231  arguments="${tmp#* }"
42232
42233  # Input might be given as Windows format, start by converting to
42234  # unix format.
42235  new_path=`$CYGPATH -u "$path"`
42236
42237  # Now try to locate executable using which
42238  new_path=`$WHICH "$new_path" 2> /dev/null`
42239  # bat and cmd files are not always considered executable in cygwin causing which
42240  # to not find them
42241  if test "x$new_path" = x \
42242      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42243      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42244    new_path=`$CYGPATH -u "$path"`
42245  fi
42246  if test "x$new_path" = x; then
42247    # Oops. Which didn't find the executable.
42248    # The splitting of arguments from the executable at a space might have been incorrect,
42249    # since paths with space are more likely in Windows. Give it another try with the whole
42250    # argument.
42251    path="$complete"
42252    arguments="EOL"
42253    new_path=`$CYGPATH -u "$path"`
42254    new_path=`$WHICH "$new_path" 2> /dev/null`
42255    # bat and cmd files are not always considered executable in cygwin causing which
42256    # to not find them
42257    if test "x$new_path" = x \
42258        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42259        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42260      new_path=`$CYGPATH -u "$path"`
42261    fi
42262    if test "x$new_path" = x; then
42263      # It's still not found. Now this is an unrecoverable error.
42264      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42265$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42266      has_space=`$ECHO "$complete" | $GREP " "`
42267      if test "x$has_space" != x; then
42268        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42269$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42270      fi
42271      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42272    fi
42273  fi
42274
42275  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42276  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42277  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42278  # "foo.exe" is OK but "foo" is an error.
42279  #
42280  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42281  # It is also a way to make sure we got the proper file name for the real test later on.
42282  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42283  if test "x$test_shortpath" = x; then
42284    # Short path failed, file does not exist as specified.
42285    # Try adding .exe or .cmd
42286    if test -f "${new_path}.exe"; then
42287      input_to_shortpath="${new_path}.exe"
42288    elif test -f "${new_path}.cmd"; then
42289      input_to_shortpath="${new_path}.cmd"
42290    else
42291      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
42292$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
42293      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42294$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42295      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42296    fi
42297  else
42298    input_to_shortpath="$new_path"
42299  fi
42300
42301  # Call helper function which possibly converts this using DOS-style short mode.
42302  # If so, the updated path is stored in $new_path.
42303  new_path="$input_to_shortpath"
42304
42305  input_path="$input_to_shortpath"
42306  # Check if we need to convert this using DOS-style short mode. If the path
42307  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42308  # take no chances and rewrite it.
42309  # Note: m4 eats our [], so we need to use [ and ] instead.
42310  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42311  if test "x$has_forbidden_chars" != x; then
42312    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42313    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42314    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42315    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42316      # Going to short mode and back again did indeed matter. Since short mode is
42317      # case insensitive, let's make it lowercase to improve readability.
42318      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42319      # Now convert it back to Unix-style (cygpath)
42320      input_path=`$CYGPATH -u "$shortmode_path"`
42321      new_path="$input_path"
42322    fi
42323  fi
42324
42325  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42326  if test "x$test_cygdrive_prefix" = x; then
42327    # As a simple fix, exclude /usr/bin since it's not a real path.
42328    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42329      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42330      # a path prefixed by /cygdrive for fixpath to work.
42331      new_path="$CYGWIN_ROOT_PATH$input_path"
42332    fi
42333  fi
42334
42335  # remove trailing .exe if any
42336  new_path="${new_path/%.exe/}"
42337
42338    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42339
42340  # First separate the path from the arguments. This will split at the first
42341  # space.
42342  complete="$NM"
42343  path="${complete%% *}"
42344  tmp="$complete EOL"
42345  arguments="${tmp#* }"
42346
42347  # Input might be given as Windows format, start by converting to
42348  # unix format.
42349  new_path="$path"
42350
42351  windows_path="$new_path"
42352  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42353    unix_path=`$CYGPATH -u "$windows_path"`
42354    new_path="$unix_path"
42355  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42356    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42357    new_path="$unix_path"
42358  fi
42359
42360
42361  # Now try to locate executable using which
42362  new_path=`$WHICH "$new_path" 2> /dev/null`
42363
42364  if test "x$new_path" = x; then
42365    # Oops. Which didn't find the executable.
42366    # The splitting of arguments from the executable at a space might have been incorrect,
42367    # since paths with space are more likely in Windows. Give it another try with the whole
42368    # argument.
42369    path="$complete"
42370    arguments="EOL"
42371    new_path="$path"
42372
42373  windows_path="$new_path"
42374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42375    unix_path=`$CYGPATH -u "$windows_path"`
42376    new_path="$unix_path"
42377  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42378    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42379    new_path="$unix_path"
42380  fi
42381
42382
42383    new_path=`$WHICH "$new_path" 2> /dev/null`
42384    # bat and cmd files are not always considered executable in MSYS causing which
42385    # to not find them
42386    if test "x$new_path" = x \
42387        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42388        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42389      new_path="$path"
42390
42391  windows_path="$new_path"
42392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42393    unix_path=`$CYGPATH -u "$windows_path"`
42394    new_path="$unix_path"
42395  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42396    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42397    new_path="$unix_path"
42398  fi
42399
42400    fi
42401
42402    if test "x$new_path" = x; then
42403      # It's still not found. Now this is an unrecoverable error.
42404      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42405$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42406      has_space=`$ECHO "$complete" | $GREP " "`
42407      if test "x$has_space" != x; then
42408        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42409$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42410      fi
42411      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42412    fi
42413  fi
42414
42415  # Now new_path has a complete unix path to the binary
42416  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42417    # Keep paths in /bin as-is, but remove trailing .exe if any
42418    new_path="${new_path/%.exe/}"
42419    # Do not save /bin paths to all_fixpath_prefixes!
42420  else
42421    # Not in mixed or Windows style, start by that.
42422    new_path=`cmd //c echo $new_path`
42423
42424  input_path="$new_path"
42425  # Check if we need to convert this using DOS-style short mode. If the path
42426  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42427  # take no chances and rewrite it.
42428  # Note: m4 eats our [], so we need to use [ and ] instead.
42429  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42430  if test "x$has_forbidden_chars" != x; then
42431    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42432    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42433  fi
42434
42435    # Output is in $new_path
42436
42437  windows_path="$new_path"
42438  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42439    unix_path=`$CYGPATH -u "$windows_path"`
42440    new_path="$unix_path"
42441  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42442    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42443    new_path="$unix_path"
42444  fi
42445
42446    # remove trailing .exe if any
42447    new_path="${new_path/%.exe/}"
42448
42449    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42450    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42451  fi
42452
42453    else
42454      # We're on a unix platform. Hooray! :)
42455      # First separate the path from the arguments. This will split at the first
42456      # space.
42457      complete="$NM"
42458      path="${complete%% *}"
42459      tmp="$complete EOL"
42460      arguments="${tmp#* }"
42461
42462      # Cannot rely on the command "which" here since it doesn't always work.
42463      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42464      if test -z "$is_absolute_path"; then
42465        # Path to executable is not absolute. Find it.
42466        IFS_save="$IFS"
42467        IFS=:
42468        for p in $PATH; do
42469          if test -f "$p/$path" && test -x "$p/$path"; then
42470            new_path="$p/$path"
42471            break
42472          fi
42473        done
42474        IFS="$IFS_save"
42475      else
42476        # This is an absolute path, we can use it without further modifications.
42477        new_path="$path"
42478      fi
42479
42480      if test "x$new_path" = x; then
42481        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42482$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42483        has_space=`$ECHO "$complete" | $GREP " "`
42484        if test "x$has_space" != x; then
42485          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42486$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42487        fi
42488        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42489      fi
42490    fi
42491
42492    # Now join together the path and the arguments once again
42493    if test "x$arguments" != xEOL; then
42494      new_complete="$new_path ${arguments% *}"
42495    else
42496      new_complete="$new_path"
42497    fi
42498
42499    if test "x$complete" != "x$new_complete"; then
42500      NM="$new_complete"
42501      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
42502$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
42503    fi
42504  fi
42505
42506    GNM="$NM"
42507
42508  fi
42509
42510  # objcopy is used for moving debug symbols to separate files when
42511  # full debug symbols are enabled.
42512  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
42513
42514
42515  # Publish this variable in the help.
42516
42517
42518  if [ -z "${OBJCOPY+x}" ]; then
42519    # The variable is not set by user, try to locate tool using the code snippet
42520    if test -n "$ac_tool_prefix"; then
42521  for ac_prog in gobjcopy objcopy
42522  do
42523    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42524set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42526$as_echo_n "checking for $ac_word... " >&6; }
42527if ${ac_cv_prog_OBJCOPY+:} false; then :
42528  $as_echo_n "(cached) " >&6
42529else
42530  if test -n "$OBJCOPY"; then
42531  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42532else
42533as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42534for as_dir in $PATH
42535do
42536  IFS=$as_save_IFS
42537  test -z "$as_dir" && as_dir=.
42538    for ac_exec_ext in '' $ac_executable_extensions; do
42539  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42540    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42541    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42542    break 2
42543  fi
42544done
42545  done
42546IFS=$as_save_IFS
42547
42548fi
42549fi
42550OBJCOPY=$ac_cv_prog_OBJCOPY
42551if test -n "$OBJCOPY"; then
42552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42553$as_echo "$OBJCOPY" >&6; }
42554else
42555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42556$as_echo "no" >&6; }
42557fi
42558
42559
42560    test -n "$OBJCOPY" && break
42561  done
42562fi
42563if test -z "$OBJCOPY"; then
42564  ac_ct_OBJCOPY=$OBJCOPY
42565  for ac_prog in gobjcopy objcopy
42566do
42567  # Extract the first word of "$ac_prog", so it can be a program name with args.
42568set dummy $ac_prog; ac_word=$2
42569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42570$as_echo_n "checking for $ac_word... " >&6; }
42571if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42572  $as_echo_n "(cached) " >&6
42573else
42574  if test -n "$ac_ct_OBJCOPY"; then
42575  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42576else
42577as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42578for as_dir in $PATH
42579do
42580  IFS=$as_save_IFS
42581  test -z "$as_dir" && as_dir=.
42582    for ac_exec_ext in '' $ac_executable_extensions; do
42583  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42584    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42585    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42586    break 2
42587  fi
42588done
42589  done
42590IFS=$as_save_IFS
42591
42592fi
42593fi
42594ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42595if test -n "$ac_ct_OBJCOPY"; then
42596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42597$as_echo "$ac_ct_OBJCOPY" >&6; }
42598else
42599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42600$as_echo "no" >&6; }
42601fi
42602
42603
42604  test -n "$ac_ct_OBJCOPY" && break
42605done
42606
42607  if test "x$ac_ct_OBJCOPY" = x; then
42608    OBJCOPY=""
42609  else
42610    case $cross_compiling:$ac_tool_warned in
42611yes:)
42612{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42613$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42614ac_tool_warned=yes ;;
42615esac
42616    OBJCOPY=$ac_ct_OBJCOPY
42617  fi
42618fi
42619
42620  else
42621    # The variable is set, but is it from the command line or the environment?
42622
42623    # Try to remove the string !OBJCOPY! from our list.
42624    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
42625    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42626      # If it failed, the variable was not from the command line. Ignore it,
42627      # but warn the user (except for BASH, which is always set by the calling BASH).
42628      if test "xOBJCOPY" != xBASH; then
42629        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
42630$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
42631      fi
42632      # Try to locate tool using the code snippet
42633      if test -n "$ac_tool_prefix"; then
42634  for ac_prog in gobjcopy objcopy
42635  do
42636    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42637set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42639$as_echo_n "checking for $ac_word... " >&6; }
42640if ${ac_cv_prog_OBJCOPY+:} false; then :
42641  $as_echo_n "(cached) " >&6
42642else
42643  if test -n "$OBJCOPY"; then
42644  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42645else
42646as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42647for as_dir in $PATH
42648do
42649  IFS=$as_save_IFS
42650  test -z "$as_dir" && as_dir=.
42651    for ac_exec_ext in '' $ac_executable_extensions; do
42652  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42653    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42654    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42655    break 2
42656  fi
42657done
42658  done
42659IFS=$as_save_IFS
42660
42661fi
42662fi
42663OBJCOPY=$ac_cv_prog_OBJCOPY
42664if test -n "$OBJCOPY"; then
42665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42666$as_echo "$OBJCOPY" >&6; }
42667else
42668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42669$as_echo "no" >&6; }
42670fi
42671
42672
42673    test -n "$OBJCOPY" && break
42674  done
42675fi
42676if test -z "$OBJCOPY"; then
42677  ac_ct_OBJCOPY=$OBJCOPY
42678  for ac_prog in gobjcopy objcopy
42679do
42680  # Extract the first word of "$ac_prog", so it can be a program name with args.
42681set dummy $ac_prog; ac_word=$2
42682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42683$as_echo_n "checking for $ac_word... " >&6; }
42684if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42685  $as_echo_n "(cached) " >&6
42686else
42687  if test -n "$ac_ct_OBJCOPY"; then
42688  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42689else
42690as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42691for as_dir in $PATH
42692do
42693  IFS=$as_save_IFS
42694  test -z "$as_dir" && as_dir=.
42695    for ac_exec_ext in '' $ac_executable_extensions; do
42696  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42697    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42698    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42699    break 2
42700  fi
42701done
42702  done
42703IFS=$as_save_IFS
42704
42705fi
42706fi
42707ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42708if test -n "$ac_ct_OBJCOPY"; then
42709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42710$as_echo "$ac_ct_OBJCOPY" >&6; }
42711else
42712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42713$as_echo "no" >&6; }
42714fi
42715
42716
42717  test -n "$ac_ct_OBJCOPY" && break
42718done
42719
42720  if test "x$ac_ct_OBJCOPY" = x; then
42721    OBJCOPY=""
42722  else
42723    case $cross_compiling:$ac_tool_warned in
42724yes:)
42725{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42726$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42727ac_tool_warned=yes ;;
42728esac
42729    OBJCOPY=$ac_ct_OBJCOPY
42730  fi
42731fi
42732
42733    else
42734      # If it succeeded, then it was overridden by the user. We will use it
42735      # for the tool.
42736
42737      # First remove it from the list of overridden variables, so we can test
42738      # for unknown variables in the end.
42739      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42740
42741      # Check if we try to supply an empty value
42742      if test "x$OBJCOPY" = x; then
42743        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
42744$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
42745        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42746$as_echo_n "checking for OBJCOPY... " >&6; }
42747        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42748$as_echo "disabled" >&6; }
42749      else
42750        # Check if the provided tool contains a complete path.
42751        tool_specified="$OBJCOPY"
42752        tool_basename="${tool_specified##*/}"
42753        if test "x$tool_basename" = "x$tool_specified"; then
42754          # A command without a complete path is provided, search $PATH.
42755          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
42756$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
42757          # Extract the first word of "$tool_basename", so it can be a program name with args.
42758set dummy $tool_basename; ac_word=$2
42759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42760$as_echo_n "checking for $ac_word... " >&6; }
42761if ${ac_cv_path_OBJCOPY+:} false; then :
42762  $as_echo_n "(cached) " >&6
42763else
42764  case $OBJCOPY in
42765  [\\/]* | ?:[\\/]*)
42766  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
42767  ;;
42768  *)
42769  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42770for as_dir in $PATH
42771do
42772  IFS=$as_save_IFS
42773  test -z "$as_dir" && as_dir=.
42774    for ac_exec_ext in '' $ac_executable_extensions; do
42775  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42776    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
42777    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42778    break 2
42779  fi
42780done
42781  done
42782IFS=$as_save_IFS
42783
42784  ;;
42785esac
42786fi
42787OBJCOPY=$ac_cv_path_OBJCOPY
42788if test -n "$OBJCOPY"; then
42789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42790$as_echo "$OBJCOPY" >&6; }
42791else
42792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42793$as_echo "no" >&6; }
42794fi
42795
42796
42797          if test "x$OBJCOPY" = x; then
42798            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42799          fi
42800        else
42801          # Otherwise we believe it is a complete path. Use it as it is.
42802          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
42803$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
42804          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42805$as_echo_n "checking for OBJCOPY... " >&6; }
42806          if test ! -x "$tool_specified"; then
42807            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42808$as_echo "not found" >&6; }
42809            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
42810          fi
42811          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42812$as_echo "$tool_specified" >&6; }
42813        fi
42814      fi
42815    fi
42816
42817  fi
42818
42819
42820    # Only call fixup if objcopy was found.
42821    if test -n "$OBJCOPY"; then
42822
42823  # Only process if variable expands to non-empty
42824
42825  if test "x$OBJCOPY" != x; then
42826    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42827
42828  # First separate the path from the arguments. This will split at the first
42829  # space.
42830  complete="$OBJCOPY"
42831  path="${complete%% *}"
42832  tmp="$complete EOL"
42833  arguments="${tmp#* }"
42834
42835  # Input might be given as Windows format, start by converting to
42836  # unix format.
42837  new_path=`$CYGPATH -u "$path"`
42838
42839  # Now try to locate executable using which
42840  new_path=`$WHICH "$new_path" 2> /dev/null`
42841  # bat and cmd files are not always considered executable in cygwin causing which
42842  # to not find them
42843  if test "x$new_path" = x \
42844      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42845      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42846    new_path=`$CYGPATH -u "$path"`
42847  fi
42848  if test "x$new_path" = x; then
42849    # Oops. Which didn't find the executable.
42850    # The splitting of arguments from the executable at a space might have been incorrect,
42851    # since paths with space are more likely in Windows. Give it another try with the whole
42852    # argument.
42853    path="$complete"
42854    arguments="EOL"
42855    new_path=`$CYGPATH -u "$path"`
42856    new_path=`$WHICH "$new_path" 2> /dev/null`
42857    # bat and cmd files are not always considered executable in cygwin causing which
42858    # to not find them
42859    if test "x$new_path" = x \
42860        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42861        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42862      new_path=`$CYGPATH -u "$path"`
42863    fi
42864    if test "x$new_path" = x; then
42865      # It's still not found. Now this is an unrecoverable error.
42866      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42867$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42868      has_space=`$ECHO "$complete" | $GREP " "`
42869      if test "x$has_space" != x; then
42870        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42871$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42872      fi
42873      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42874    fi
42875  fi
42876
42877  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42878  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42879  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42880  # "foo.exe" is OK but "foo" is an error.
42881  #
42882  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42883  # It is also a way to make sure we got the proper file name for the real test later on.
42884  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42885  if test "x$test_shortpath" = x; then
42886    # Short path failed, file does not exist as specified.
42887    # Try adding .exe or .cmd
42888    if test -f "${new_path}.exe"; then
42889      input_to_shortpath="${new_path}.exe"
42890    elif test -f "${new_path}.cmd"; then
42891      input_to_shortpath="${new_path}.cmd"
42892    else
42893      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
42894$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
42895      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42896$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42897      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42898    fi
42899  else
42900    input_to_shortpath="$new_path"
42901  fi
42902
42903  # Call helper function which possibly converts this using DOS-style short mode.
42904  # If so, the updated path is stored in $new_path.
42905  new_path="$input_to_shortpath"
42906
42907  input_path="$input_to_shortpath"
42908  # Check if we need to convert this using DOS-style short mode. If the path
42909  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42910  # take no chances and rewrite it.
42911  # Note: m4 eats our [], so we need to use [ and ] instead.
42912  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42913  if test "x$has_forbidden_chars" != x; then
42914    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42915    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42916    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42917    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42918      # Going to short mode and back again did indeed matter. Since short mode is
42919      # case insensitive, let's make it lowercase to improve readability.
42920      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42921      # Now convert it back to Unix-style (cygpath)
42922      input_path=`$CYGPATH -u "$shortmode_path"`
42923      new_path="$input_path"
42924    fi
42925  fi
42926
42927  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42928  if test "x$test_cygdrive_prefix" = x; then
42929    # As a simple fix, exclude /usr/bin since it's not a real path.
42930    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42931      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42932      # a path prefixed by /cygdrive for fixpath to work.
42933      new_path="$CYGWIN_ROOT_PATH$input_path"
42934    fi
42935  fi
42936
42937  # remove trailing .exe if any
42938  new_path="${new_path/%.exe/}"
42939
42940    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42941
42942  # First separate the path from the arguments. This will split at the first
42943  # space.
42944  complete="$OBJCOPY"
42945  path="${complete%% *}"
42946  tmp="$complete EOL"
42947  arguments="${tmp#* }"
42948
42949  # Input might be given as Windows format, start by converting to
42950  # unix format.
42951  new_path="$path"
42952
42953  windows_path="$new_path"
42954  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42955    unix_path=`$CYGPATH -u "$windows_path"`
42956    new_path="$unix_path"
42957  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42958    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42959    new_path="$unix_path"
42960  fi
42961
42962
42963  # Now try to locate executable using which
42964  new_path=`$WHICH "$new_path" 2> /dev/null`
42965
42966  if test "x$new_path" = x; then
42967    # Oops. Which didn't find the executable.
42968    # The splitting of arguments from the executable at a space might have been incorrect,
42969    # since paths with space are more likely in Windows. Give it another try with the whole
42970    # argument.
42971    path="$complete"
42972    arguments="EOL"
42973    new_path="$path"
42974
42975  windows_path="$new_path"
42976  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42977    unix_path=`$CYGPATH -u "$windows_path"`
42978    new_path="$unix_path"
42979  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42980    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42981    new_path="$unix_path"
42982  fi
42983
42984
42985    new_path=`$WHICH "$new_path" 2> /dev/null`
42986    # bat and cmd files are not always considered executable in MSYS causing which
42987    # to not find them
42988    if test "x$new_path" = x \
42989        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42990        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42991      new_path="$path"
42992
42993  windows_path="$new_path"
42994  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42995    unix_path=`$CYGPATH -u "$windows_path"`
42996    new_path="$unix_path"
42997  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42998    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42999    new_path="$unix_path"
43000  fi
43001
43002    fi
43003
43004    if test "x$new_path" = x; then
43005      # It's still not found. Now this is an unrecoverable error.
43006      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43007$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43008      has_space=`$ECHO "$complete" | $GREP " "`
43009      if test "x$has_space" != x; then
43010        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43011$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43012      fi
43013      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43014    fi
43015  fi
43016
43017  # Now new_path has a complete unix path to the binary
43018  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43019    # Keep paths in /bin as-is, but remove trailing .exe if any
43020    new_path="${new_path/%.exe/}"
43021    # Do not save /bin paths to all_fixpath_prefixes!
43022  else
43023    # Not in mixed or Windows style, start by that.
43024    new_path=`cmd //c echo $new_path`
43025
43026  input_path="$new_path"
43027  # Check if we need to convert this using DOS-style short mode. If the path
43028  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43029  # take no chances and rewrite it.
43030  # Note: m4 eats our [], so we need to use [ and ] instead.
43031  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43032  if test "x$has_forbidden_chars" != x; then
43033    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43034    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43035  fi
43036
43037    # Output is in $new_path
43038
43039  windows_path="$new_path"
43040  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43041    unix_path=`$CYGPATH -u "$windows_path"`
43042    new_path="$unix_path"
43043  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43044    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43045    new_path="$unix_path"
43046  fi
43047
43048    # remove trailing .exe if any
43049    new_path="${new_path/%.exe/}"
43050
43051    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43052    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43053  fi
43054
43055    else
43056      # We're on a unix platform. Hooray! :)
43057      # First separate the path from the arguments. This will split at the first
43058      # space.
43059      complete="$OBJCOPY"
43060      path="${complete%% *}"
43061      tmp="$complete EOL"
43062      arguments="${tmp#* }"
43063
43064      # Cannot rely on the command "which" here since it doesn't always work.
43065      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43066      if test -z "$is_absolute_path"; then
43067        # Path to executable is not absolute. Find it.
43068        IFS_save="$IFS"
43069        IFS=:
43070        for p in $PATH; do
43071          if test -f "$p/$path" && test -x "$p/$path"; then
43072            new_path="$p/$path"
43073            break
43074          fi
43075        done
43076        IFS="$IFS_save"
43077      else
43078        # This is an absolute path, we can use it without further modifications.
43079        new_path="$path"
43080      fi
43081
43082      if test "x$new_path" = x; then
43083        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43084$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43085        has_space=`$ECHO "$complete" | $GREP " "`
43086        if test "x$has_space" != x; then
43087          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43088$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43089        fi
43090        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43091      fi
43092    fi
43093
43094    # Now join together the path and the arguments once again
43095    if test "x$arguments" != xEOL; then
43096      new_complete="$new_path ${arguments% *}"
43097    else
43098      new_complete="$new_path"
43099    fi
43100
43101    if test "x$complete" != "x$new_complete"; then
43102      OBJCOPY="$new_complete"
43103      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
43104$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
43105    fi
43106  fi
43107
43108      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
43109        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
43110        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
43111        # - version number is last blank separate word on first line
43112        # - version number formats that have been seen:
43113        #   - <major>.<minor>
43114        #   - <major>.<minor>.<micro>
43115        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
43116        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
43117         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
43118              -e 's/.* //' \
43119              -e '/^[01]\./b bad' \
43120              -e '/^2\./{' \
43121              -e '  s/^2\.//' \
43122              -e '  /^[0-9]$/b bad' \
43123              -e '  /^[0-9]\./b bad' \
43124              -e '  /^1[0-9]$/b bad' \
43125              -e '  /^1[0-9]\./b bad' \
43126              -e '  /^20\./b bad' \
43127              -e '  /^21\.0$/b bad' \
43128              -e '  /^21\.0\./b bad' \
43129              -e '}' \
43130              -e ':good' \
43131              -e 's/.*/VALID_VERSION/p' \
43132              -e 'q' \
43133              -e ':bad' \
43134              -e 's/.*/BAD_VERSION/p' \
43135              -e 'q'`
43136        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
43137          OBJCOPY=
43138          { $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
43139$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
43140          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
43141$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
43142          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
43143$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
43144          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
43145$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
43146          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
43147$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
43148        fi
43149      fi
43150    fi
43151  fi
43152
43153
43154
43155  # Publish this variable in the help.
43156
43157
43158  if [ -z "${OBJDUMP+x}" ]; then
43159    # The variable is not set by user, try to locate tool using the code snippet
43160    if test -n "$ac_tool_prefix"; then
43161  for ac_prog in gobjdump objdump
43162  do
43163    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43164set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43166$as_echo_n "checking for $ac_word... " >&6; }
43167if ${ac_cv_prog_OBJDUMP+:} false; then :
43168  $as_echo_n "(cached) " >&6
43169else
43170  if test -n "$OBJDUMP"; then
43171  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43172else
43173as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43174for as_dir in $PATH
43175do
43176  IFS=$as_save_IFS
43177  test -z "$as_dir" && as_dir=.
43178    for ac_exec_ext in '' $ac_executable_extensions; do
43179  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43180    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43181    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43182    break 2
43183  fi
43184done
43185  done
43186IFS=$as_save_IFS
43187
43188fi
43189fi
43190OBJDUMP=$ac_cv_prog_OBJDUMP
43191if test -n "$OBJDUMP"; then
43192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43193$as_echo "$OBJDUMP" >&6; }
43194else
43195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43196$as_echo "no" >&6; }
43197fi
43198
43199
43200    test -n "$OBJDUMP" && break
43201  done
43202fi
43203if test -z "$OBJDUMP"; then
43204  ac_ct_OBJDUMP=$OBJDUMP
43205  for ac_prog in gobjdump objdump
43206do
43207  # Extract the first word of "$ac_prog", so it can be a program name with args.
43208set dummy $ac_prog; ac_word=$2
43209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43210$as_echo_n "checking for $ac_word... " >&6; }
43211if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43212  $as_echo_n "(cached) " >&6
43213else
43214  if test -n "$ac_ct_OBJDUMP"; then
43215  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43216else
43217as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43218for as_dir in $PATH
43219do
43220  IFS=$as_save_IFS
43221  test -z "$as_dir" && as_dir=.
43222    for ac_exec_ext in '' $ac_executable_extensions; do
43223  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43224    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43225    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43226    break 2
43227  fi
43228done
43229  done
43230IFS=$as_save_IFS
43231
43232fi
43233fi
43234ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43235if test -n "$ac_ct_OBJDUMP"; then
43236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43237$as_echo "$ac_ct_OBJDUMP" >&6; }
43238else
43239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43240$as_echo "no" >&6; }
43241fi
43242
43243
43244  test -n "$ac_ct_OBJDUMP" && break
43245done
43246
43247  if test "x$ac_ct_OBJDUMP" = x; then
43248    OBJDUMP=""
43249  else
43250    case $cross_compiling:$ac_tool_warned in
43251yes:)
43252{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43253$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43254ac_tool_warned=yes ;;
43255esac
43256    OBJDUMP=$ac_ct_OBJDUMP
43257  fi
43258fi
43259
43260  else
43261    # The variable is set, but is it from the command line or the environment?
43262
43263    # Try to remove the string !OBJDUMP! from our list.
43264    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
43265    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43266      # If it failed, the variable was not from the command line. Ignore it,
43267      # but warn the user (except for BASH, which is always set by the calling BASH).
43268      if test "xOBJDUMP" != xBASH; then
43269        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
43270$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
43271      fi
43272      # Try to locate tool using the code snippet
43273      if test -n "$ac_tool_prefix"; then
43274  for ac_prog in gobjdump objdump
43275  do
43276    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43277set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43279$as_echo_n "checking for $ac_word... " >&6; }
43280if ${ac_cv_prog_OBJDUMP+:} false; then :
43281  $as_echo_n "(cached) " >&6
43282else
43283  if test -n "$OBJDUMP"; then
43284  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43285else
43286as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43287for as_dir in $PATH
43288do
43289  IFS=$as_save_IFS
43290  test -z "$as_dir" && as_dir=.
43291    for ac_exec_ext in '' $ac_executable_extensions; do
43292  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43293    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43294    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43295    break 2
43296  fi
43297done
43298  done
43299IFS=$as_save_IFS
43300
43301fi
43302fi
43303OBJDUMP=$ac_cv_prog_OBJDUMP
43304if test -n "$OBJDUMP"; then
43305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43306$as_echo "$OBJDUMP" >&6; }
43307else
43308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43309$as_echo "no" >&6; }
43310fi
43311
43312
43313    test -n "$OBJDUMP" && break
43314  done
43315fi
43316if test -z "$OBJDUMP"; then
43317  ac_ct_OBJDUMP=$OBJDUMP
43318  for ac_prog in gobjdump objdump
43319do
43320  # Extract the first word of "$ac_prog", so it can be a program name with args.
43321set dummy $ac_prog; ac_word=$2
43322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43323$as_echo_n "checking for $ac_word... " >&6; }
43324if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43325  $as_echo_n "(cached) " >&6
43326else
43327  if test -n "$ac_ct_OBJDUMP"; then
43328  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43329else
43330as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43331for as_dir in $PATH
43332do
43333  IFS=$as_save_IFS
43334  test -z "$as_dir" && as_dir=.
43335    for ac_exec_ext in '' $ac_executable_extensions; do
43336  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43337    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43338    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43339    break 2
43340  fi
43341done
43342  done
43343IFS=$as_save_IFS
43344
43345fi
43346fi
43347ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43348if test -n "$ac_ct_OBJDUMP"; then
43349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43350$as_echo "$ac_ct_OBJDUMP" >&6; }
43351else
43352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43353$as_echo "no" >&6; }
43354fi
43355
43356
43357  test -n "$ac_ct_OBJDUMP" && break
43358done
43359
43360  if test "x$ac_ct_OBJDUMP" = x; then
43361    OBJDUMP=""
43362  else
43363    case $cross_compiling:$ac_tool_warned in
43364yes:)
43365{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43366$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43367ac_tool_warned=yes ;;
43368esac
43369    OBJDUMP=$ac_ct_OBJDUMP
43370  fi
43371fi
43372
43373    else
43374      # If it succeeded, then it was overridden by the user. We will use it
43375      # for the tool.
43376
43377      # First remove it from the list of overridden variables, so we can test
43378      # for unknown variables in the end.
43379      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43380
43381      # Check if we try to supply an empty value
43382      if test "x$OBJDUMP" = x; then
43383        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
43384$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
43385        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43386$as_echo_n "checking for OBJDUMP... " >&6; }
43387        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43388$as_echo "disabled" >&6; }
43389      else
43390        # Check if the provided tool contains a complete path.
43391        tool_specified="$OBJDUMP"
43392        tool_basename="${tool_specified##*/}"
43393        if test "x$tool_basename" = "x$tool_specified"; then
43394          # A command without a complete path is provided, search $PATH.
43395          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
43396$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
43397          # Extract the first word of "$tool_basename", so it can be a program name with args.
43398set dummy $tool_basename; ac_word=$2
43399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43400$as_echo_n "checking for $ac_word... " >&6; }
43401if ${ac_cv_path_OBJDUMP+:} false; then :
43402  $as_echo_n "(cached) " >&6
43403else
43404  case $OBJDUMP in
43405  [\\/]* | ?:[\\/]*)
43406  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
43407  ;;
43408  *)
43409  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43410for as_dir in $PATH
43411do
43412  IFS=$as_save_IFS
43413  test -z "$as_dir" && as_dir=.
43414    for ac_exec_ext in '' $ac_executable_extensions; do
43415  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43416    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
43417    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43418    break 2
43419  fi
43420done
43421  done
43422IFS=$as_save_IFS
43423
43424  ;;
43425esac
43426fi
43427OBJDUMP=$ac_cv_path_OBJDUMP
43428if test -n "$OBJDUMP"; then
43429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43430$as_echo "$OBJDUMP" >&6; }
43431else
43432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43433$as_echo "no" >&6; }
43434fi
43435
43436
43437          if test "x$OBJDUMP" = x; then
43438            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43439          fi
43440        else
43441          # Otherwise we believe it is a complete path. Use it as it is.
43442          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
43443$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
43444          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43445$as_echo_n "checking for OBJDUMP... " >&6; }
43446          if test ! -x "$tool_specified"; then
43447            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43448$as_echo "not found" >&6; }
43449            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
43450          fi
43451          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43452$as_echo "$tool_specified" >&6; }
43453        fi
43454      fi
43455    fi
43456
43457  fi
43458
43459
43460  if test "x$OBJDUMP" != x; then
43461    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
43462    # bails if argument is missing.
43463
43464  # Only process if variable expands to non-empty
43465
43466  if test "x$OBJDUMP" != x; then
43467    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43468
43469  # First separate the path from the arguments. This will split at the first
43470  # space.
43471  complete="$OBJDUMP"
43472  path="${complete%% *}"
43473  tmp="$complete EOL"
43474  arguments="${tmp#* }"
43475
43476  # Input might be given as Windows format, start by converting to
43477  # unix format.
43478  new_path=`$CYGPATH -u "$path"`
43479
43480  # Now try to locate executable using which
43481  new_path=`$WHICH "$new_path" 2> /dev/null`
43482  # bat and cmd files are not always considered executable in cygwin causing which
43483  # to not find them
43484  if test "x$new_path" = x \
43485      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43486      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43487    new_path=`$CYGPATH -u "$path"`
43488  fi
43489  if test "x$new_path" = x; then
43490    # Oops. Which didn't find the executable.
43491    # The splitting of arguments from the executable at a space might have been incorrect,
43492    # since paths with space are more likely in Windows. Give it another try with the whole
43493    # argument.
43494    path="$complete"
43495    arguments="EOL"
43496    new_path=`$CYGPATH -u "$path"`
43497    new_path=`$WHICH "$new_path" 2> /dev/null`
43498    # bat and cmd files are not always considered executable in cygwin causing which
43499    # to not find them
43500    if test "x$new_path" = x \
43501        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43502        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43503      new_path=`$CYGPATH -u "$path"`
43504    fi
43505    if test "x$new_path" = x; then
43506      # It's still not found. Now this is an unrecoverable error.
43507      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43508$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43509      has_space=`$ECHO "$complete" | $GREP " "`
43510      if test "x$has_space" != x; then
43511        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43512$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43513      fi
43514      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43515    fi
43516  fi
43517
43518  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43519  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43520  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43521  # "foo.exe" is OK but "foo" is an error.
43522  #
43523  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43524  # It is also a way to make sure we got the proper file name for the real test later on.
43525  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43526  if test "x$test_shortpath" = x; then
43527    # Short path failed, file does not exist as specified.
43528    # Try adding .exe or .cmd
43529    if test -f "${new_path}.exe"; then
43530      input_to_shortpath="${new_path}.exe"
43531    elif test -f "${new_path}.cmd"; then
43532      input_to_shortpath="${new_path}.cmd"
43533    else
43534      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
43535$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
43536      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43537$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43538      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43539    fi
43540  else
43541    input_to_shortpath="$new_path"
43542  fi
43543
43544  # Call helper function which possibly converts this using DOS-style short mode.
43545  # If so, the updated path is stored in $new_path.
43546  new_path="$input_to_shortpath"
43547
43548  input_path="$input_to_shortpath"
43549  # Check if we need to convert this using DOS-style short mode. If the path
43550  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43551  # take no chances and rewrite it.
43552  # Note: m4 eats our [], so we need to use [ and ] instead.
43553  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43554  if test "x$has_forbidden_chars" != x; then
43555    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43556    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43557    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43558    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43559      # Going to short mode and back again did indeed matter. Since short mode is
43560      # case insensitive, let's make it lowercase to improve readability.
43561      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43562      # Now convert it back to Unix-style (cygpath)
43563      input_path=`$CYGPATH -u "$shortmode_path"`
43564      new_path="$input_path"
43565    fi
43566  fi
43567
43568  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43569  if test "x$test_cygdrive_prefix" = x; then
43570    # As a simple fix, exclude /usr/bin since it's not a real path.
43571    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43572      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43573      # a path prefixed by /cygdrive for fixpath to work.
43574      new_path="$CYGWIN_ROOT_PATH$input_path"
43575    fi
43576  fi
43577
43578  # remove trailing .exe if any
43579  new_path="${new_path/%.exe/}"
43580
43581    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43582
43583  # First separate the path from the arguments. This will split at the first
43584  # space.
43585  complete="$OBJDUMP"
43586  path="${complete%% *}"
43587  tmp="$complete EOL"
43588  arguments="${tmp#* }"
43589
43590  # Input might be given as Windows format, start by converting to
43591  # unix format.
43592  new_path="$path"
43593
43594  windows_path="$new_path"
43595  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43596    unix_path=`$CYGPATH -u "$windows_path"`
43597    new_path="$unix_path"
43598  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43599    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43600    new_path="$unix_path"
43601  fi
43602
43603
43604  # Now try to locate executable using which
43605  new_path=`$WHICH "$new_path" 2> /dev/null`
43606
43607  if test "x$new_path" = x; then
43608    # Oops. Which didn't find the executable.
43609    # The splitting of arguments from the executable at a space might have been incorrect,
43610    # since paths with space are more likely in Windows. Give it another try with the whole
43611    # argument.
43612    path="$complete"
43613    arguments="EOL"
43614    new_path="$path"
43615
43616  windows_path="$new_path"
43617  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43618    unix_path=`$CYGPATH -u "$windows_path"`
43619    new_path="$unix_path"
43620  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43621    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43622    new_path="$unix_path"
43623  fi
43624
43625
43626    new_path=`$WHICH "$new_path" 2> /dev/null`
43627    # bat and cmd files are not always considered executable in MSYS causing which
43628    # to not find them
43629    if test "x$new_path" = x \
43630        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43631        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43632      new_path="$path"
43633
43634  windows_path="$new_path"
43635  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43636    unix_path=`$CYGPATH -u "$windows_path"`
43637    new_path="$unix_path"
43638  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43639    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43640    new_path="$unix_path"
43641  fi
43642
43643    fi
43644
43645    if test "x$new_path" = x; then
43646      # It's still not found. Now this is an unrecoverable error.
43647      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43648$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43649      has_space=`$ECHO "$complete" | $GREP " "`
43650      if test "x$has_space" != x; then
43651        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43652$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43653      fi
43654      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43655    fi
43656  fi
43657
43658  # Now new_path has a complete unix path to the binary
43659  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43660    # Keep paths in /bin as-is, but remove trailing .exe if any
43661    new_path="${new_path/%.exe/}"
43662    # Do not save /bin paths to all_fixpath_prefixes!
43663  else
43664    # Not in mixed or Windows style, start by that.
43665    new_path=`cmd //c echo $new_path`
43666
43667  input_path="$new_path"
43668  # Check if we need to convert this using DOS-style short mode. If the path
43669  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43670  # take no chances and rewrite it.
43671  # Note: m4 eats our [], so we need to use [ and ] instead.
43672  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43673  if test "x$has_forbidden_chars" != x; then
43674    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43675    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43676  fi
43677
43678    # Output is in $new_path
43679
43680  windows_path="$new_path"
43681  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43682    unix_path=`$CYGPATH -u "$windows_path"`
43683    new_path="$unix_path"
43684  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43685    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43686    new_path="$unix_path"
43687  fi
43688
43689    # remove trailing .exe if any
43690    new_path="${new_path/%.exe/}"
43691
43692    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43693    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43694  fi
43695
43696    else
43697      # We're on a unix platform. Hooray! :)
43698      # First separate the path from the arguments. This will split at the first
43699      # space.
43700      complete="$OBJDUMP"
43701      path="${complete%% *}"
43702      tmp="$complete EOL"
43703      arguments="${tmp#* }"
43704
43705      # Cannot rely on the command "which" here since it doesn't always work.
43706      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43707      if test -z "$is_absolute_path"; then
43708        # Path to executable is not absolute. Find it.
43709        IFS_save="$IFS"
43710        IFS=:
43711        for p in $PATH; do
43712          if test -f "$p/$path" && test -x "$p/$path"; then
43713            new_path="$p/$path"
43714            break
43715          fi
43716        done
43717        IFS="$IFS_save"
43718      else
43719        # This is an absolute path, we can use it without further modifications.
43720        new_path="$path"
43721      fi
43722
43723      if test "x$new_path" = x; then
43724        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43725$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43726        has_space=`$ECHO "$complete" | $GREP " "`
43727        if test "x$has_space" != x; then
43728          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43729$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43730        fi
43731        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43732      fi
43733    fi
43734
43735    # Now join together the path and the arguments once again
43736    if test "x$arguments" != xEOL; then
43737      new_complete="$new_path ${arguments% *}"
43738    else
43739      new_complete="$new_path"
43740    fi
43741
43742    if test "x$complete" != "x$new_complete"; then
43743      OBJDUMP="$new_complete"
43744      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
43745$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
43746    fi
43747  fi
43748
43749  fi
43750
43751
43752  # Restore old path, except for the microsoft toolchain, which requires VS_PATH
43753  # to remain in place. Otherwise the compiler will not work in some siutations
43754  # in later configure checks.
43755  if test "x$TOOLCHAIN_TYPE" != "xmicrosoft"; then
43756    PATH="$OLD_PATH"
43757  fi
43758
43759  # Restore the flags to the user specified values.
43760  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
43761  CFLAGS="$ORG_CFLAGS"
43762  CXXFLAGS="$ORG_CXXFLAGS"
43763
43764
43765# Finally do some processing after the detection phase
43766
43767  if test "x$COMPILE_TYPE" = "xcross"; then
43768    # Now we need to find a C/C++ compiler that can build executables for the
43769    # build platform. We can't use the AC_PROG_CC macro, since it can only be
43770    # used once. Also, we need to do this without adding a tools dir to the
43771    # path, otherwise we might pick up cross-compilers which don't use standard
43772    # naming.
43773
43774    OLDPATH="$PATH"
43775
43776
43777# Check whether --with-build-devkit was given.
43778if test "${with_build_devkit+set}" = set; then :
43779  withval=$with_build_devkit;
43780fi
43781
43782    if test "x$with_build_devkit" = "xyes"; then
43783      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
43784    elif test -n "$with_build_devkit"; then
43785      if test ! -d "$with_build_devkit"; then
43786        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
43787      else
43788
43789  # Only process if variable expands to non-empty
43790
43791  if test "x$with_build_devkit" != x; then
43792    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43793
43794  # Input might be given as Windows format, start by converting to
43795  # unix format.
43796  path="$with_build_devkit"
43797  new_path=`$CYGPATH -u "$path"`
43798
43799  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43800  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43801  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43802  # "foo.exe" is OK but "foo" is an error.
43803  #
43804  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43805  # It is also a way to make sure we got the proper file name for the real test later on.
43806  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43807  if test "x$test_shortpath" = x; then
43808    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43809$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43810    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
43811  fi
43812
43813  # Call helper function which possibly converts this using DOS-style short mode.
43814  # If so, the updated path is stored in $new_path.
43815
43816  input_path="$new_path"
43817  # Check if we need to convert this using DOS-style short mode. If the path
43818  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43819  # take no chances and rewrite it.
43820  # Note: m4 eats our [], so we need to use [ and ] instead.
43821  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43822  if test "x$has_forbidden_chars" != x; then
43823    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43824    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43825    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43826    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43827      # Going to short mode and back again did indeed matter. Since short mode is
43828      # case insensitive, let's make it lowercase to improve readability.
43829      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43830      # Now convert it back to Unix-style (cygpath)
43831      input_path=`$CYGPATH -u "$shortmode_path"`
43832      new_path="$input_path"
43833    fi
43834  fi
43835
43836  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43837  if test "x$test_cygdrive_prefix" = x; then
43838    # As a simple fix, exclude /usr/bin since it's not a real path.
43839    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43840      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43841      # a path prefixed by /cygdrive for fixpath to work.
43842      new_path="$CYGWIN_ROOT_PATH$input_path"
43843    fi
43844  fi
43845
43846
43847  if test "x$path" != "x$new_path"; then
43848    with_build_devkit="$new_path"
43849    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43850$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43851  fi
43852
43853    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43854
43855  path="$with_build_devkit"
43856  has_colon=`$ECHO $path | $GREP ^.:`
43857  new_path="$path"
43858  if test "x$has_colon" = x; then
43859    # Not in mixed or Windows style, start by that.
43860    new_path=`cmd //c echo $path`
43861  fi
43862
43863
43864  input_path="$new_path"
43865  # Check if we need to convert this using DOS-style short mode. If the path
43866  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43867  # take no chances and rewrite it.
43868  # Note: m4 eats our [], so we need to use [ and ] instead.
43869  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43870  if test "x$has_forbidden_chars" != x; then
43871    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43872    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43873  fi
43874
43875
43876  windows_path="$new_path"
43877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43878    unix_path=`$CYGPATH -u "$windows_path"`
43879    new_path="$unix_path"
43880  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43881    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43882    new_path="$unix_path"
43883  fi
43884
43885  if test "x$path" != "x$new_path"; then
43886    with_build_devkit="$new_path"
43887    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43888$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43889  fi
43890
43891  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43892  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43893
43894    else
43895      # We're on a unix platform. Hooray! :)
43896      path="$with_build_devkit"
43897      has_space=`$ECHO "$path" | $GREP " "`
43898      if test "x$has_space" != x; then
43899        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43900$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43901        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43902      fi
43903
43904      # Use eval to expand a potential ~
43905      eval path="$path"
43906      if test ! -f "$path" && test ! -d "$path"; then
43907        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
43908      fi
43909
43910      if test -d "$path"; then
43911        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
43912      else
43913        dir="`$DIRNAME "$path"`"
43914        base="`$BASENAME "$path"`"
43915        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
43916      fi
43917    fi
43918  fi
43919
43920        BUILD_DEVKIT_ROOT="$with_build_devkit"
43921        # Check for a meta data info file in the root of the devkit
43922        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
43923          # Process devkit.info so that existing devkit variables are not
43924          # modified by this
43925          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
43926              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
43927              -e "s/\$host/\$build/g" \
43928              $BUILD_DEVKIT_ROOT/devkit.info \
43929              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43930          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43931          # This potentially sets the following:
43932          # A descriptive name of the devkit
43933
43934  if test "x$BUILD_DEVKIT_NAME" = x; then
43935    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
43936  fi
43937
43938          # Corresponds to --with-extra-path
43939
43940  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
43941    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
43942  fi
43943
43944          # Corresponds to --with-toolchain-path
43945
43946  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43947    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
43948  fi
43949
43950          # Corresponds to --with-sysroot
43951
43952  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
43953    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
43954  fi
43955
43956          # Skip the Window specific parts
43957        fi
43958
43959        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
43960$as_echo_n "checking for build platform devkit... " >&6; }
43961        if test "x$BUILD_DEVKIT_NAME" != x; then
43962          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
43963$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
43964        else
43965          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
43966$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
43967        fi
43968
43969        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
43970
43971  if test "x$BUILD_SYSROOT" != "x"; then
43972    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43973      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43974        # Solaris Studio does not have a concept of sysroot. Instead we must
43975        # make sure the default include and lib dirs are appended to each
43976        # compile and link command line. Must also add -I-xbuiltin to enable
43977        # inlining of system functions and intrinsics.
43978        BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
43979        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
43980            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
43981      fi
43982    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
43983      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
43984      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
43985    elif test "x$TOOLCHAIN_TYPE" = xclang; then
43986      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
43987      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
43988    fi
43989    # Propagate the sysroot args to hotspot
43990    BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
43991    BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
43992    BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
43993    # The global CFLAGS and LDFLAGS variables need these for configure to function
43994    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
43995    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
43996    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
43997    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
43998  fi
43999
44000  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44001    # We also need -iframework<path>/System/Library/Frameworks
44002    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44003    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44004    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
44005    # set this here so it doesn't have to be peppered throughout the forest
44006    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44007    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44008  fi
44009
44010
44011
44012
44013
44014         # Fallback default of just /bin if DEVKIT_PATH is not defined
44015        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44016          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
44017        fi
44018        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
44019      fi
44020    fi
44021
44022    # FIXME: we should list the discovered compilers as an exclude pattern!
44023    # If we do that, we can do this detection before POST_DETECTION, and still
44024    # find the build compilers in the tools dir, if needed.
44025
44026
44027
44028  # Publish this variable in the help.
44029
44030
44031  if [ -z "${BUILD_CC+x}" ]; then
44032    # The variable is not set by user, try to locate tool using the code snippet
44033    for ac_prog in cl cc gcc
44034do
44035  # Extract the first word of "$ac_prog", so it can be a program name with args.
44036set dummy $ac_prog; ac_word=$2
44037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44038$as_echo_n "checking for $ac_word... " >&6; }
44039if ${ac_cv_path_BUILD_CC+:} false; then :
44040  $as_echo_n "(cached) " >&6
44041else
44042  case $BUILD_CC in
44043  [\\/]* | ?:[\\/]*)
44044  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44045  ;;
44046  *)
44047  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44048for as_dir in $PATH
44049do
44050  IFS=$as_save_IFS
44051  test -z "$as_dir" && as_dir=.
44052    for ac_exec_ext in '' $ac_executable_extensions; do
44053  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44054    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44055    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44056    break 2
44057  fi
44058done
44059  done
44060IFS=$as_save_IFS
44061
44062  ;;
44063esac
44064fi
44065BUILD_CC=$ac_cv_path_BUILD_CC
44066if test -n "$BUILD_CC"; then
44067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44068$as_echo "$BUILD_CC" >&6; }
44069else
44070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44071$as_echo "no" >&6; }
44072fi
44073
44074
44075  test -n "$BUILD_CC" && break
44076done
44077
44078  else
44079    # The variable is set, but is it from the command line or the environment?
44080
44081    # Try to remove the string !BUILD_CC! from our list.
44082    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
44083    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44084      # If it failed, the variable was not from the command line. Ignore it,
44085      # but warn the user (except for BASH, which is always set by the calling BASH).
44086      if test "xBUILD_CC" != xBASH; then
44087        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
44088$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
44089      fi
44090      # Try to locate tool using the code snippet
44091      for ac_prog in cl cc gcc
44092do
44093  # Extract the first word of "$ac_prog", so it can be a program name with args.
44094set dummy $ac_prog; ac_word=$2
44095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44096$as_echo_n "checking for $ac_word... " >&6; }
44097if ${ac_cv_path_BUILD_CC+:} false; then :
44098  $as_echo_n "(cached) " >&6
44099else
44100  case $BUILD_CC in
44101  [\\/]* | ?:[\\/]*)
44102  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44103  ;;
44104  *)
44105  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44106for as_dir in $PATH
44107do
44108  IFS=$as_save_IFS
44109  test -z "$as_dir" && as_dir=.
44110    for ac_exec_ext in '' $ac_executable_extensions; do
44111  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44112    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44113    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44114    break 2
44115  fi
44116done
44117  done
44118IFS=$as_save_IFS
44119
44120  ;;
44121esac
44122fi
44123BUILD_CC=$ac_cv_path_BUILD_CC
44124if test -n "$BUILD_CC"; then
44125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44126$as_echo "$BUILD_CC" >&6; }
44127else
44128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44129$as_echo "no" >&6; }
44130fi
44131
44132
44133  test -n "$BUILD_CC" && break
44134done
44135
44136    else
44137      # If it succeeded, then it was overridden by the user. We will use it
44138      # for the tool.
44139
44140      # First remove it from the list of overridden variables, so we can test
44141      # for unknown variables in the end.
44142      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44143
44144      # Check if we try to supply an empty value
44145      if test "x$BUILD_CC" = x; then
44146        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
44147$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
44148        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44149$as_echo_n "checking for BUILD_CC... " >&6; }
44150        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44151$as_echo "disabled" >&6; }
44152      else
44153        # Check if the provided tool contains a complete path.
44154        tool_specified="$BUILD_CC"
44155        tool_basename="${tool_specified##*/}"
44156        if test "x$tool_basename" = "x$tool_specified"; then
44157          # A command without a complete path is provided, search $PATH.
44158          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
44159$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
44160          # Extract the first word of "$tool_basename", so it can be a program name with args.
44161set dummy $tool_basename; ac_word=$2
44162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44163$as_echo_n "checking for $ac_word... " >&6; }
44164if ${ac_cv_path_BUILD_CC+:} false; then :
44165  $as_echo_n "(cached) " >&6
44166else
44167  case $BUILD_CC in
44168  [\\/]* | ?:[\\/]*)
44169  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44170  ;;
44171  *)
44172  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44173for as_dir in $PATH
44174do
44175  IFS=$as_save_IFS
44176  test -z "$as_dir" && as_dir=.
44177    for ac_exec_ext in '' $ac_executable_extensions; do
44178  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44179    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44180    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44181    break 2
44182  fi
44183done
44184  done
44185IFS=$as_save_IFS
44186
44187  ;;
44188esac
44189fi
44190BUILD_CC=$ac_cv_path_BUILD_CC
44191if test -n "$BUILD_CC"; then
44192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44193$as_echo "$BUILD_CC" >&6; }
44194else
44195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44196$as_echo "no" >&6; }
44197fi
44198
44199
44200          if test "x$BUILD_CC" = x; then
44201            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44202          fi
44203        else
44204          # Otherwise we believe it is a complete path. Use it as it is.
44205          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
44206$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
44207          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44208$as_echo_n "checking for BUILD_CC... " >&6; }
44209          if test ! -x "$tool_specified"; then
44210            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44211$as_echo "not found" >&6; }
44212            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
44213          fi
44214          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44215$as_echo "$tool_specified" >&6; }
44216        fi
44217      fi
44218    fi
44219
44220  fi
44221
44222
44223
44224  if test "x$BUILD_CC" = x; then
44225    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
44226  fi
44227
44228
44229
44230  # Only process if variable expands to non-empty
44231
44232  if test "x$BUILD_CC" != x; then
44233    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44234
44235  # First separate the path from the arguments. This will split at the first
44236  # space.
44237  complete="$BUILD_CC"
44238  path="${complete%% *}"
44239  tmp="$complete EOL"
44240  arguments="${tmp#* }"
44241
44242  # Input might be given as Windows format, start by converting to
44243  # unix format.
44244  new_path=`$CYGPATH -u "$path"`
44245
44246  # Now try to locate executable using which
44247  new_path=`$WHICH "$new_path" 2> /dev/null`
44248  # bat and cmd files are not always considered executable in cygwin causing which
44249  # to not find them
44250  if test "x$new_path" = x \
44251      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44252      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44253    new_path=`$CYGPATH -u "$path"`
44254  fi
44255  if test "x$new_path" = x; then
44256    # Oops. Which didn't find the executable.
44257    # The splitting of arguments from the executable at a space might have been incorrect,
44258    # since paths with space are more likely in Windows. Give it another try with the whole
44259    # argument.
44260    path="$complete"
44261    arguments="EOL"
44262    new_path=`$CYGPATH -u "$path"`
44263    new_path=`$WHICH "$new_path" 2> /dev/null`
44264    # bat and cmd files are not always considered executable in cygwin causing which
44265    # to not find them
44266    if test "x$new_path" = x \
44267        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44268        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44269      new_path=`$CYGPATH -u "$path"`
44270    fi
44271    if test "x$new_path" = x; then
44272      # It's still not found. Now this is an unrecoverable error.
44273      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44274$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44275      has_space=`$ECHO "$complete" | $GREP " "`
44276      if test "x$has_space" != x; then
44277        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44278$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44279      fi
44280      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44281    fi
44282  fi
44283
44284  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44285  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44286  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44287  # "foo.exe" is OK but "foo" is an error.
44288  #
44289  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44290  # It is also a way to make sure we got the proper file name for the real test later on.
44291  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44292  if test "x$test_shortpath" = x; then
44293    # Short path failed, file does not exist as specified.
44294    # Try adding .exe or .cmd
44295    if test -f "${new_path}.exe"; then
44296      input_to_shortpath="${new_path}.exe"
44297    elif test -f "${new_path}.cmd"; then
44298      input_to_shortpath="${new_path}.cmd"
44299    else
44300      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
44301$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
44302      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44303$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44304      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44305    fi
44306  else
44307    input_to_shortpath="$new_path"
44308  fi
44309
44310  # Call helper function which possibly converts this using DOS-style short mode.
44311  # If so, the updated path is stored in $new_path.
44312  new_path="$input_to_shortpath"
44313
44314  input_path="$input_to_shortpath"
44315  # Check if we need to convert this using DOS-style short mode. If the path
44316  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44317  # take no chances and rewrite it.
44318  # Note: m4 eats our [], so we need to use [ and ] instead.
44319  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44320  if test "x$has_forbidden_chars" != x; then
44321    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44322    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44323    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44324    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44325      # Going to short mode and back again did indeed matter. Since short mode is
44326      # case insensitive, let's make it lowercase to improve readability.
44327      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44328      # Now convert it back to Unix-style (cygpath)
44329      input_path=`$CYGPATH -u "$shortmode_path"`
44330      new_path="$input_path"
44331    fi
44332  fi
44333
44334  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44335  if test "x$test_cygdrive_prefix" = x; then
44336    # As a simple fix, exclude /usr/bin since it's not a real path.
44337    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44338      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44339      # a path prefixed by /cygdrive for fixpath to work.
44340      new_path="$CYGWIN_ROOT_PATH$input_path"
44341    fi
44342  fi
44343
44344  # remove trailing .exe if any
44345  new_path="${new_path/%.exe/}"
44346
44347    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44348
44349  # First separate the path from the arguments. This will split at the first
44350  # space.
44351  complete="$BUILD_CC"
44352  path="${complete%% *}"
44353  tmp="$complete EOL"
44354  arguments="${tmp#* }"
44355
44356  # Input might be given as Windows format, start by converting to
44357  # unix format.
44358  new_path="$path"
44359
44360  windows_path="$new_path"
44361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44362    unix_path=`$CYGPATH -u "$windows_path"`
44363    new_path="$unix_path"
44364  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44365    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44366    new_path="$unix_path"
44367  fi
44368
44369
44370  # Now try to locate executable using which
44371  new_path=`$WHICH "$new_path" 2> /dev/null`
44372
44373  if test "x$new_path" = x; then
44374    # Oops. Which didn't find the executable.
44375    # The splitting of arguments from the executable at a space might have been incorrect,
44376    # since paths with space are more likely in Windows. Give it another try with the whole
44377    # argument.
44378    path="$complete"
44379    arguments="EOL"
44380    new_path="$path"
44381
44382  windows_path="$new_path"
44383  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44384    unix_path=`$CYGPATH -u "$windows_path"`
44385    new_path="$unix_path"
44386  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44387    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44388    new_path="$unix_path"
44389  fi
44390
44391
44392    new_path=`$WHICH "$new_path" 2> /dev/null`
44393    # bat and cmd files are not always considered executable in MSYS causing which
44394    # to not find them
44395    if test "x$new_path" = x \
44396        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44397        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44398      new_path="$path"
44399
44400  windows_path="$new_path"
44401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44402    unix_path=`$CYGPATH -u "$windows_path"`
44403    new_path="$unix_path"
44404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44405    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44406    new_path="$unix_path"
44407  fi
44408
44409    fi
44410
44411    if test "x$new_path" = x; then
44412      # It's still not found. Now this is an unrecoverable error.
44413      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44414$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44415      has_space=`$ECHO "$complete" | $GREP " "`
44416      if test "x$has_space" != x; then
44417        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44418$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44419      fi
44420      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44421    fi
44422  fi
44423
44424  # Now new_path has a complete unix path to the binary
44425  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44426    # Keep paths in /bin as-is, but remove trailing .exe if any
44427    new_path="${new_path/%.exe/}"
44428    # Do not save /bin paths to all_fixpath_prefixes!
44429  else
44430    # Not in mixed or Windows style, start by that.
44431    new_path=`cmd //c echo $new_path`
44432
44433  input_path="$new_path"
44434  # Check if we need to convert this using DOS-style short mode. If the path
44435  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44436  # take no chances and rewrite it.
44437  # Note: m4 eats our [], so we need to use [ and ] instead.
44438  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44439  if test "x$has_forbidden_chars" != x; then
44440    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44441    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44442  fi
44443
44444    # Output is in $new_path
44445
44446  windows_path="$new_path"
44447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44448    unix_path=`$CYGPATH -u "$windows_path"`
44449    new_path="$unix_path"
44450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44451    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44452    new_path="$unix_path"
44453  fi
44454
44455    # remove trailing .exe if any
44456    new_path="${new_path/%.exe/}"
44457
44458    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44459    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44460  fi
44461
44462    else
44463      # We're on a unix platform. Hooray! :)
44464      # First separate the path from the arguments. This will split at the first
44465      # space.
44466      complete="$BUILD_CC"
44467      path="${complete%% *}"
44468      tmp="$complete EOL"
44469      arguments="${tmp#* }"
44470
44471      # Cannot rely on the command "which" here since it doesn't always work.
44472      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44473      if test -z "$is_absolute_path"; then
44474        # Path to executable is not absolute. Find it.
44475        IFS_save="$IFS"
44476        IFS=:
44477        for p in $PATH; do
44478          if test -f "$p/$path" && test -x "$p/$path"; then
44479            new_path="$p/$path"
44480            break
44481          fi
44482        done
44483        IFS="$IFS_save"
44484      else
44485        # This is an absolute path, we can use it without further modifications.
44486        new_path="$path"
44487      fi
44488
44489      if test "x$new_path" = x; then
44490        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44491$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44492        has_space=`$ECHO "$complete" | $GREP " "`
44493        if test "x$has_space" != x; then
44494          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44495$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44496        fi
44497        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44498      fi
44499    fi
44500
44501    # Now join together the path and the arguments once again
44502    if test "x$arguments" != xEOL; then
44503      new_complete="$new_path ${arguments% *}"
44504    else
44505      new_complete="$new_path"
44506    fi
44507
44508    if test "x$complete" != "x$new_complete"; then
44509      BUILD_CC="$new_complete"
44510      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
44511$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
44512    fi
44513  fi
44514
44515
44516
44517
44518  # Publish this variable in the help.
44519
44520
44521  if [ -z "${BUILD_CXX+x}" ]; then
44522    # The variable is not set by user, try to locate tool using the code snippet
44523    for ac_prog in cl CC g++
44524do
44525  # Extract the first word of "$ac_prog", so it can be a program name with args.
44526set dummy $ac_prog; ac_word=$2
44527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44528$as_echo_n "checking for $ac_word... " >&6; }
44529if ${ac_cv_path_BUILD_CXX+:} false; then :
44530  $as_echo_n "(cached) " >&6
44531else
44532  case $BUILD_CXX in
44533  [\\/]* | ?:[\\/]*)
44534  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44535  ;;
44536  *)
44537  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44538for as_dir in $PATH
44539do
44540  IFS=$as_save_IFS
44541  test -z "$as_dir" && as_dir=.
44542    for ac_exec_ext in '' $ac_executable_extensions; do
44543  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44544    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44545    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44546    break 2
44547  fi
44548done
44549  done
44550IFS=$as_save_IFS
44551
44552  ;;
44553esac
44554fi
44555BUILD_CXX=$ac_cv_path_BUILD_CXX
44556if test -n "$BUILD_CXX"; then
44557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44558$as_echo "$BUILD_CXX" >&6; }
44559else
44560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44561$as_echo "no" >&6; }
44562fi
44563
44564
44565  test -n "$BUILD_CXX" && break
44566done
44567
44568  else
44569    # The variable is set, but is it from the command line or the environment?
44570
44571    # Try to remove the string !BUILD_CXX! from our list.
44572    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
44573    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44574      # If it failed, the variable was not from the command line. Ignore it,
44575      # but warn the user (except for BASH, which is always set by the calling BASH).
44576      if test "xBUILD_CXX" != xBASH; then
44577        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
44578$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
44579      fi
44580      # Try to locate tool using the code snippet
44581      for ac_prog in cl CC g++
44582do
44583  # Extract the first word of "$ac_prog", so it can be a program name with args.
44584set dummy $ac_prog; ac_word=$2
44585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44586$as_echo_n "checking for $ac_word... " >&6; }
44587if ${ac_cv_path_BUILD_CXX+:} false; then :
44588  $as_echo_n "(cached) " >&6
44589else
44590  case $BUILD_CXX in
44591  [\\/]* | ?:[\\/]*)
44592  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44593  ;;
44594  *)
44595  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44596for as_dir in $PATH
44597do
44598  IFS=$as_save_IFS
44599  test -z "$as_dir" && as_dir=.
44600    for ac_exec_ext in '' $ac_executable_extensions; do
44601  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44602    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44603    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44604    break 2
44605  fi
44606done
44607  done
44608IFS=$as_save_IFS
44609
44610  ;;
44611esac
44612fi
44613BUILD_CXX=$ac_cv_path_BUILD_CXX
44614if test -n "$BUILD_CXX"; then
44615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44616$as_echo "$BUILD_CXX" >&6; }
44617else
44618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44619$as_echo "no" >&6; }
44620fi
44621
44622
44623  test -n "$BUILD_CXX" && break
44624done
44625
44626    else
44627      # If it succeeded, then it was overridden by the user. We will use it
44628      # for the tool.
44629
44630      # First remove it from the list of overridden variables, so we can test
44631      # for unknown variables in the end.
44632      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44633
44634      # Check if we try to supply an empty value
44635      if test "x$BUILD_CXX" = x; then
44636        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
44637$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
44638        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44639$as_echo_n "checking for BUILD_CXX... " >&6; }
44640        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44641$as_echo "disabled" >&6; }
44642      else
44643        # Check if the provided tool contains a complete path.
44644        tool_specified="$BUILD_CXX"
44645        tool_basename="${tool_specified##*/}"
44646        if test "x$tool_basename" = "x$tool_specified"; then
44647          # A command without a complete path is provided, search $PATH.
44648          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
44649$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
44650          # Extract the first word of "$tool_basename", so it can be a program name with args.
44651set dummy $tool_basename; ac_word=$2
44652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44653$as_echo_n "checking for $ac_word... " >&6; }
44654if ${ac_cv_path_BUILD_CXX+:} false; then :
44655  $as_echo_n "(cached) " >&6
44656else
44657  case $BUILD_CXX in
44658  [\\/]* | ?:[\\/]*)
44659  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44660  ;;
44661  *)
44662  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44663for as_dir in $PATH
44664do
44665  IFS=$as_save_IFS
44666  test -z "$as_dir" && as_dir=.
44667    for ac_exec_ext in '' $ac_executable_extensions; do
44668  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44669    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44670    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44671    break 2
44672  fi
44673done
44674  done
44675IFS=$as_save_IFS
44676
44677  ;;
44678esac
44679fi
44680BUILD_CXX=$ac_cv_path_BUILD_CXX
44681if test -n "$BUILD_CXX"; then
44682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44683$as_echo "$BUILD_CXX" >&6; }
44684else
44685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44686$as_echo "no" >&6; }
44687fi
44688
44689
44690          if test "x$BUILD_CXX" = x; then
44691            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44692          fi
44693        else
44694          # Otherwise we believe it is a complete path. Use it as it is.
44695          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
44696$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
44697          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44698$as_echo_n "checking for BUILD_CXX... " >&6; }
44699          if test ! -x "$tool_specified"; then
44700            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44701$as_echo "not found" >&6; }
44702            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
44703          fi
44704          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44705$as_echo "$tool_specified" >&6; }
44706        fi
44707      fi
44708    fi
44709
44710  fi
44711
44712
44713
44714  if test "x$BUILD_CXX" = x; then
44715    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
44716  fi
44717
44718
44719
44720  # Only process if variable expands to non-empty
44721
44722  if test "x$BUILD_CXX" != x; then
44723    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44724
44725  # First separate the path from the arguments. This will split at the first
44726  # space.
44727  complete="$BUILD_CXX"
44728  path="${complete%% *}"
44729  tmp="$complete EOL"
44730  arguments="${tmp#* }"
44731
44732  # Input might be given as Windows format, start by converting to
44733  # unix format.
44734  new_path=`$CYGPATH -u "$path"`
44735
44736  # Now try to locate executable using which
44737  new_path=`$WHICH "$new_path" 2> /dev/null`
44738  # bat and cmd files are not always considered executable in cygwin causing which
44739  # to not find them
44740  if test "x$new_path" = x \
44741      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44742      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44743    new_path=`$CYGPATH -u "$path"`
44744  fi
44745  if test "x$new_path" = x; then
44746    # Oops. Which didn't find the executable.
44747    # The splitting of arguments from the executable at a space might have been incorrect,
44748    # since paths with space are more likely in Windows. Give it another try with the whole
44749    # argument.
44750    path="$complete"
44751    arguments="EOL"
44752    new_path=`$CYGPATH -u "$path"`
44753    new_path=`$WHICH "$new_path" 2> /dev/null`
44754    # bat and cmd files are not always considered executable in cygwin causing which
44755    # to not find them
44756    if test "x$new_path" = x \
44757        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44758        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44759      new_path=`$CYGPATH -u "$path"`
44760    fi
44761    if test "x$new_path" = x; then
44762      # It's still not found. Now this is an unrecoverable error.
44763      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44764$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44765      has_space=`$ECHO "$complete" | $GREP " "`
44766      if test "x$has_space" != x; then
44767        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44768$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44769      fi
44770      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44771    fi
44772  fi
44773
44774  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44775  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44776  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44777  # "foo.exe" is OK but "foo" is an error.
44778  #
44779  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44780  # It is also a way to make sure we got the proper file name for the real test later on.
44781  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44782  if test "x$test_shortpath" = x; then
44783    # Short path failed, file does not exist as specified.
44784    # Try adding .exe or .cmd
44785    if test -f "${new_path}.exe"; then
44786      input_to_shortpath="${new_path}.exe"
44787    elif test -f "${new_path}.cmd"; then
44788      input_to_shortpath="${new_path}.cmd"
44789    else
44790      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
44791$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
44792      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44793$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44794      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44795    fi
44796  else
44797    input_to_shortpath="$new_path"
44798  fi
44799
44800  # Call helper function which possibly converts this using DOS-style short mode.
44801  # If so, the updated path is stored in $new_path.
44802  new_path="$input_to_shortpath"
44803
44804  input_path="$input_to_shortpath"
44805  # Check if we need to convert this using DOS-style short mode. If the path
44806  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44807  # take no chances and rewrite it.
44808  # Note: m4 eats our [], so we need to use [ and ] instead.
44809  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44810  if test "x$has_forbidden_chars" != x; then
44811    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44812    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44813    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44814    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44815      # Going to short mode and back again did indeed matter. Since short mode is
44816      # case insensitive, let's make it lowercase to improve readability.
44817      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44818      # Now convert it back to Unix-style (cygpath)
44819      input_path=`$CYGPATH -u "$shortmode_path"`
44820      new_path="$input_path"
44821    fi
44822  fi
44823
44824  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44825  if test "x$test_cygdrive_prefix" = x; then
44826    # As a simple fix, exclude /usr/bin since it's not a real path.
44827    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44828      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44829      # a path prefixed by /cygdrive for fixpath to work.
44830      new_path="$CYGWIN_ROOT_PATH$input_path"
44831    fi
44832  fi
44833
44834  # remove trailing .exe if any
44835  new_path="${new_path/%.exe/}"
44836
44837    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44838
44839  # First separate the path from the arguments. This will split at the first
44840  # space.
44841  complete="$BUILD_CXX"
44842  path="${complete%% *}"
44843  tmp="$complete EOL"
44844  arguments="${tmp#* }"
44845
44846  # Input might be given as Windows format, start by converting to
44847  # unix format.
44848  new_path="$path"
44849
44850  windows_path="$new_path"
44851  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44852    unix_path=`$CYGPATH -u "$windows_path"`
44853    new_path="$unix_path"
44854  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44855    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44856    new_path="$unix_path"
44857  fi
44858
44859
44860  # Now try to locate executable using which
44861  new_path=`$WHICH "$new_path" 2> /dev/null`
44862
44863  if test "x$new_path" = x; then
44864    # Oops. Which didn't find the executable.
44865    # The splitting of arguments from the executable at a space might have been incorrect,
44866    # since paths with space are more likely in Windows. Give it another try with the whole
44867    # argument.
44868    path="$complete"
44869    arguments="EOL"
44870    new_path="$path"
44871
44872  windows_path="$new_path"
44873  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44874    unix_path=`$CYGPATH -u "$windows_path"`
44875    new_path="$unix_path"
44876  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44877    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44878    new_path="$unix_path"
44879  fi
44880
44881
44882    new_path=`$WHICH "$new_path" 2> /dev/null`
44883    # bat and cmd files are not always considered executable in MSYS causing which
44884    # to not find them
44885    if test "x$new_path" = x \
44886        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44887        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44888      new_path="$path"
44889
44890  windows_path="$new_path"
44891  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44892    unix_path=`$CYGPATH -u "$windows_path"`
44893    new_path="$unix_path"
44894  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44895    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44896    new_path="$unix_path"
44897  fi
44898
44899    fi
44900
44901    if test "x$new_path" = x; then
44902      # It's still not found. Now this is an unrecoverable error.
44903      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44904$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44905      has_space=`$ECHO "$complete" | $GREP " "`
44906      if test "x$has_space" != x; then
44907        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44908$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44909      fi
44910      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44911    fi
44912  fi
44913
44914  # Now new_path has a complete unix path to the binary
44915  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44916    # Keep paths in /bin as-is, but remove trailing .exe if any
44917    new_path="${new_path/%.exe/}"
44918    # Do not save /bin paths to all_fixpath_prefixes!
44919  else
44920    # Not in mixed or Windows style, start by that.
44921    new_path=`cmd //c echo $new_path`
44922
44923  input_path="$new_path"
44924  # Check if we need to convert this using DOS-style short mode. If the path
44925  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44926  # take no chances and rewrite it.
44927  # Note: m4 eats our [], so we need to use [ and ] instead.
44928  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44929  if test "x$has_forbidden_chars" != x; then
44930    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44931    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44932  fi
44933
44934    # Output is in $new_path
44935
44936  windows_path="$new_path"
44937  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44938    unix_path=`$CYGPATH -u "$windows_path"`
44939    new_path="$unix_path"
44940  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44941    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44942    new_path="$unix_path"
44943  fi
44944
44945    # remove trailing .exe if any
44946    new_path="${new_path/%.exe/}"
44947
44948    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44949    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44950  fi
44951
44952    else
44953      # We're on a unix platform. Hooray! :)
44954      # First separate the path from the arguments. This will split at the first
44955      # space.
44956      complete="$BUILD_CXX"
44957      path="${complete%% *}"
44958      tmp="$complete EOL"
44959      arguments="${tmp#* }"
44960
44961      # Cannot rely on the command "which" here since it doesn't always work.
44962      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44963      if test -z "$is_absolute_path"; then
44964        # Path to executable is not absolute. Find it.
44965        IFS_save="$IFS"
44966        IFS=:
44967        for p in $PATH; do
44968          if test -f "$p/$path" && test -x "$p/$path"; then
44969            new_path="$p/$path"
44970            break
44971          fi
44972        done
44973        IFS="$IFS_save"
44974      else
44975        # This is an absolute path, we can use it without further modifications.
44976        new_path="$path"
44977      fi
44978
44979      if test "x$new_path" = x; then
44980        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44981$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44982        has_space=`$ECHO "$complete" | $GREP " "`
44983        if test "x$has_space" != x; then
44984          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44985$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44986        fi
44987        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44988      fi
44989    fi
44990
44991    # Now join together the path and the arguments once again
44992    if test "x$arguments" != xEOL; then
44993      new_complete="$new_path ${arguments% *}"
44994    else
44995      new_complete="$new_path"
44996    fi
44997
44998    if test "x$complete" != "x$new_complete"; then
44999      BUILD_CXX="$new_complete"
45000      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
45001$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
45002    fi
45003  fi
45004
45005
45006
45007  # Publish this variable in the help.
45008
45009
45010  if [ -z "${BUILD_NM+x}" ]; then
45011    # The variable is not set by user, try to locate tool using the code snippet
45012    for ac_prog in nm gcc-nm
45013do
45014  # Extract the first word of "$ac_prog", so it can be a program name with args.
45015set dummy $ac_prog; ac_word=$2
45016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45017$as_echo_n "checking for $ac_word... " >&6; }
45018if ${ac_cv_path_BUILD_NM+:} false; then :
45019  $as_echo_n "(cached) " >&6
45020else
45021  case $BUILD_NM in
45022  [\\/]* | ?:[\\/]*)
45023  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45024  ;;
45025  *)
45026  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45027for as_dir in $PATH
45028do
45029  IFS=$as_save_IFS
45030  test -z "$as_dir" && as_dir=.
45031    for ac_exec_ext in '' $ac_executable_extensions; do
45032  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45033    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45034    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45035    break 2
45036  fi
45037done
45038  done
45039IFS=$as_save_IFS
45040
45041  ;;
45042esac
45043fi
45044BUILD_NM=$ac_cv_path_BUILD_NM
45045if test -n "$BUILD_NM"; then
45046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45047$as_echo "$BUILD_NM" >&6; }
45048else
45049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45050$as_echo "no" >&6; }
45051fi
45052
45053
45054  test -n "$BUILD_NM" && break
45055done
45056
45057  else
45058    # The variable is set, but is it from the command line or the environment?
45059
45060    # Try to remove the string !BUILD_NM! from our list.
45061    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
45062    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45063      # If it failed, the variable was not from the command line. Ignore it,
45064      # but warn the user (except for BASH, which is always set by the calling BASH).
45065      if test "xBUILD_NM" != xBASH; then
45066        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
45067$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
45068      fi
45069      # Try to locate tool using the code snippet
45070      for ac_prog in nm gcc-nm
45071do
45072  # Extract the first word of "$ac_prog", so it can be a program name with args.
45073set dummy $ac_prog; ac_word=$2
45074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45075$as_echo_n "checking for $ac_word... " >&6; }
45076if ${ac_cv_path_BUILD_NM+:} false; then :
45077  $as_echo_n "(cached) " >&6
45078else
45079  case $BUILD_NM in
45080  [\\/]* | ?:[\\/]*)
45081  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45082  ;;
45083  *)
45084  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45085for as_dir in $PATH
45086do
45087  IFS=$as_save_IFS
45088  test -z "$as_dir" && as_dir=.
45089    for ac_exec_ext in '' $ac_executable_extensions; do
45090  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45091    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45092    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45093    break 2
45094  fi
45095done
45096  done
45097IFS=$as_save_IFS
45098
45099  ;;
45100esac
45101fi
45102BUILD_NM=$ac_cv_path_BUILD_NM
45103if test -n "$BUILD_NM"; then
45104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45105$as_echo "$BUILD_NM" >&6; }
45106else
45107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45108$as_echo "no" >&6; }
45109fi
45110
45111
45112  test -n "$BUILD_NM" && break
45113done
45114
45115    else
45116      # If it succeeded, then it was overridden by the user. We will use it
45117      # for the tool.
45118
45119      # First remove it from the list of overridden variables, so we can test
45120      # for unknown variables in the end.
45121      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45122
45123      # Check if we try to supply an empty value
45124      if test "x$BUILD_NM" = x; then
45125        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
45126$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
45127        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45128$as_echo_n "checking for BUILD_NM... " >&6; }
45129        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45130$as_echo "disabled" >&6; }
45131      else
45132        # Check if the provided tool contains a complete path.
45133        tool_specified="$BUILD_NM"
45134        tool_basename="${tool_specified##*/}"
45135        if test "x$tool_basename" = "x$tool_specified"; then
45136          # A command without a complete path is provided, search $PATH.
45137          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
45138$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
45139          # Extract the first word of "$tool_basename", so it can be a program name with args.
45140set dummy $tool_basename; ac_word=$2
45141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45142$as_echo_n "checking for $ac_word... " >&6; }
45143if ${ac_cv_path_BUILD_NM+:} false; then :
45144  $as_echo_n "(cached) " >&6
45145else
45146  case $BUILD_NM in
45147  [\\/]* | ?:[\\/]*)
45148  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45149  ;;
45150  *)
45151  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45152for as_dir in $PATH
45153do
45154  IFS=$as_save_IFS
45155  test -z "$as_dir" && as_dir=.
45156    for ac_exec_ext in '' $ac_executable_extensions; do
45157  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45158    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45159    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45160    break 2
45161  fi
45162done
45163  done
45164IFS=$as_save_IFS
45165
45166  ;;
45167esac
45168fi
45169BUILD_NM=$ac_cv_path_BUILD_NM
45170if test -n "$BUILD_NM"; then
45171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45172$as_echo "$BUILD_NM" >&6; }
45173else
45174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45175$as_echo "no" >&6; }
45176fi
45177
45178
45179          if test "x$BUILD_NM" = x; then
45180            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45181          fi
45182        else
45183          # Otherwise we believe it is a complete path. Use it as it is.
45184          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
45185$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
45186          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45187$as_echo_n "checking for BUILD_NM... " >&6; }
45188          if test ! -x "$tool_specified"; then
45189            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45190$as_echo "not found" >&6; }
45191            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
45192          fi
45193          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45194$as_echo "$tool_specified" >&6; }
45195        fi
45196      fi
45197    fi
45198
45199  fi
45200
45201
45202
45203  # Only process if variable expands to non-empty
45204
45205  if test "x$BUILD_NM" != x; then
45206    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45207
45208  # First separate the path from the arguments. This will split at the first
45209  # space.
45210  complete="$BUILD_NM"
45211  path="${complete%% *}"
45212  tmp="$complete EOL"
45213  arguments="${tmp#* }"
45214
45215  # Input might be given as Windows format, start by converting to
45216  # unix format.
45217  new_path=`$CYGPATH -u "$path"`
45218
45219  # Now try to locate executable using which
45220  new_path=`$WHICH "$new_path" 2> /dev/null`
45221  # bat and cmd files are not always considered executable in cygwin causing which
45222  # to not find them
45223  if test "x$new_path" = x \
45224      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45225      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45226    new_path=`$CYGPATH -u "$path"`
45227  fi
45228  if test "x$new_path" = x; then
45229    # Oops. Which didn't find the executable.
45230    # The splitting of arguments from the executable at a space might have been incorrect,
45231    # since paths with space are more likely in Windows. Give it another try with the whole
45232    # argument.
45233    path="$complete"
45234    arguments="EOL"
45235    new_path=`$CYGPATH -u "$path"`
45236    new_path=`$WHICH "$new_path" 2> /dev/null`
45237    # bat and cmd files are not always considered executable in cygwin causing which
45238    # to not find them
45239    if test "x$new_path" = x \
45240        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45241        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45242      new_path=`$CYGPATH -u "$path"`
45243    fi
45244    if test "x$new_path" = x; then
45245      # It's still not found. Now this is an unrecoverable error.
45246      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45247$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45248      has_space=`$ECHO "$complete" | $GREP " "`
45249      if test "x$has_space" != x; then
45250        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45251$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45252      fi
45253      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45254    fi
45255  fi
45256
45257  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45258  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45259  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45260  # "foo.exe" is OK but "foo" is an error.
45261  #
45262  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45263  # It is also a way to make sure we got the proper file name for the real test later on.
45264  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45265  if test "x$test_shortpath" = x; then
45266    # Short path failed, file does not exist as specified.
45267    # Try adding .exe or .cmd
45268    if test -f "${new_path}.exe"; then
45269      input_to_shortpath="${new_path}.exe"
45270    elif test -f "${new_path}.cmd"; then
45271      input_to_shortpath="${new_path}.cmd"
45272    else
45273      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
45274$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
45275      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45276$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45277      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45278    fi
45279  else
45280    input_to_shortpath="$new_path"
45281  fi
45282
45283  # Call helper function which possibly converts this using DOS-style short mode.
45284  # If so, the updated path is stored in $new_path.
45285  new_path="$input_to_shortpath"
45286
45287  input_path="$input_to_shortpath"
45288  # Check if we need to convert this using DOS-style short mode. If the path
45289  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45290  # take no chances and rewrite it.
45291  # Note: m4 eats our [], so we need to use [ and ] instead.
45292  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45293  if test "x$has_forbidden_chars" != x; then
45294    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45295    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45296    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45297    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45298      # Going to short mode and back again did indeed matter. Since short mode is
45299      # case insensitive, let's make it lowercase to improve readability.
45300      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45301      # Now convert it back to Unix-style (cygpath)
45302      input_path=`$CYGPATH -u "$shortmode_path"`
45303      new_path="$input_path"
45304    fi
45305  fi
45306
45307  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45308  if test "x$test_cygdrive_prefix" = x; then
45309    # As a simple fix, exclude /usr/bin since it's not a real path.
45310    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45311      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45312      # a path prefixed by /cygdrive for fixpath to work.
45313      new_path="$CYGWIN_ROOT_PATH$input_path"
45314    fi
45315  fi
45316
45317  # remove trailing .exe if any
45318  new_path="${new_path/%.exe/}"
45319
45320    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45321
45322  # First separate the path from the arguments. This will split at the first
45323  # space.
45324  complete="$BUILD_NM"
45325  path="${complete%% *}"
45326  tmp="$complete EOL"
45327  arguments="${tmp#* }"
45328
45329  # Input might be given as Windows format, start by converting to
45330  # unix format.
45331  new_path="$path"
45332
45333  windows_path="$new_path"
45334  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45335    unix_path=`$CYGPATH -u "$windows_path"`
45336    new_path="$unix_path"
45337  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45338    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45339    new_path="$unix_path"
45340  fi
45341
45342
45343  # Now try to locate executable using which
45344  new_path=`$WHICH "$new_path" 2> /dev/null`
45345
45346  if test "x$new_path" = x; then
45347    # Oops. Which didn't find the executable.
45348    # The splitting of arguments from the executable at a space might have been incorrect,
45349    # since paths with space are more likely in Windows. Give it another try with the whole
45350    # argument.
45351    path="$complete"
45352    arguments="EOL"
45353    new_path="$path"
45354
45355  windows_path="$new_path"
45356  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45357    unix_path=`$CYGPATH -u "$windows_path"`
45358    new_path="$unix_path"
45359  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45360    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45361    new_path="$unix_path"
45362  fi
45363
45364
45365    new_path=`$WHICH "$new_path" 2> /dev/null`
45366    # bat and cmd files are not always considered executable in MSYS causing which
45367    # to not find them
45368    if test "x$new_path" = x \
45369        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45370        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45371      new_path="$path"
45372
45373  windows_path="$new_path"
45374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45375    unix_path=`$CYGPATH -u "$windows_path"`
45376    new_path="$unix_path"
45377  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45378    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45379    new_path="$unix_path"
45380  fi
45381
45382    fi
45383
45384    if test "x$new_path" = x; then
45385      # It's still not found. Now this is an unrecoverable error.
45386      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45387$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45388      has_space=`$ECHO "$complete" | $GREP " "`
45389      if test "x$has_space" != x; then
45390        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45391$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45392      fi
45393      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45394    fi
45395  fi
45396
45397  # Now new_path has a complete unix path to the binary
45398  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45399    # Keep paths in /bin as-is, but remove trailing .exe if any
45400    new_path="${new_path/%.exe/}"
45401    # Do not save /bin paths to all_fixpath_prefixes!
45402  else
45403    # Not in mixed or Windows style, start by that.
45404    new_path=`cmd //c echo $new_path`
45405
45406  input_path="$new_path"
45407  # Check if we need to convert this using DOS-style short mode. If the path
45408  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45409  # take no chances and rewrite it.
45410  # Note: m4 eats our [], so we need to use [ and ] instead.
45411  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45412  if test "x$has_forbidden_chars" != x; then
45413    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45414    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45415  fi
45416
45417    # Output is in $new_path
45418
45419  windows_path="$new_path"
45420  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45421    unix_path=`$CYGPATH -u "$windows_path"`
45422    new_path="$unix_path"
45423  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45424    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45425    new_path="$unix_path"
45426  fi
45427
45428    # remove trailing .exe if any
45429    new_path="${new_path/%.exe/}"
45430
45431    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45432    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45433  fi
45434
45435    else
45436      # We're on a unix platform. Hooray! :)
45437      # First separate the path from the arguments. This will split at the first
45438      # space.
45439      complete="$BUILD_NM"
45440      path="${complete%% *}"
45441      tmp="$complete EOL"
45442      arguments="${tmp#* }"
45443
45444      # Cannot rely on the command "which" here since it doesn't always work.
45445      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45446      if test -z "$is_absolute_path"; then
45447        # Path to executable is not absolute. Find it.
45448        IFS_save="$IFS"
45449        IFS=:
45450        for p in $PATH; do
45451          if test -f "$p/$path" && test -x "$p/$path"; then
45452            new_path="$p/$path"
45453            break
45454          fi
45455        done
45456        IFS="$IFS_save"
45457      else
45458        # This is an absolute path, we can use it without further modifications.
45459        new_path="$path"
45460      fi
45461
45462      if test "x$new_path" = x; then
45463        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45464$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45465        has_space=`$ECHO "$complete" | $GREP " "`
45466        if test "x$has_space" != x; then
45467          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45468$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45469        fi
45470        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45471      fi
45472    fi
45473
45474    # Now join together the path and the arguments once again
45475    if test "x$arguments" != xEOL; then
45476      new_complete="$new_path ${arguments% *}"
45477    else
45478      new_complete="$new_path"
45479    fi
45480
45481    if test "x$complete" != "x$new_complete"; then
45482      BUILD_NM="$new_complete"
45483      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
45484$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
45485    fi
45486  fi
45487
45488
45489
45490  # Publish this variable in the help.
45491
45492
45493  if [ -z "${BUILD_AR+x}" ]; then
45494    # The variable is not set by user, try to locate tool using the code snippet
45495    for ac_prog in ar gcc-ar
45496do
45497  # Extract the first word of "$ac_prog", so it can be a program name with args.
45498set dummy $ac_prog; ac_word=$2
45499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45500$as_echo_n "checking for $ac_word... " >&6; }
45501if ${ac_cv_path_BUILD_AR+:} false; then :
45502  $as_echo_n "(cached) " >&6
45503else
45504  case $BUILD_AR in
45505  [\\/]* | ?:[\\/]*)
45506  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45507  ;;
45508  *)
45509  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45510for as_dir in $PATH
45511do
45512  IFS=$as_save_IFS
45513  test -z "$as_dir" && as_dir=.
45514    for ac_exec_ext in '' $ac_executable_extensions; do
45515  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45516    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45517    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45518    break 2
45519  fi
45520done
45521  done
45522IFS=$as_save_IFS
45523
45524  ;;
45525esac
45526fi
45527BUILD_AR=$ac_cv_path_BUILD_AR
45528if test -n "$BUILD_AR"; then
45529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45530$as_echo "$BUILD_AR" >&6; }
45531else
45532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45533$as_echo "no" >&6; }
45534fi
45535
45536
45537  test -n "$BUILD_AR" && break
45538done
45539
45540  else
45541    # The variable is set, but is it from the command line or the environment?
45542
45543    # Try to remove the string !BUILD_AR! from our list.
45544    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
45545    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45546      # If it failed, the variable was not from the command line. Ignore it,
45547      # but warn the user (except for BASH, which is always set by the calling BASH).
45548      if test "xBUILD_AR" != xBASH; then
45549        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
45550$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
45551      fi
45552      # Try to locate tool using the code snippet
45553      for ac_prog in ar gcc-ar
45554do
45555  # Extract the first word of "$ac_prog", so it can be a program name with args.
45556set dummy $ac_prog; ac_word=$2
45557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45558$as_echo_n "checking for $ac_word... " >&6; }
45559if ${ac_cv_path_BUILD_AR+:} false; then :
45560  $as_echo_n "(cached) " >&6
45561else
45562  case $BUILD_AR in
45563  [\\/]* | ?:[\\/]*)
45564  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45565  ;;
45566  *)
45567  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45568for as_dir in $PATH
45569do
45570  IFS=$as_save_IFS
45571  test -z "$as_dir" && as_dir=.
45572    for ac_exec_ext in '' $ac_executable_extensions; do
45573  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45574    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45575    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45576    break 2
45577  fi
45578done
45579  done
45580IFS=$as_save_IFS
45581
45582  ;;
45583esac
45584fi
45585BUILD_AR=$ac_cv_path_BUILD_AR
45586if test -n "$BUILD_AR"; then
45587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45588$as_echo "$BUILD_AR" >&6; }
45589else
45590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45591$as_echo "no" >&6; }
45592fi
45593
45594
45595  test -n "$BUILD_AR" && break
45596done
45597
45598    else
45599      # If it succeeded, then it was overridden by the user. We will use it
45600      # for the tool.
45601
45602      # First remove it from the list of overridden variables, so we can test
45603      # for unknown variables in the end.
45604      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45605
45606      # Check if we try to supply an empty value
45607      if test "x$BUILD_AR" = x; then
45608        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
45609$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
45610        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45611$as_echo_n "checking for BUILD_AR... " >&6; }
45612        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45613$as_echo "disabled" >&6; }
45614      else
45615        # Check if the provided tool contains a complete path.
45616        tool_specified="$BUILD_AR"
45617        tool_basename="${tool_specified##*/}"
45618        if test "x$tool_basename" = "x$tool_specified"; then
45619          # A command without a complete path is provided, search $PATH.
45620          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
45621$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
45622          # Extract the first word of "$tool_basename", so it can be a program name with args.
45623set dummy $tool_basename; ac_word=$2
45624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45625$as_echo_n "checking for $ac_word... " >&6; }
45626if ${ac_cv_path_BUILD_AR+:} false; then :
45627  $as_echo_n "(cached) " >&6
45628else
45629  case $BUILD_AR in
45630  [\\/]* | ?:[\\/]*)
45631  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45632  ;;
45633  *)
45634  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45635for as_dir in $PATH
45636do
45637  IFS=$as_save_IFS
45638  test -z "$as_dir" && as_dir=.
45639    for ac_exec_ext in '' $ac_executable_extensions; do
45640  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45641    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45642    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45643    break 2
45644  fi
45645done
45646  done
45647IFS=$as_save_IFS
45648
45649  ;;
45650esac
45651fi
45652BUILD_AR=$ac_cv_path_BUILD_AR
45653if test -n "$BUILD_AR"; then
45654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45655$as_echo "$BUILD_AR" >&6; }
45656else
45657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45658$as_echo "no" >&6; }
45659fi
45660
45661
45662          if test "x$BUILD_AR" = x; then
45663            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45664          fi
45665        else
45666          # Otherwise we believe it is a complete path. Use it as it is.
45667          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
45668$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
45669          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45670$as_echo_n "checking for BUILD_AR... " >&6; }
45671          if test ! -x "$tool_specified"; then
45672            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45673$as_echo "not found" >&6; }
45674            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
45675          fi
45676          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45677$as_echo "$tool_specified" >&6; }
45678        fi
45679      fi
45680    fi
45681
45682  fi
45683
45684
45685
45686  # Only process if variable expands to non-empty
45687
45688  if test "x$BUILD_AR" != x; then
45689    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45690
45691  # First separate the path from the arguments. This will split at the first
45692  # space.
45693  complete="$BUILD_AR"
45694  path="${complete%% *}"
45695  tmp="$complete EOL"
45696  arguments="${tmp#* }"
45697
45698  # Input might be given as Windows format, start by converting to
45699  # unix format.
45700  new_path=`$CYGPATH -u "$path"`
45701
45702  # Now try to locate executable using which
45703  new_path=`$WHICH "$new_path" 2> /dev/null`
45704  # bat and cmd files are not always considered executable in cygwin causing which
45705  # to not find them
45706  if test "x$new_path" = x \
45707      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45708      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45709    new_path=`$CYGPATH -u "$path"`
45710  fi
45711  if test "x$new_path" = x; then
45712    # Oops. Which didn't find the executable.
45713    # The splitting of arguments from the executable at a space might have been incorrect,
45714    # since paths with space are more likely in Windows. Give it another try with the whole
45715    # argument.
45716    path="$complete"
45717    arguments="EOL"
45718    new_path=`$CYGPATH -u "$path"`
45719    new_path=`$WHICH "$new_path" 2> /dev/null`
45720    # bat and cmd files are not always considered executable in cygwin causing which
45721    # to not find them
45722    if test "x$new_path" = x \
45723        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45724        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45725      new_path=`$CYGPATH -u "$path"`
45726    fi
45727    if test "x$new_path" = x; then
45728      # It's still not found. Now this is an unrecoverable error.
45729      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45730$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45731      has_space=`$ECHO "$complete" | $GREP " "`
45732      if test "x$has_space" != x; then
45733        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45734$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45735      fi
45736      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45737    fi
45738  fi
45739
45740  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45741  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45742  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45743  # "foo.exe" is OK but "foo" is an error.
45744  #
45745  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45746  # It is also a way to make sure we got the proper file name for the real test later on.
45747  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45748  if test "x$test_shortpath" = x; then
45749    # Short path failed, file does not exist as specified.
45750    # Try adding .exe or .cmd
45751    if test -f "${new_path}.exe"; then
45752      input_to_shortpath="${new_path}.exe"
45753    elif test -f "${new_path}.cmd"; then
45754      input_to_shortpath="${new_path}.cmd"
45755    else
45756      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
45757$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
45758      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45759$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45760      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45761    fi
45762  else
45763    input_to_shortpath="$new_path"
45764  fi
45765
45766  # Call helper function which possibly converts this using DOS-style short mode.
45767  # If so, the updated path is stored in $new_path.
45768  new_path="$input_to_shortpath"
45769
45770  input_path="$input_to_shortpath"
45771  # Check if we need to convert this using DOS-style short mode. If the path
45772  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45773  # take no chances and rewrite it.
45774  # Note: m4 eats our [], so we need to use [ and ] instead.
45775  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45776  if test "x$has_forbidden_chars" != x; then
45777    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45778    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45779    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45780    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45781      # Going to short mode and back again did indeed matter. Since short mode is
45782      # case insensitive, let's make it lowercase to improve readability.
45783      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45784      # Now convert it back to Unix-style (cygpath)
45785      input_path=`$CYGPATH -u "$shortmode_path"`
45786      new_path="$input_path"
45787    fi
45788  fi
45789
45790  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45791  if test "x$test_cygdrive_prefix" = x; then
45792    # As a simple fix, exclude /usr/bin since it's not a real path.
45793    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45794      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45795      # a path prefixed by /cygdrive for fixpath to work.
45796      new_path="$CYGWIN_ROOT_PATH$input_path"
45797    fi
45798  fi
45799
45800  # remove trailing .exe if any
45801  new_path="${new_path/%.exe/}"
45802
45803    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45804
45805  # First separate the path from the arguments. This will split at the first
45806  # space.
45807  complete="$BUILD_AR"
45808  path="${complete%% *}"
45809  tmp="$complete EOL"
45810  arguments="${tmp#* }"
45811
45812  # Input might be given as Windows format, start by converting to
45813  # unix format.
45814  new_path="$path"
45815
45816  windows_path="$new_path"
45817  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45818    unix_path=`$CYGPATH -u "$windows_path"`
45819    new_path="$unix_path"
45820  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45821    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45822    new_path="$unix_path"
45823  fi
45824
45825
45826  # Now try to locate executable using which
45827  new_path=`$WHICH "$new_path" 2> /dev/null`
45828
45829  if test "x$new_path" = x; then
45830    # Oops. Which didn't find the executable.
45831    # The splitting of arguments from the executable at a space might have been incorrect,
45832    # since paths with space are more likely in Windows. Give it another try with the whole
45833    # argument.
45834    path="$complete"
45835    arguments="EOL"
45836    new_path="$path"
45837
45838  windows_path="$new_path"
45839  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45840    unix_path=`$CYGPATH -u "$windows_path"`
45841    new_path="$unix_path"
45842  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45843    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45844    new_path="$unix_path"
45845  fi
45846
45847
45848    new_path=`$WHICH "$new_path" 2> /dev/null`
45849    # bat and cmd files are not always considered executable in MSYS causing which
45850    # to not find them
45851    if test "x$new_path" = x \
45852        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45853        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45854      new_path="$path"
45855
45856  windows_path="$new_path"
45857  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45858    unix_path=`$CYGPATH -u "$windows_path"`
45859    new_path="$unix_path"
45860  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45861    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45862    new_path="$unix_path"
45863  fi
45864
45865    fi
45866
45867    if test "x$new_path" = x; then
45868      # It's still not found. Now this is an unrecoverable error.
45869      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45870$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45871      has_space=`$ECHO "$complete" | $GREP " "`
45872      if test "x$has_space" != x; then
45873        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45874$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45875      fi
45876      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45877    fi
45878  fi
45879
45880  # Now new_path has a complete unix path to the binary
45881  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45882    # Keep paths in /bin as-is, but remove trailing .exe if any
45883    new_path="${new_path/%.exe/}"
45884    # Do not save /bin paths to all_fixpath_prefixes!
45885  else
45886    # Not in mixed or Windows style, start by that.
45887    new_path=`cmd //c echo $new_path`
45888
45889  input_path="$new_path"
45890  # Check if we need to convert this using DOS-style short mode. If the path
45891  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45892  # take no chances and rewrite it.
45893  # Note: m4 eats our [], so we need to use [ and ] instead.
45894  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45895  if test "x$has_forbidden_chars" != x; then
45896    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45897    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45898  fi
45899
45900    # Output is in $new_path
45901
45902  windows_path="$new_path"
45903  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45904    unix_path=`$CYGPATH -u "$windows_path"`
45905    new_path="$unix_path"
45906  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45907    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45908    new_path="$unix_path"
45909  fi
45910
45911    # remove trailing .exe if any
45912    new_path="${new_path/%.exe/}"
45913
45914    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45915    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45916  fi
45917
45918    else
45919      # We're on a unix platform. Hooray! :)
45920      # First separate the path from the arguments. This will split at the first
45921      # space.
45922      complete="$BUILD_AR"
45923      path="${complete%% *}"
45924      tmp="$complete EOL"
45925      arguments="${tmp#* }"
45926
45927      # Cannot rely on the command "which" here since it doesn't always work.
45928      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45929      if test -z "$is_absolute_path"; then
45930        # Path to executable is not absolute. Find it.
45931        IFS_save="$IFS"
45932        IFS=:
45933        for p in $PATH; do
45934          if test -f "$p/$path" && test -x "$p/$path"; then
45935            new_path="$p/$path"
45936            break
45937          fi
45938        done
45939        IFS="$IFS_save"
45940      else
45941        # This is an absolute path, we can use it without further modifications.
45942        new_path="$path"
45943      fi
45944
45945      if test "x$new_path" = x; then
45946        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45947$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45948        has_space=`$ECHO "$complete" | $GREP " "`
45949        if test "x$has_space" != x; then
45950          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45951$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45952        fi
45953        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45954      fi
45955    fi
45956
45957    # Now join together the path and the arguments once again
45958    if test "x$arguments" != xEOL; then
45959      new_complete="$new_path ${arguments% *}"
45960    else
45961      new_complete="$new_path"
45962    fi
45963
45964    if test "x$complete" != "x$new_complete"; then
45965      BUILD_AR="$new_complete"
45966      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
45967$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
45968    fi
45969  fi
45970
45971
45972
45973  # Publish this variable in the help.
45974
45975
45976  if [ -z "${BUILD_OBJCOPY+x}" ]; then
45977    # The variable is not set by user, try to locate tool using the code snippet
45978    for ac_prog in objcopy
45979do
45980  # Extract the first word of "$ac_prog", so it can be a program name with args.
45981set dummy $ac_prog; ac_word=$2
45982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45983$as_echo_n "checking for $ac_word... " >&6; }
45984if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
45985  $as_echo_n "(cached) " >&6
45986else
45987  case $BUILD_OBJCOPY in
45988  [\\/]* | ?:[\\/]*)
45989  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
45990  ;;
45991  *)
45992  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45993for as_dir in $PATH
45994do
45995  IFS=$as_save_IFS
45996  test -z "$as_dir" && as_dir=.
45997    for ac_exec_ext in '' $ac_executable_extensions; do
45998  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45999    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46000    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46001    break 2
46002  fi
46003done
46004  done
46005IFS=$as_save_IFS
46006
46007  ;;
46008esac
46009fi
46010BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46011if test -n "$BUILD_OBJCOPY"; then
46012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46013$as_echo "$BUILD_OBJCOPY" >&6; }
46014else
46015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46016$as_echo "no" >&6; }
46017fi
46018
46019
46020  test -n "$BUILD_OBJCOPY" && break
46021done
46022
46023  else
46024    # The variable is set, but is it from the command line or the environment?
46025
46026    # Try to remove the string !BUILD_OBJCOPY! from our list.
46027    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
46028    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46029      # If it failed, the variable was not from the command line. Ignore it,
46030      # but warn the user (except for BASH, which is always set by the calling BASH).
46031      if test "xBUILD_OBJCOPY" != xBASH; then
46032        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
46033$as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
46034      fi
46035      # Try to locate tool using the code snippet
46036      for ac_prog in objcopy
46037do
46038  # Extract the first word of "$ac_prog", so it can be a program name with args.
46039set dummy $ac_prog; ac_word=$2
46040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46041$as_echo_n "checking for $ac_word... " >&6; }
46042if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46043  $as_echo_n "(cached) " >&6
46044else
46045  case $BUILD_OBJCOPY in
46046  [\\/]* | ?:[\\/]*)
46047  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46048  ;;
46049  *)
46050  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46051for as_dir in $PATH
46052do
46053  IFS=$as_save_IFS
46054  test -z "$as_dir" && as_dir=.
46055    for ac_exec_ext in '' $ac_executable_extensions; do
46056  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46057    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46058    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46059    break 2
46060  fi
46061done
46062  done
46063IFS=$as_save_IFS
46064
46065  ;;
46066esac
46067fi
46068BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46069if test -n "$BUILD_OBJCOPY"; then
46070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46071$as_echo "$BUILD_OBJCOPY" >&6; }
46072else
46073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46074$as_echo "no" >&6; }
46075fi
46076
46077
46078  test -n "$BUILD_OBJCOPY" && break
46079done
46080
46081    else
46082      # If it succeeded, then it was overridden by the user. We will use it
46083      # for the tool.
46084
46085      # First remove it from the list of overridden variables, so we can test
46086      # for unknown variables in the end.
46087      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46088
46089      # Check if we try to supply an empty value
46090      if test "x$BUILD_OBJCOPY" = x; then
46091        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
46092$as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
46093        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46094$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46095        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46096$as_echo "disabled" >&6; }
46097      else
46098        # Check if the provided tool contains a complete path.
46099        tool_specified="$BUILD_OBJCOPY"
46100        tool_basename="${tool_specified##*/}"
46101        if test "x$tool_basename" = "x$tool_specified"; then
46102          # A command without a complete path is provided, search $PATH.
46103          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
46104$as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
46105          # Extract the first word of "$tool_basename", so it can be a program name with args.
46106set dummy $tool_basename; ac_word=$2
46107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46108$as_echo_n "checking for $ac_word... " >&6; }
46109if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46110  $as_echo_n "(cached) " >&6
46111else
46112  case $BUILD_OBJCOPY in
46113  [\\/]* | ?:[\\/]*)
46114  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46115  ;;
46116  *)
46117  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46118for as_dir in $PATH
46119do
46120  IFS=$as_save_IFS
46121  test -z "$as_dir" && as_dir=.
46122    for ac_exec_ext in '' $ac_executable_extensions; do
46123  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46124    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46125    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46126    break 2
46127  fi
46128done
46129  done
46130IFS=$as_save_IFS
46131
46132  ;;
46133esac
46134fi
46135BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46136if test -n "$BUILD_OBJCOPY"; then
46137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46138$as_echo "$BUILD_OBJCOPY" >&6; }
46139else
46140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46141$as_echo "no" >&6; }
46142fi
46143
46144
46145          if test "x$BUILD_OBJCOPY" = x; then
46146            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46147          fi
46148        else
46149          # Otherwise we believe it is a complete path. Use it as it is.
46150          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
46151$as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
46152          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46153$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46154          if test ! -x "$tool_specified"; then
46155            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46156$as_echo "not found" >&6; }
46157            as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
46158          fi
46159          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46160$as_echo "$tool_specified" >&6; }
46161        fi
46162      fi
46163    fi
46164
46165  fi
46166
46167
46168
46169  # Only process if variable expands to non-empty
46170
46171  if test "x$BUILD_OBJCOPY" != x; then
46172    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46173
46174  # First separate the path from the arguments. This will split at the first
46175  # space.
46176  complete="$BUILD_OBJCOPY"
46177  path="${complete%% *}"
46178  tmp="$complete EOL"
46179  arguments="${tmp#* }"
46180
46181  # Input might be given as Windows format, start by converting to
46182  # unix format.
46183  new_path=`$CYGPATH -u "$path"`
46184
46185  # Now try to locate executable using which
46186  new_path=`$WHICH "$new_path" 2> /dev/null`
46187  # bat and cmd files are not always considered executable in cygwin causing which
46188  # to not find them
46189  if test "x$new_path" = x \
46190      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46191      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46192    new_path=`$CYGPATH -u "$path"`
46193  fi
46194  if test "x$new_path" = x; then
46195    # Oops. Which didn't find the executable.
46196    # The splitting of arguments from the executable at a space might have been incorrect,
46197    # since paths with space are more likely in Windows. Give it another try with the whole
46198    # argument.
46199    path="$complete"
46200    arguments="EOL"
46201    new_path=`$CYGPATH -u "$path"`
46202    new_path=`$WHICH "$new_path" 2> /dev/null`
46203    # bat and cmd files are not always considered executable in cygwin causing which
46204    # to not find them
46205    if test "x$new_path" = x \
46206        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46207        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46208      new_path=`$CYGPATH -u "$path"`
46209    fi
46210    if test "x$new_path" = x; then
46211      # It's still not found. Now this is an unrecoverable error.
46212      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46213$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46214      has_space=`$ECHO "$complete" | $GREP " "`
46215      if test "x$has_space" != x; then
46216        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46217$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46218      fi
46219      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46220    fi
46221  fi
46222
46223  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46224  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46225  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46226  # "foo.exe" is OK but "foo" is an error.
46227  #
46228  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46229  # It is also a way to make sure we got the proper file name for the real test later on.
46230  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46231  if test "x$test_shortpath" = x; then
46232    # Short path failed, file does not exist as specified.
46233    # Try adding .exe or .cmd
46234    if test -f "${new_path}.exe"; then
46235      input_to_shortpath="${new_path}.exe"
46236    elif test -f "${new_path}.cmd"; then
46237      input_to_shortpath="${new_path}.cmd"
46238    else
46239      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
46240$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
46241      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46242$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46243      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46244    fi
46245  else
46246    input_to_shortpath="$new_path"
46247  fi
46248
46249  # Call helper function which possibly converts this using DOS-style short mode.
46250  # If so, the updated path is stored in $new_path.
46251  new_path="$input_to_shortpath"
46252
46253  input_path="$input_to_shortpath"
46254  # Check if we need to convert this using DOS-style short mode. If the path
46255  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46256  # take no chances and rewrite it.
46257  # Note: m4 eats our [], so we need to use [ and ] instead.
46258  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46259  if test "x$has_forbidden_chars" != x; then
46260    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46261    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46262    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46263    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46264      # Going to short mode and back again did indeed matter. Since short mode is
46265      # case insensitive, let's make it lowercase to improve readability.
46266      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46267      # Now convert it back to Unix-style (cygpath)
46268      input_path=`$CYGPATH -u "$shortmode_path"`
46269      new_path="$input_path"
46270    fi
46271  fi
46272
46273  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46274  if test "x$test_cygdrive_prefix" = x; then
46275    # As a simple fix, exclude /usr/bin since it's not a real path.
46276    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46277      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46278      # a path prefixed by /cygdrive for fixpath to work.
46279      new_path="$CYGWIN_ROOT_PATH$input_path"
46280    fi
46281  fi
46282
46283  # remove trailing .exe if any
46284  new_path="${new_path/%.exe/}"
46285
46286    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46287
46288  # First separate the path from the arguments. This will split at the first
46289  # space.
46290  complete="$BUILD_OBJCOPY"
46291  path="${complete%% *}"
46292  tmp="$complete EOL"
46293  arguments="${tmp#* }"
46294
46295  # Input might be given as Windows format, start by converting to
46296  # unix format.
46297  new_path="$path"
46298
46299  windows_path="$new_path"
46300  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46301    unix_path=`$CYGPATH -u "$windows_path"`
46302    new_path="$unix_path"
46303  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46304    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46305    new_path="$unix_path"
46306  fi
46307
46308
46309  # Now try to locate executable using which
46310  new_path=`$WHICH "$new_path" 2> /dev/null`
46311
46312  if test "x$new_path" = x; then
46313    # Oops. Which didn't find the executable.
46314    # The splitting of arguments from the executable at a space might have been incorrect,
46315    # since paths with space are more likely in Windows. Give it another try with the whole
46316    # argument.
46317    path="$complete"
46318    arguments="EOL"
46319    new_path="$path"
46320
46321  windows_path="$new_path"
46322  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46323    unix_path=`$CYGPATH -u "$windows_path"`
46324    new_path="$unix_path"
46325  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46326    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46327    new_path="$unix_path"
46328  fi
46329
46330
46331    new_path=`$WHICH "$new_path" 2> /dev/null`
46332    # bat and cmd files are not always considered executable in MSYS causing which
46333    # to not find them
46334    if test "x$new_path" = x \
46335        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46336        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46337      new_path="$path"
46338
46339  windows_path="$new_path"
46340  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46341    unix_path=`$CYGPATH -u "$windows_path"`
46342    new_path="$unix_path"
46343  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46344    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46345    new_path="$unix_path"
46346  fi
46347
46348    fi
46349
46350    if test "x$new_path" = x; then
46351      # It's still not found. Now this is an unrecoverable error.
46352      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46353$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46354      has_space=`$ECHO "$complete" | $GREP " "`
46355      if test "x$has_space" != x; then
46356        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46357$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46358      fi
46359      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46360    fi
46361  fi
46362
46363  # Now new_path has a complete unix path to the binary
46364  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46365    # Keep paths in /bin as-is, but remove trailing .exe if any
46366    new_path="${new_path/%.exe/}"
46367    # Do not save /bin paths to all_fixpath_prefixes!
46368  else
46369    # Not in mixed or Windows style, start by that.
46370    new_path=`cmd //c echo $new_path`
46371
46372  input_path="$new_path"
46373  # Check if we need to convert this using DOS-style short mode. If the path
46374  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46375  # take no chances and rewrite it.
46376  # Note: m4 eats our [], so we need to use [ and ] instead.
46377  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46378  if test "x$has_forbidden_chars" != x; then
46379    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46380    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46381  fi
46382
46383    # Output is in $new_path
46384
46385  windows_path="$new_path"
46386  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46387    unix_path=`$CYGPATH -u "$windows_path"`
46388    new_path="$unix_path"
46389  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46390    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46391    new_path="$unix_path"
46392  fi
46393
46394    # remove trailing .exe if any
46395    new_path="${new_path/%.exe/}"
46396
46397    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46398    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46399  fi
46400
46401    else
46402      # We're on a unix platform. Hooray! :)
46403      # First separate the path from the arguments. This will split at the first
46404      # space.
46405      complete="$BUILD_OBJCOPY"
46406      path="${complete%% *}"
46407      tmp="$complete EOL"
46408      arguments="${tmp#* }"
46409
46410      # Cannot rely on the command "which" here since it doesn't always work.
46411      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46412      if test -z "$is_absolute_path"; then
46413        # Path to executable is not absolute. Find it.
46414        IFS_save="$IFS"
46415        IFS=:
46416        for p in $PATH; do
46417          if test -f "$p/$path" && test -x "$p/$path"; then
46418            new_path="$p/$path"
46419            break
46420          fi
46421        done
46422        IFS="$IFS_save"
46423      else
46424        # This is an absolute path, we can use it without further modifications.
46425        new_path="$path"
46426      fi
46427
46428      if test "x$new_path" = x; then
46429        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46430$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46431        has_space=`$ECHO "$complete" | $GREP " "`
46432        if test "x$has_space" != x; then
46433          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46434$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46435        fi
46436        as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46437      fi
46438    fi
46439
46440    # Now join together the path and the arguments once again
46441    if test "x$arguments" != xEOL; then
46442      new_complete="$new_path ${arguments% *}"
46443    else
46444      new_complete="$new_path"
46445    fi
46446
46447    if test "x$complete" != "x$new_complete"; then
46448      BUILD_OBJCOPY="$new_complete"
46449      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
46450$as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
46451    fi
46452  fi
46453
46454
46455
46456  # Publish this variable in the help.
46457
46458
46459  if [ -z "${BUILD_STRIP+x}" ]; then
46460    # The variable is not set by user, try to locate tool using the code snippet
46461    for ac_prog in strip
46462do
46463  # Extract the first word of "$ac_prog", so it can be a program name with args.
46464set dummy $ac_prog; ac_word=$2
46465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46466$as_echo_n "checking for $ac_word... " >&6; }
46467if ${ac_cv_path_BUILD_STRIP+:} false; then :
46468  $as_echo_n "(cached) " >&6
46469else
46470  case $BUILD_STRIP in
46471  [\\/]* | ?:[\\/]*)
46472  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46473  ;;
46474  *)
46475  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46476for as_dir in $PATH
46477do
46478  IFS=$as_save_IFS
46479  test -z "$as_dir" && as_dir=.
46480    for ac_exec_ext in '' $ac_executable_extensions; do
46481  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46482    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46483    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46484    break 2
46485  fi
46486done
46487  done
46488IFS=$as_save_IFS
46489
46490  ;;
46491esac
46492fi
46493BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46494if test -n "$BUILD_STRIP"; then
46495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46496$as_echo "$BUILD_STRIP" >&6; }
46497else
46498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46499$as_echo "no" >&6; }
46500fi
46501
46502
46503  test -n "$BUILD_STRIP" && break
46504done
46505
46506  else
46507    # The variable is set, but is it from the command line or the environment?
46508
46509    # Try to remove the string !BUILD_STRIP! from our list.
46510    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
46511    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46512      # If it failed, the variable was not from the command line. Ignore it,
46513      # but warn the user (except for BASH, which is always set by the calling BASH).
46514      if test "xBUILD_STRIP" != xBASH; then
46515        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
46516$as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
46517      fi
46518      # Try to locate tool using the code snippet
46519      for ac_prog in strip
46520do
46521  # Extract the first word of "$ac_prog", so it can be a program name with args.
46522set dummy $ac_prog; ac_word=$2
46523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46524$as_echo_n "checking for $ac_word... " >&6; }
46525if ${ac_cv_path_BUILD_STRIP+:} false; then :
46526  $as_echo_n "(cached) " >&6
46527else
46528  case $BUILD_STRIP in
46529  [\\/]* | ?:[\\/]*)
46530  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46531  ;;
46532  *)
46533  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46534for as_dir in $PATH
46535do
46536  IFS=$as_save_IFS
46537  test -z "$as_dir" && as_dir=.
46538    for ac_exec_ext in '' $ac_executable_extensions; do
46539  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46540    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46541    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46542    break 2
46543  fi
46544done
46545  done
46546IFS=$as_save_IFS
46547
46548  ;;
46549esac
46550fi
46551BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46552if test -n "$BUILD_STRIP"; then
46553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46554$as_echo "$BUILD_STRIP" >&6; }
46555else
46556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46557$as_echo "no" >&6; }
46558fi
46559
46560
46561  test -n "$BUILD_STRIP" && break
46562done
46563
46564    else
46565      # If it succeeded, then it was overridden by the user. We will use it
46566      # for the tool.
46567
46568      # First remove it from the list of overridden variables, so we can test
46569      # for unknown variables in the end.
46570      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46571
46572      # Check if we try to supply an empty value
46573      if test "x$BUILD_STRIP" = x; then
46574        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
46575$as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
46576        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46577$as_echo_n "checking for BUILD_STRIP... " >&6; }
46578        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46579$as_echo "disabled" >&6; }
46580      else
46581        # Check if the provided tool contains a complete path.
46582        tool_specified="$BUILD_STRIP"
46583        tool_basename="${tool_specified##*/}"
46584        if test "x$tool_basename" = "x$tool_specified"; then
46585          # A command without a complete path is provided, search $PATH.
46586          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
46587$as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
46588          # Extract the first word of "$tool_basename", so it can be a program name with args.
46589set dummy $tool_basename; ac_word=$2
46590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46591$as_echo_n "checking for $ac_word... " >&6; }
46592if ${ac_cv_path_BUILD_STRIP+:} false; then :
46593  $as_echo_n "(cached) " >&6
46594else
46595  case $BUILD_STRIP in
46596  [\\/]* | ?:[\\/]*)
46597  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46598  ;;
46599  *)
46600  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46601for as_dir in $PATH
46602do
46603  IFS=$as_save_IFS
46604  test -z "$as_dir" && as_dir=.
46605    for ac_exec_ext in '' $ac_executable_extensions; do
46606  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46607    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46608    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46609    break 2
46610  fi
46611done
46612  done
46613IFS=$as_save_IFS
46614
46615  ;;
46616esac
46617fi
46618BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46619if test -n "$BUILD_STRIP"; then
46620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46621$as_echo "$BUILD_STRIP" >&6; }
46622else
46623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46624$as_echo "no" >&6; }
46625fi
46626
46627
46628          if test "x$BUILD_STRIP" = x; then
46629            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46630          fi
46631        else
46632          # Otherwise we believe it is a complete path. Use it as it is.
46633          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
46634$as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
46635          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46636$as_echo_n "checking for BUILD_STRIP... " >&6; }
46637          if test ! -x "$tool_specified"; then
46638            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46639$as_echo "not found" >&6; }
46640            as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
46641          fi
46642          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46643$as_echo "$tool_specified" >&6; }
46644        fi
46645      fi
46646    fi
46647
46648  fi
46649
46650
46651
46652  # Only process if variable expands to non-empty
46653
46654  if test "x$BUILD_STRIP" != x; then
46655    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46656
46657  # First separate the path from the arguments. This will split at the first
46658  # space.
46659  complete="$BUILD_STRIP"
46660  path="${complete%% *}"
46661  tmp="$complete EOL"
46662  arguments="${tmp#* }"
46663
46664  # Input might be given as Windows format, start by converting to
46665  # unix format.
46666  new_path=`$CYGPATH -u "$path"`
46667
46668  # Now try to locate executable using which
46669  new_path=`$WHICH "$new_path" 2> /dev/null`
46670  # bat and cmd files are not always considered executable in cygwin causing which
46671  # to not find them
46672  if test "x$new_path" = x \
46673      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46674      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46675    new_path=`$CYGPATH -u "$path"`
46676  fi
46677  if test "x$new_path" = x; then
46678    # Oops. Which didn't find the executable.
46679    # The splitting of arguments from the executable at a space might have been incorrect,
46680    # since paths with space are more likely in Windows. Give it another try with the whole
46681    # argument.
46682    path="$complete"
46683    arguments="EOL"
46684    new_path=`$CYGPATH -u "$path"`
46685    new_path=`$WHICH "$new_path" 2> /dev/null`
46686    # bat and cmd files are not always considered executable in cygwin causing which
46687    # to not find them
46688    if test "x$new_path" = x \
46689        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46690        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46691      new_path=`$CYGPATH -u "$path"`
46692    fi
46693    if test "x$new_path" = x; then
46694      # It's still not found. Now this is an unrecoverable error.
46695      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46696$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46697      has_space=`$ECHO "$complete" | $GREP " "`
46698      if test "x$has_space" != x; then
46699        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46700$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46701      fi
46702      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46703    fi
46704  fi
46705
46706  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46707  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46708  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46709  # "foo.exe" is OK but "foo" is an error.
46710  #
46711  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46712  # It is also a way to make sure we got the proper file name for the real test later on.
46713  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46714  if test "x$test_shortpath" = x; then
46715    # Short path failed, file does not exist as specified.
46716    # Try adding .exe or .cmd
46717    if test -f "${new_path}.exe"; then
46718      input_to_shortpath="${new_path}.exe"
46719    elif test -f "${new_path}.cmd"; then
46720      input_to_shortpath="${new_path}.cmd"
46721    else
46722      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
46723$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
46724      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46725$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46726      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46727    fi
46728  else
46729    input_to_shortpath="$new_path"
46730  fi
46731
46732  # Call helper function which possibly converts this using DOS-style short mode.
46733  # If so, the updated path is stored in $new_path.
46734  new_path="$input_to_shortpath"
46735
46736  input_path="$input_to_shortpath"
46737  # Check if we need to convert this using DOS-style short mode. If the path
46738  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46739  # take no chances and rewrite it.
46740  # Note: m4 eats our [], so we need to use [ and ] instead.
46741  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46742  if test "x$has_forbidden_chars" != x; then
46743    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46744    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46745    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46746    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46747      # Going to short mode and back again did indeed matter. Since short mode is
46748      # case insensitive, let's make it lowercase to improve readability.
46749      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46750      # Now convert it back to Unix-style (cygpath)
46751      input_path=`$CYGPATH -u "$shortmode_path"`
46752      new_path="$input_path"
46753    fi
46754  fi
46755
46756  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46757  if test "x$test_cygdrive_prefix" = x; then
46758    # As a simple fix, exclude /usr/bin since it's not a real path.
46759    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46760      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46761      # a path prefixed by /cygdrive for fixpath to work.
46762      new_path="$CYGWIN_ROOT_PATH$input_path"
46763    fi
46764  fi
46765
46766  # remove trailing .exe if any
46767  new_path="${new_path/%.exe/}"
46768
46769    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46770
46771  # First separate the path from the arguments. This will split at the first
46772  # space.
46773  complete="$BUILD_STRIP"
46774  path="${complete%% *}"
46775  tmp="$complete EOL"
46776  arguments="${tmp#* }"
46777
46778  # Input might be given as Windows format, start by converting to
46779  # unix format.
46780  new_path="$path"
46781
46782  windows_path="$new_path"
46783  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46784    unix_path=`$CYGPATH -u "$windows_path"`
46785    new_path="$unix_path"
46786  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46787    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46788    new_path="$unix_path"
46789  fi
46790
46791
46792  # Now try to locate executable using which
46793  new_path=`$WHICH "$new_path" 2> /dev/null`
46794
46795  if test "x$new_path" = x; then
46796    # Oops. Which didn't find the executable.
46797    # The splitting of arguments from the executable at a space might have been incorrect,
46798    # since paths with space are more likely in Windows. Give it another try with the whole
46799    # argument.
46800    path="$complete"
46801    arguments="EOL"
46802    new_path="$path"
46803
46804  windows_path="$new_path"
46805  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46806    unix_path=`$CYGPATH -u "$windows_path"`
46807    new_path="$unix_path"
46808  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46809    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46810    new_path="$unix_path"
46811  fi
46812
46813
46814    new_path=`$WHICH "$new_path" 2> /dev/null`
46815    # bat and cmd files are not always considered executable in MSYS causing which
46816    # to not find them
46817    if test "x$new_path" = x \
46818        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46819        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46820      new_path="$path"
46821
46822  windows_path="$new_path"
46823  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46824    unix_path=`$CYGPATH -u "$windows_path"`
46825    new_path="$unix_path"
46826  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46827    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46828    new_path="$unix_path"
46829  fi
46830
46831    fi
46832
46833    if test "x$new_path" = x; then
46834      # It's still not found. Now this is an unrecoverable error.
46835      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46836$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46837      has_space=`$ECHO "$complete" | $GREP " "`
46838      if test "x$has_space" != x; then
46839        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46840$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46841      fi
46842      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46843    fi
46844  fi
46845
46846  # Now new_path has a complete unix path to the binary
46847  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46848    # Keep paths in /bin as-is, but remove trailing .exe if any
46849    new_path="${new_path/%.exe/}"
46850    # Do not save /bin paths to all_fixpath_prefixes!
46851  else
46852    # Not in mixed or Windows style, start by that.
46853    new_path=`cmd //c echo $new_path`
46854
46855  input_path="$new_path"
46856  # Check if we need to convert this using DOS-style short mode. If the path
46857  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46858  # take no chances and rewrite it.
46859  # Note: m4 eats our [], so we need to use [ and ] instead.
46860  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46861  if test "x$has_forbidden_chars" != x; then
46862    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46863    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46864  fi
46865
46866    # Output is in $new_path
46867
46868  windows_path="$new_path"
46869  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46870    unix_path=`$CYGPATH -u "$windows_path"`
46871    new_path="$unix_path"
46872  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46873    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46874    new_path="$unix_path"
46875  fi
46876
46877    # remove trailing .exe if any
46878    new_path="${new_path/%.exe/}"
46879
46880    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46881    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46882  fi
46883
46884    else
46885      # We're on a unix platform. Hooray! :)
46886      # First separate the path from the arguments. This will split at the first
46887      # space.
46888      complete="$BUILD_STRIP"
46889      path="${complete%% *}"
46890      tmp="$complete EOL"
46891      arguments="${tmp#* }"
46892
46893      # Cannot rely on the command "which" here since it doesn't always work.
46894      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46895      if test -z "$is_absolute_path"; then
46896        # Path to executable is not absolute. Find it.
46897        IFS_save="$IFS"
46898        IFS=:
46899        for p in $PATH; do
46900          if test -f "$p/$path" && test -x "$p/$path"; then
46901            new_path="$p/$path"
46902            break
46903          fi
46904        done
46905        IFS="$IFS_save"
46906      else
46907        # This is an absolute path, we can use it without further modifications.
46908        new_path="$path"
46909      fi
46910
46911      if test "x$new_path" = x; then
46912        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46913$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46914        has_space=`$ECHO "$complete" | $GREP " "`
46915        if test "x$has_space" != x; then
46916          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46917$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46918        fi
46919        as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46920      fi
46921    fi
46922
46923    # Now join together the path and the arguments once again
46924    if test "x$arguments" != xEOL; then
46925      new_complete="$new_path ${arguments% *}"
46926    else
46927      new_complete="$new_path"
46928    fi
46929
46930    if test "x$complete" != "x$new_complete"; then
46931      BUILD_STRIP="$new_complete"
46932      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
46933$as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
46934    fi
46935  fi
46936
46937    # Assume the C compiler is the assembler
46938    BUILD_AS="$BUILD_CC -c"
46939    # Just like for the target compiler, use the compiler as linker
46940    BUILD_LD="$BUILD_CC"
46941    BUILD_LDCXX="$BUILD_CXX"
46942
46943    PATH="$OLDPATH"
46944
46945
46946  COMPILER=$BUILD_CC
46947  COMPILER_NAME=BuildC
46948
46949  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46950    # cc -V output typically looks like
46951    #     cc: Sun C 5.12 Linux_i386 2011/11/16
46952    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
46953    # Check that this is likely to be the Solaris Studio cc.
46954    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
46955    if test $? -ne 0; then
46956      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46957      { $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
46958$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46959      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46960$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
46961      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
46962$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
46963      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46964    fi
46965    # Remove usage instructions (if present), and
46966    # collapse compiler output into a single line
46967    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
46968        $SED -e 's/ *[Uu]sage:.*//'`
46969    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
46970        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
46971  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
46972    # xlc -qversion output typically looks like
46973    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
46974    #     Version: 11.01.0000.0015
46975    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
46976    # Check that this is likely to be the IBM XL C compiler.
46977    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
46978    if test $? -ne 0; then
46979      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46980      { $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
46981$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46982      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46983$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
46984      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
46985$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
46986      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46987    fi
46988    # Collapse compiler output into a single line
46989    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
46990    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
46991        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
46992  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46993    # There is no specific version flag, but all output starts with a version string.
46994    # First line typically looks something like:
46995    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
46996    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
46997    # Check that this is likely to be Microsoft CL.EXE.
46998    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
46999    if test $? -ne 0; then
47000      { $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
47001$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47002      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47003$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47004      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47005    fi
47006    # Collapse compiler output into a single line
47007    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47008    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47009        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47010  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47011    # gcc --version output typically looks like
47012    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47013    #     Copyright (C) 2013 Free Software Foundation, Inc.
47014    #     This is free software; see the source for copying conditions.  There is NO
47015    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47016    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47017    # Check that this is likely to be GCC.
47018    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47019    if test $? -ne 0; then
47020      { $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
47021$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47022      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47023$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47024      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47025    fi
47026    # Remove Copyright and legalese from version string, and
47027    # collapse into a single line
47028    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47029        $SED -e 's/ *Copyright .*//'`
47030    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47031        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47032  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47033    # clang --version output typically looks like
47034    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47035    #    clang version 3.3 (tags/RELEASE_33/final)
47036    # or
47037    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47038    #    Target: x86_64-pc-linux-gnu
47039    #    Thread model: posix
47040    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47041    # Check that this is likely to be clang
47042    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47043    if test $? -ne 0; then
47044      { $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
47045$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47046      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47047$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47048      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47049    fi
47050    # Collapse compiler output into a single line
47051    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47052    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47053        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47054  else
47055      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47056  fi
47057  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47058  BUILD_CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47059  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47060  BUILD_CC_VERSION_STRING="$COMPILER_VERSION_STRING"
47061
47062  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47063$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47064
47065
47066  COMPILER=$BUILD_CXX
47067  COMPILER_NAME=BuildC++
47068
47069  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47070    # cc -V output typically looks like
47071    #     cc: Sun C 5.12 Linux_i386 2011/11/16
47072    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47073    # Check that this is likely to be the Solaris Studio cc.
47074    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
47075    if test $? -ne 0; then
47076      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47077      { $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
47078$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47079      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47080$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47081      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47082$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47083      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47084    fi
47085    # Remove usage instructions (if present), and
47086    # collapse compiler output into a single line
47087    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47088        $SED -e 's/ *[Uu]sage:.*//'`
47089    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47090        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47091  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47092    # xlc -qversion output typically looks like
47093    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47094    #     Version: 11.01.0000.0015
47095    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47096    # Check that this is likely to be the IBM XL C compiler.
47097    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47098    if test $? -ne 0; then
47099      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47100      { $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
47101$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47102      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47103$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47104      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47105$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47106      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47107    fi
47108    # Collapse compiler output into a single line
47109    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47110    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47111        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47112  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47113    # There is no specific version flag, but all output starts with a version string.
47114    # First line typically looks something like:
47115    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47116    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47117    # Check that this is likely to be Microsoft CL.EXE.
47118    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47119    if test $? -ne 0; then
47120      { $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
47121$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47122      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47123$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47124      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47125    fi
47126    # Collapse compiler output into a single line
47127    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47128    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47129        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47130  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47131    # gcc --version output typically looks like
47132    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47133    #     Copyright (C) 2013 Free Software Foundation, Inc.
47134    #     This is free software; see the source for copying conditions.  There is NO
47135    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47136    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47137    # Check that this is likely to be GCC.
47138    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47139    if test $? -ne 0; then
47140      { $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
47141$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47142      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47143$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47144      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47145    fi
47146    # Remove Copyright and legalese from version string, and
47147    # collapse into a single line
47148    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47149        $SED -e 's/ *Copyright .*//'`
47150    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47151        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47152  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47153    # clang --version output typically looks like
47154    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47155    #    clang version 3.3 (tags/RELEASE_33/final)
47156    # or
47157    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47158    #    Target: x86_64-pc-linux-gnu
47159    #    Thread model: posix
47160    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47161    # Check that this is likely to be clang
47162    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47163    if test $? -ne 0; then
47164      { $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
47165$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47166      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47167$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47168      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47169    fi
47170    # Collapse compiler output into a single line
47171    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47172    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47173        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47174  else
47175      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47176  fi
47177  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47178  BUILD_CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47179  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47180  BUILD_CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
47181
47182  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47183$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47184
47185
47186  if test "x$BUILD_CC_VERSION_NUMBER" != "x$BUILD_CXX_VERSION_NUMBER"; then
47187    { $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
47188$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&2;}
47189    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47190$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47191  fi
47192
47193  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47194  if  [[ "[$]BUILD_CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
47195    { $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
47196$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;}
47197  fi
47198
47199  if  [[  "[$]BUILD_CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47200    { $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
47201$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47202  fi
47203
47204  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$BUILD_CC_VERSION_NUMBER"`
47205
47206  else
47207    # If we are not cross compiling, use the normal target compilers for
47208    # building the build platform executables.
47209    BUILD_CC="$CC"
47210    BUILD_CXX="$CXX"
47211    BUILD_LD="$LD"
47212    BUILD_LDCXX="$LDCXX"
47213    BUILD_NM="$NM"
47214    BUILD_AS="$AS"
47215    BUILD_OBJCOPY="$OBJCOPY"
47216    BUILD_STRIP="$STRIP"
47217    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
47218    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
47219    BUILD_AR="$AR"
47220
47221
47222  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
47223    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
47224$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
47225    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47226$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47227  fi
47228
47229  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47230  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
47231    { $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
47232$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;}
47233  fi
47234
47235  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47236    { $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
47237$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47238  fi
47239
47240  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$CC_VERSION_NUMBER"`
47241
47242  fi
47243
47244
47245
47246
47247
47248
47249
47250
47251
47252
47253
47254
47255  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47256    # For hotspot, we need these in Windows mixed path,
47257    # so rewrite them all. Need added .exe suffix.
47258    HOTSPOT_CXX="$CXX.exe"
47259    HOTSPOT_LD="$LD.exe"
47260    HOTSPOT_MT="$MT.exe"
47261    HOTSPOT_RC="$RC.exe"
47262
47263  unix_path="$HOTSPOT_CXX"
47264  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47265    windows_path=`$CYGPATH -m "$unix_path"`
47266    HOTSPOT_CXX="$windows_path"
47267  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47268    windows_path=`cmd //c echo $unix_path`
47269    HOTSPOT_CXX="$windows_path"
47270  fi
47271
47272
47273  unix_path="$HOTSPOT_LD"
47274  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47275    windows_path=`$CYGPATH -m "$unix_path"`
47276    HOTSPOT_LD="$windows_path"
47277  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47278    windows_path=`cmd //c echo $unix_path`
47279    HOTSPOT_LD="$windows_path"
47280  fi
47281
47282
47283  unix_path="$HOTSPOT_MT"
47284  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47285    windows_path=`$CYGPATH -m "$unix_path"`
47286    HOTSPOT_MT="$windows_path"
47287  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47288    windows_path=`cmd //c echo $unix_path`
47289    HOTSPOT_MT="$windows_path"
47290  fi
47291
47292
47293  unix_path="$HOTSPOT_RC"
47294  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47295    windows_path=`$CYGPATH -m "$unix_path"`
47296    HOTSPOT_RC="$windows_path"
47297  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47298    windows_path=`cmd //c echo $unix_path`
47299    HOTSPOT_RC="$windows_path"
47300  fi
47301
47302
47303
47304  else
47305    HOTSPOT_CXX="$CXX"
47306    HOTSPOT_LD="$LD"
47307  fi
47308
47309
47310
47311  if test  "x$TOOLCHAIN_TYPE" = xclang; then
47312    USE_CLANG=true
47313  fi
47314
47315
47316
47317
47318
47319  # The package path is used only on macosx?
47320  # FIXME: clean this up, and/or move it elsewhere.
47321  PACKAGE_PATH=/opt/local
47322
47323
47324  # Check for extra potential brokenness.
47325  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47326    # On Windows, double-check that we got the right compiler.
47327    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47328    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
47329    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
47330      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
47331        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
47332      fi
47333    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
47334      if test "x$COMPILER_CPU_TEST" != "xx64"; then
47335        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
47336      fi
47337    fi
47338  fi
47339
47340  if test "x$TOOLCHAIN_TYPE" = xgcc; then
47341    # If this is a --hash-style=gnu system, use --hash-style=both, why?
47342    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
47343    # This is later checked when setting flags.
47344
47345    # "-Og" suppported for GCC 4.8 and later
47346    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
47347
47348
47349
47350
47351
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    # Execute function body
47395
47396
47397
47398
47399
47400
47401
47402
47403
47404
47405
47406
47407
47408
47409
47410
47411
47412
47413
47414
47415
47416
47417
47418
47419
47420
47421
47422
47423
47424
47425
47426
47427
47428
47429
47430
47431
47432
47433
47434
47435
47436
47437
47438
47439
47440
47441
47442
47443    # Execute function body
47444
47445  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47446$as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47447  supports=yes
47448
47449  saved_cflags="$CFLAGS"
47450  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
47451  ac_ext=c
47452ac_cpp='$CPP $CPPFLAGS'
47453ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47454ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47455ac_compiler_gnu=$ac_cv_c_compiler_gnu
47456
47457  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47458/* end confdefs.h.  */
47459int i;
47460_ACEOF
47461if ac_fn_c_try_compile "$LINENO"; then :
47462
47463else
47464  supports=no
47465fi
47466rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47467  ac_ext=cpp
47468ac_cpp='$CXXCPP $CPPFLAGS'
47469ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47470ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47471ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47472
47473  CFLAGS="$saved_cflags"
47474
47475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47476$as_echo "$supports" >&6; }
47477  if test "x$supports" = "xyes" ; then
47478    :
47479    C_COMP_SUPPORTS="yes"
47480  else
47481    :
47482    C_COMP_SUPPORTS="no"
47483  fi
47484
47485
47486
47487
47488
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    # Execute function body
47544
47545  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47546$as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47547  supports=yes
47548
47549  saved_cxxflags="$CXXFLAGS"
47550  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
47551  ac_ext=cpp
47552ac_cpp='$CXXCPP $CPPFLAGS'
47553ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47554ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47555ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47556
47557  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47558/* end confdefs.h.  */
47559int i;
47560_ACEOF
47561if ac_fn_cxx_try_compile "$LINENO"; then :
47562
47563else
47564  supports=no
47565fi
47566rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47567  ac_ext=cpp
47568ac_cpp='$CXXCPP $CPPFLAGS'
47569ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47570ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47571ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47572
47573  CXXFLAGS="$saved_cxxflags"
47574
47575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47576$as_echo "$supports" >&6; }
47577  if test "x$supports" = "xyes" ; then
47578    :
47579    CXX_COMP_SUPPORTS="yes"
47580  else
47581    :
47582    CXX_COMP_SUPPORTS="no"
47583  fi
47584
47585
47586
47587
47588
47589
47590
47591
47592
47593
47594
47595
47596
47597  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47598$as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47599  supports=no
47600  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
47601
47602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47603$as_echo "$supports" >&6; }
47604  if test "x$supports" = "xyes" ; then
47605    :
47606    HAS_CFLAG_OPTIMIZE_DEBUG=true
47607  else
47608    :
47609    HAS_CFLAG_OPTIMIZE_DEBUG=false
47610  fi
47611
47612
47613
47614
47615
47616
47617
47618    # "-z relro" supported in GNU binutils 2.17 and later
47619    LINKER_RELRO_FLAG="-Wl,-z,relro"
47620
47621
47622
47623
47624
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    # Execute function body
47668
47669  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
47670$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
47671  supports=yes
47672
47673  saved_ldflags="$LDFLAGS"
47674  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
47675  ac_ext=c
47676ac_cpp='$CPP $CPPFLAGS'
47677ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47678ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47679ac_compiler_gnu=$ac_cv_c_compiler_gnu
47680
47681  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47682/* end confdefs.h.  */
47683
47684int
47685main ()
47686{
47687
47688  ;
47689  return 0;
47690}
47691_ACEOF
47692if ac_fn_c_try_link "$LINENO"; then :
47693
47694else
47695  supports=no
47696fi
47697rm -f core conftest.err conftest.$ac_objext \
47698    conftest$ac_exeext conftest.$ac_ext
47699  ac_ext=cpp
47700ac_cpp='$CXXCPP $CPPFLAGS'
47701ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47702ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47703ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47704
47705  LDFLAGS="$saved_ldflags"
47706
47707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47708$as_echo "$supports" >&6; }
47709  if test "x$supports" = "xyes" ; then
47710    :
47711    HAS_LINKER_RELRO=true
47712  else
47713    :
47714    HAS_LINKER_RELRO=false
47715  fi
47716
47717
47718
47719
47720
47721
47722
47723
47724
47725
47726
47727
47728
47729    # "-z now" supported in GNU binutils 2.11 and later
47730    LINKER_NOW_FLAG="-Wl,-z,now"
47731
47732
47733
47734
47735
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    # Execute function body
47779
47780  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
47781$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
47782  supports=yes
47783
47784  saved_ldflags="$LDFLAGS"
47785  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
47786  ac_ext=c
47787ac_cpp='$CPP $CPPFLAGS'
47788ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47789ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47790ac_compiler_gnu=$ac_cv_c_compiler_gnu
47791
47792  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47793/* end confdefs.h.  */
47794
47795int
47796main ()
47797{
47798
47799  ;
47800  return 0;
47801}
47802_ACEOF
47803if ac_fn_c_try_link "$LINENO"; then :
47804
47805else
47806  supports=no
47807fi
47808rm -f core conftest.err conftest.$ac_objext \
47809    conftest$ac_exeext conftest.$ac_ext
47810  ac_ext=cpp
47811ac_cpp='$CXXCPP $CPPFLAGS'
47812ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47813ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47814ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47815
47816  LDFLAGS="$saved_ldflags"
47817
47818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47819$as_echo "$supports" >&6; }
47820  if test "x$supports" = "xyes" ; then
47821    :
47822    HAS_LINKER_NOW=true
47823  else
47824    :
47825    HAS_LINKER_NOW=false
47826  fi
47827
47828
47829
47830
47831
47832
47833
47834
47835
47836
47837
47838
47839  fi
47840
47841  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
47842  # in executable.'
47843  USING_BROKEN_SUSE_LD=no
47844  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
47845    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
47846$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
47847    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
47848    $ECHO "int main() { }" > main.c
47849    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
47850      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47851$as_echo "no" >&6; }
47852      USING_BROKEN_SUSE_LD=no
47853    else
47854      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47855$as_echo "yes" >&6; }
47856      USING_BROKEN_SUSE_LD=yes
47857    fi
47858    $RM version-script.map main.c a.out
47859  fi
47860
47861
47862  # Setup hotspot lecagy names for toolchains
47863  HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
47864  if test "x$TOOLCHAIN_TYPE" = xclang; then
47865    HOTSPOT_TOOLCHAIN_TYPE=gcc
47866  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47867    HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
47868  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47869    HOTSPOT_TOOLCHAIN_TYPE=visCPP
47870  fi
47871
47872
47873
47874# Setup the JTReg Regression Test Harness.
47875
47876
47877# Check whether --with-jtreg was given.
47878if test "${with_jtreg+set}" = set; then :
47879  withval=$with_jtreg;
47880else
47881  with_jtreg=no
47882fi
47883
47884
47885  if test "x$with_jtreg" = xno; then
47886    # jtreg disabled
47887    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47888$as_echo_n "checking for jtreg... " >&6; }
47889    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47890$as_echo "no" >&6; }
47891  else
47892    if test "x$with_jtreg" != xyes; then
47893      # with path specified.
47894      JT_HOME="$with_jtreg"
47895    fi
47896
47897    if test "x$JT_HOME" != x; then
47898      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47899$as_echo_n "checking for jtreg... " >&6; }
47900
47901      # use JT_HOME enviroment var.
47902
47903  # Only process if variable expands to non-empty
47904
47905  if test "x$JT_HOME" != x; then
47906    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47907
47908  # Input might be given as Windows format, start by converting to
47909  # unix format.
47910  path="$JT_HOME"
47911  new_path=`$CYGPATH -u "$path"`
47912
47913  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47914  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47915  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47916  # "foo.exe" is OK but "foo" is an error.
47917  #
47918  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47919  # It is also a way to make sure we got the proper file name for the real test later on.
47920  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47921  if test "x$test_shortpath" = x; then
47922    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47923$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
47924    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
47925  fi
47926
47927  # Call helper function which possibly converts this using DOS-style short mode.
47928  # If so, the updated path is stored in $new_path.
47929
47930  input_path="$new_path"
47931  # Check if we need to convert this using DOS-style short mode. If the path
47932  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47933  # take no chances and rewrite it.
47934  # Note: m4 eats our [], so we need to use [ and ] instead.
47935  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47936  if test "x$has_forbidden_chars" != x; then
47937    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47938    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47939    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47940    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47941      # Going to short mode and back again did indeed matter. Since short mode is
47942      # case insensitive, let's make it lowercase to improve readability.
47943      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47944      # Now convert it back to Unix-style (cygpath)
47945      input_path=`$CYGPATH -u "$shortmode_path"`
47946      new_path="$input_path"
47947    fi
47948  fi
47949
47950  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47951  if test "x$test_cygdrive_prefix" = x; then
47952    # As a simple fix, exclude /usr/bin since it's not a real path.
47953    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47954      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47955      # a path prefixed by /cygdrive for fixpath to work.
47956      new_path="$CYGWIN_ROOT_PATH$input_path"
47957    fi
47958  fi
47959
47960
47961  if test "x$path" != "x$new_path"; then
47962    JT_HOME="$new_path"
47963    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47964$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47965  fi
47966
47967    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47968
47969  path="$JT_HOME"
47970  has_colon=`$ECHO $path | $GREP ^.:`
47971  new_path="$path"
47972  if test "x$has_colon" = x; then
47973    # Not in mixed or Windows style, start by that.
47974    new_path=`cmd //c echo $path`
47975  fi
47976
47977
47978  input_path="$new_path"
47979  # Check if we need to convert this using DOS-style short mode. If the path
47980  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47981  # take no chances and rewrite it.
47982  # Note: m4 eats our [], so we need to use [ and ] instead.
47983  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47984  if test "x$has_forbidden_chars" != x; then
47985    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47986    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47987  fi
47988
47989
47990  windows_path="$new_path"
47991  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47992    unix_path=`$CYGPATH -u "$windows_path"`
47993    new_path="$unix_path"
47994  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47995    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47996    new_path="$unix_path"
47997  fi
47998
47999  if test "x$path" != "x$new_path"; then
48000    JT_HOME="$new_path"
48001    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
48002$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
48003  fi
48004
48005  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48006  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48007
48008    else
48009      # We're on a unix platform. Hooray! :)
48010      path="$JT_HOME"
48011      has_space=`$ECHO "$path" | $GREP " "`
48012      if test "x$has_space" != x; then
48013        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
48014$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
48015        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48016      fi
48017
48018      # Use eval to expand a potential ~
48019      eval path="$path"
48020      if test ! -f "$path" && test ! -d "$path"; then
48021        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
48022      fi
48023
48024      if test -d "$path"; then
48025        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
48026      else
48027        dir="`$DIRNAME "$path"`"
48028        base="`$BASENAME "$path"`"
48029        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
48030      fi
48031    fi
48032  fi
48033
48034
48035      # jtreg win32 script works for everybody
48036      JTREGEXE="$JT_HOME/bin/jtreg"
48037
48038      if test ! -f "$JTREGEXE"; then
48039        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
48040      fi
48041
48042      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48043$as_echo "$JTREGEXE" >&6; }
48044    else
48045      # try to find jtreg on path
48046
48047
48048
48049  # Publish this variable in the help.
48050
48051
48052  if [ -z "${JTREGEXE+x}" ]; then
48053    # The variable is not set by user, try to locate tool using the code snippet
48054    for ac_prog in jtreg
48055do
48056  # Extract the first word of "$ac_prog", so it can be a program name with args.
48057set dummy $ac_prog; ac_word=$2
48058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48059$as_echo_n "checking for $ac_word... " >&6; }
48060if ${ac_cv_path_JTREGEXE+:} false; then :
48061  $as_echo_n "(cached) " >&6
48062else
48063  case $JTREGEXE in
48064  [\\/]* | ?:[\\/]*)
48065  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48066  ;;
48067  *)
48068  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48069for as_dir in $PATH
48070do
48071  IFS=$as_save_IFS
48072  test -z "$as_dir" && as_dir=.
48073    for ac_exec_ext in '' $ac_executable_extensions; do
48074  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48075    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48076    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48077    break 2
48078  fi
48079done
48080  done
48081IFS=$as_save_IFS
48082
48083  ;;
48084esac
48085fi
48086JTREGEXE=$ac_cv_path_JTREGEXE
48087if test -n "$JTREGEXE"; then
48088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48089$as_echo "$JTREGEXE" >&6; }
48090else
48091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48092$as_echo "no" >&6; }
48093fi
48094
48095
48096  test -n "$JTREGEXE" && break
48097done
48098
48099  else
48100    # The variable is set, but is it from the command line or the environment?
48101
48102    # Try to remove the string !JTREGEXE! from our list.
48103    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
48104    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48105      # If it failed, the variable was not from the command line. Ignore it,
48106      # but warn the user (except for BASH, which is always set by the calling BASH).
48107      if test "xJTREGEXE" != xBASH; then
48108        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
48109$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
48110      fi
48111      # Try to locate tool using the code snippet
48112      for ac_prog in jtreg
48113do
48114  # Extract the first word of "$ac_prog", so it can be a program name with args.
48115set dummy $ac_prog; ac_word=$2
48116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48117$as_echo_n "checking for $ac_word... " >&6; }
48118if ${ac_cv_path_JTREGEXE+:} false; then :
48119  $as_echo_n "(cached) " >&6
48120else
48121  case $JTREGEXE in
48122  [\\/]* | ?:[\\/]*)
48123  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48124  ;;
48125  *)
48126  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48127for as_dir in $PATH
48128do
48129  IFS=$as_save_IFS
48130  test -z "$as_dir" && as_dir=.
48131    for ac_exec_ext in '' $ac_executable_extensions; do
48132  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48133    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48134    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48135    break 2
48136  fi
48137done
48138  done
48139IFS=$as_save_IFS
48140
48141  ;;
48142esac
48143fi
48144JTREGEXE=$ac_cv_path_JTREGEXE
48145if test -n "$JTREGEXE"; then
48146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48147$as_echo "$JTREGEXE" >&6; }
48148else
48149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48150$as_echo "no" >&6; }
48151fi
48152
48153
48154  test -n "$JTREGEXE" && break
48155done
48156
48157    else
48158      # If it succeeded, then it was overridden by the user. We will use it
48159      # for the tool.
48160
48161      # First remove it from the list of overridden variables, so we can test
48162      # for unknown variables in the end.
48163      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48164
48165      # Check if we try to supply an empty value
48166      if test "x$JTREGEXE" = x; then
48167        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
48168$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
48169        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48170$as_echo_n "checking for JTREGEXE... " >&6; }
48171        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
48172$as_echo "disabled" >&6; }
48173      else
48174        # Check if the provided tool contains a complete path.
48175        tool_specified="$JTREGEXE"
48176        tool_basename="${tool_specified##*/}"
48177        if test "x$tool_basename" = "x$tool_specified"; then
48178          # A command without a complete path is provided, search $PATH.
48179          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
48180$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
48181          # Extract the first word of "$tool_basename", so it can be a program name with args.
48182set dummy $tool_basename; ac_word=$2
48183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48184$as_echo_n "checking for $ac_word... " >&6; }
48185if ${ac_cv_path_JTREGEXE+:} false; then :
48186  $as_echo_n "(cached) " >&6
48187else
48188  case $JTREGEXE in
48189  [\\/]* | ?:[\\/]*)
48190  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48191  ;;
48192  *)
48193  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48194for as_dir in $PATH
48195do
48196  IFS=$as_save_IFS
48197  test -z "$as_dir" && as_dir=.
48198    for ac_exec_ext in '' $ac_executable_extensions; do
48199  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48200    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48201    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48202    break 2
48203  fi
48204done
48205  done
48206IFS=$as_save_IFS
48207
48208  ;;
48209esac
48210fi
48211JTREGEXE=$ac_cv_path_JTREGEXE
48212if test -n "$JTREGEXE"; then
48213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48214$as_echo "$JTREGEXE" >&6; }
48215else
48216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48217$as_echo "no" >&6; }
48218fi
48219
48220
48221          if test "x$JTREGEXE" = x; then
48222            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
48223          fi
48224        else
48225          # Otherwise we believe it is a complete path. Use it as it is.
48226          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
48227$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
48228          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48229$as_echo_n "checking for JTREGEXE... " >&6; }
48230          if test ! -x "$tool_specified"; then
48231            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
48232$as_echo "not found" >&6; }
48233            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
48234          fi
48235          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
48236$as_echo "$tool_specified" >&6; }
48237        fi
48238      fi
48239    fi
48240
48241  fi
48242
48243
48244
48245  if test "x$JTREGEXE" = x; then
48246    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
48247  fi
48248
48249
48250      JT_HOME="`$DIRNAME $JTREGEXE`"
48251    fi
48252  fi
48253
48254
48255
48256
48257
48258
48259  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
48260  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
48261  # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
48262  #                              commands produced by the link step (currently AIX only)
48263  if test "x$TOOLCHAIN_TYPE" = xxlc; then
48264    COMPILER_TARGET_BITS_FLAG="-q"
48265    COMPILER_COMMAND_FILE_FLAG="-f"
48266    COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
48267  else
48268    COMPILER_TARGET_BITS_FLAG="-m"
48269    COMPILER_COMMAND_FILE_FLAG="@"
48270    COMPILER_BINDCMD_FILE_FLAG=""
48271
48272    # The solstudio linker does not support @-files.
48273    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48274      COMPILER_COMMAND_FILE_FLAG=
48275    fi
48276
48277    # Check if @file is supported by gcc
48278    if test "x$TOOLCHAIN_TYPE" = xgcc; then
48279      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
48280$as_echo_n "checking if @file is supported by gcc... " >&6; }
48281      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
48282      $ECHO "" "--version" > command.file
48283      if $CXX @command.file 2>&5 >&5; then
48284        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48285$as_echo "yes" >&6; }
48286        COMPILER_COMMAND_FILE_FLAG="@"
48287      else
48288        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48289$as_echo "no" >&6; }
48290        COMPILER_COMMAND_FILE_FLAG=
48291      fi
48292      $RM command.file
48293    fi
48294  fi
48295
48296
48297
48298
48299  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
48300  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48301    ARFLAGS="-r"
48302  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48303    ARFLAGS="-X64"
48304  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
48305    # lib.exe is used as AR to create static libraries.
48306    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
48307  else
48308    ARFLAGS=""
48309  fi
48310
48311
48312  ## Setup strip.
48313  # FIXME: should this really be per platform, or should it be per toolchain type?
48314  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
48315  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
48316  if test "x$OPENJDK_TARGET_OS" = xlinux; then
48317    STRIPFLAGS="-g"
48318  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
48319    STRIPFLAGS="-x"
48320  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
48321    STRIPFLAGS="-S"
48322  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48323    STRIPFLAGS="-X32_64"
48324  fi
48325
48326
48327
48328  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48329    CC_OUT_OPTION=-Fo
48330    EXE_OUT_OPTION=-out:
48331    LD_OUT_OPTION=-out:
48332    AR_OUT_OPTION=-out:
48333  else
48334    # The option used to specify the target .o,.a or .so file.
48335    # When compiling, how to specify the to be created object file.
48336    CC_OUT_OPTION='-o$(SPACE)'
48337    # When linking, how to specify the to be created executable.
48338    EXE_OUT_OPTION='-o$(SPACE)'
48339    # When linking, how to specify the to be created dynamically linkable library.
48340    LD_OUT_OPTION='-o$(SPACE)'
48341    # When archiving, how to specify the to be create static archive for object files.
48342    AR_OUT_OPTION='rcs$(SPACE)'
48343  fi
48344
48345
48346
48347
48348
48349  # On Windows, we need to set RC flags.
48350  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48351    RC_FLAGS="-nologo -l0x409"
48352    JVM_RCFLAGS="-nologo"
48353    if test "x$DEBUG_LEVEL" = xrelease; then
48354      RC_FLAGS="$RC_FLAGS -DNDEBUG"
48355      JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
48356    fi
48357
48358    # The version variables used to create RC_FLAGS may be overridden
48359    # in a custom configure script, or possibly the command line.
48360    # Let those variables be expanded at make time in spec.gmk.
48361    # The \$ are escaped to the shell, and the $(...) variables
48362    # are evaluated by make.
48363    RC_FLAGS="$RC_FLAGS \
48364        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
48365        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
48366        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
48367        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
48368        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
48369        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
48370        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
48371
48372    JVM_RCFLAGS="$JVM_RCFLAGS \
48373        -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
48374        -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
48375        -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
48376        -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
48377        -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
48378        -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
48379        -D\"HS_FNAME=jvm.dll\" \
48380        -D\"HS_INTERNAL_NAME=jvm\""
48381  fi
48382
48383
48384
48385  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48386    # silence copyright notice and other headers.
48387    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
48388  fi
48389
48390
48391# Now we can test some aspects on the target using configure macros.
48392
48393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
48394$as_echo_n "checking for ANSI C header files... " >&6; }
48395if ${ac_cv_header_stdc+:} false; then :
48396  $as_echo_n "(cached) " >&6
48397else
48398  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48399/* end confdefs.h.  */
48400#include <stdlib.h>
48401#include <stdarg.h>
48402#include <string.h>
48403#include <float.h>
48404
48405int
48406main ()
48407{
48408
48409  ;
48410  return 0;
48411}
48412_ACEOF
48413if ac_fn_cxx_try_compile "$LINENO"; then :
48414  ac_cv_header_stdc=yes
48415else
48416  ac_cv_header_stdc=no
48417fi
48418rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48419
48420if test $ac_cv_header_stdc = yes; then
48421  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
48422  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48423/* end confdefs.h.  */
48424#include <string.h>
48425
48426_ACEOF
48427if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48428  $EGREP "memchr" >/dev/null 2>&1; then :
48429
48430else
48431  ac_cv_header_stdc=no
48432fi
48433rm -f conftest*
48434
48435fi
48436
48437if test $ac_cv_header_stdc = yes; then
48438  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
48439  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48440/* end confdefs.h.  */
48441#include <stdlib.h>
48442
48443_ACEOF
48444if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48445  $EGREP "free" >/dev/null 2>&1; then :
48446
48447else
48448  ac_cv_header_stdc=no
48449fi
48450rm -f conftest*
48451
48452fi
48453
48454if test $ac_cv_header_stdc = yes; then
48455  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
48456  if test "$cross_compiling" = yes; then :
48457  :
48458else
48459  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48460/* end confdefs.h.  */
48461#include <ctype.h>
48462#include <stdlib.h>
48463#if ((' ' & 0x0FF) == 0x020)
48464# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
48465# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
48466#else
48467# define ISLOWER(c) \
48468		   (('a' <= (c) && (c) <= 'i') \
48469		     || ('j' <= (c) && (c) <= 'r') \
48470		     || ('s' <= (c) && (c) <= 'z'))
48471# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
48472#endif
48473
48474#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
48475int
48476main ()
48477{
48478  int i;
48479  for (i = 0; i < 256; i++)
48480    if (XOR (islower (i), ISLOWER (i))
48481	|| toupper (i) != TOUPPER (i))
48482      return 2;
48483  return 0;
48484}
48485_ACEOF
48486if ac_fn_cxx_try_run "$LINENO"; then :
48487
48488else
48489  ac_cv_header_stdc=no
48490fi
48491rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48492  conftest.$ac_objext conftest.beam conftest.$ac_ext
48493fi
48494
48495fi
48496fi
48497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
48498$as_echo "$ac_cv_header_stdc" >&6; }
48499if test $ac_cv_header_stdc = yes; then
48500
48501$as_echo "#define STDC_HEADERS 1" >>confdefs.h
48502
48503fi
48504
48505# On IRIX 5.3, sys/types and inttypes.h are conflicting.
48506for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
48507		  inttypes.h stdint.h unistd.h
48508do :
48509  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
48510ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
48511"
48512if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
48513  cat >>confdefs.h <<_ACEOF
48514#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
48515_ACEOF
48516
48517fi
48518
48519done
48520
48521
48522
48523  ###############################################################################
48524  #
48525  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
48526  # (The JVM can use 32 or 64 bit Java pointers but that decision
48527  # is made at runtime.)
48528  #
48529
48530  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
48531    # Always specify -m flag on Solaris
48532    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
48533
48534  # When we add flags to the "official" CFLAGS etc, we need to
48535  # keep track of these additions in ADDED_CFLAGS etc. These
48536  # will later be checked to make sure only controlled additions
48537  # have been made to CFLAGS etc.
48538  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48539  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48540  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48541
48542  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48543  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48544  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48545
48546  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48547  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48548  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48549
48550  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48551  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48552  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48553
48554  elif test "x$COMPILE_TYPE" = xreduced; then
48555    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
48556      # Specify -m if running reduced on unix platforms
48557
48558  # When we add flags to the "official" CFLAGS etc, we need to
48559  # keep track of these additions in ADDED_CFLAGS etc. These
48560  # will later be checked to make sure only controlled additions
48561  # have been made to CFLAGS etc.
48562  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48563  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48564  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48565
48566  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48567  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48568  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48569
48570  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48571  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48572  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48573
48574  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48575  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48576  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48577
48578    fi
48579  fi
48580  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48581    JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48582    JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48583    JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48584  fi
48585
48586  # Make compilation sanity check
48587  for ac_header in stdio.h
48588do :
48589  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
48590if test "x$ac_cv_header_stdio_h" = xyes; then :
48591  cat >>confdefs.h <<_ACEOF
48592#define HAVE_STDIO_H 1
48593_ACEOF
48594
48595else
48596
48597    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
48598$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
48599    if test "x$COMPILE_TYPE" = xreduced; then
48600
48601  # Print a helpful message on how to acquire the necessary build dependency.
48602  # reduced is the help tag: freetype, cups, alsa etc
48603  MISSING_DEPENDENCY=reduced
48604
48605  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48606    cygwin_help $MISSING_DEPENDENCY
48607  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48608    msys_help $MISSING_DEPENDENCY
48609  else
48610    PKGHANDLER_COMMAND=
48611
48612    case $PKGHANDLER in
48613      apt-get)
48614        apt_help     $MISSING_DEPENDENCY ;;
48615      yum)
48616        yum_help     $MISSING_DEPENDENCY ;;
48617      port)
48618        port_help    $MISSING_DEPENDENCY ;;
48619      pkgutil)
48620        pkgutil_help $MISSING_DEPENDENCY ;;
48621      pkgadd)
48622        pkgadd_help  $MISSING_DEPENDENCY ;;
48623    esac
48624
48625    if test "x$PKGHANDLER_COMMAND" != x; then
48626      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48627    fi
48628  fi
48629
48630      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48631$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48632    elif test "x$COMPILE_TYPE" = xcross; then
48633      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48634$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48635    fi
48636    as_fn_error $? "Cannot continue." "$LINENO" 5
48637
48638fi
48639
48640done
48641
48642
48643  # The cast to long int works around a bug in the HP C Compiler
48644# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48645# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48646# This bug is HP SR number 8606223364.
48647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48648$as_echo_n "checking size of int *... " >&6; }
48649if ${ac_cv_sizeof_int_p+:} false; then :
48650  $as_echo_n "(cached) " >&6
48651else
48652  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48653
48654else
48655  if test "$ac_cv_type_int_p" = yes; then
48656     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48657$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48658as_fn_error 77 "cannot compute sizeof (int *)
48659See \`config.log' for more details" "$LINENO" 5; }
48660   else
48661     ac_cv_sizeof_int_p=0
48662   fi
48663fi
48664
48665fi
48666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48667$as_echo "$ac_cv_sizeof_int_p" >&6; }
48668
48669
48670
48671cat >>confdefs.h <<_ACEOF
48672#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48673_ACEOF
48674
48675
48676
48677  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
48678  if test "x$ac_cv_sizeof_int_p" = x; then
48679    # The test failed, lets stick to the assumed value.
48680    { $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
48681$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
48682  else
48683    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48684
48685    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48686      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
48687      # Let's try to implicitely set the compilers target architecture and retry the test
48688      { $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
48689$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;}
48690      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
48691$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
48692
48693  # When we add flags to the "official" CFLAGS etc, we need to
48694  # keep track of these additions in ADDED_CFLAGS etc. These
48695  # will later be checked to make sure only controlled additions
48696  # have been made to CFLAGS etc.
48697  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48698  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48699  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48700
48701  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48702  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48703  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48704
48705  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48706  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48707  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48708
48709  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48710  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48711  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48712
48713
48714      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
48715      unset ac_cv_sizeof_int_p
48716      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
48717      cat >>confdefs.h <<_ACEOF
48718#undef SIZEOF_INT_P
48719_ACEOF
48720
48721      # The cast to long int works around a bug in the HP C Compiler
48722# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48723# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48724# This bug is HP SR number 8606223364.
48725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48726$as_echo_n "checking size of int *... " >&6; }
48727if ${ac_cv_sizeof_int_p+:} false; then :
48728  $as_echo_n "(cached) " >&6
48729else
48730  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48731
48732else
48733  if test "$ac_cv_type_int_p" = yes; then
48734     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48735$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48736as_fn_error 77 "cannot compute sizeof (int *)
48737See \`config.log' for more details" "$LINENO" 5; }
48738   else
48739     ac_cv_sizeof_int_p=0
48740   fi
48741fi
48742
48743fi
48744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48745$as_echo "$ac_cv_sizeof_int_p" >&6; }
48746
48747
48748
48749cat >>confdefs.h <<_ACEOF
48750#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48751_ACEOF
48752
48753
48754
48755      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48756
48757      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48758        { $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
48759$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;}
48760        if test "x$COMPILE_TYPE" = xreduced; then
48761
48762  # Print a helpful message on how to acquire the necessary build dependency.
48763  # reduced is the help tag: freetype, cups, alsa etc
48764  MISSING_DEPENDENCY=reduced
48765
48766  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48767    cygwin_help $MISSING_DEPENDENCY
48768  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48769    msys_help $MISSING_DEPENDENCY
48770  else
48771    PKGHANDLER_COMMAND=
48772
48773    case $PKGHANDLER in
48774      apt-get)
48775        apt_help     $MISSING_DEPENDENCY ;;
48776      yum)
48777        yum_help     $MISSING_DEPENDENCY ;;
48778      port)
48779        port_help    $MISSING_DEPENDENCY ;;
48780      pkgutil)
48781        pkgutil_help $MISSING_DEPENDENCY ;;
48782      pkgadd)
48783        pkgadd_help  $MISSING_DEPENDENCY ;;
48784    esac
48785
48786    if test "x$PKGHANDLER_COMMAND" != x; then
48787      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48788    fi
48789  fi
48790
48791          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48792$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48793        elif test "x$COMPILE_TYPE" = xcross; then
48794          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48795$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48796        fi
48797        as_fn_error $? "Cannot continue." "$LINENO" 5
48798      fi
48799    fi
48800  fi
48801
48802  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
48803$as_echo_n "checking for target address size... " >&6; }
48804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
48805$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
48806
48807
48808  ###############################################################################
48809  #
48810  # Is the target little of big endian?
48811  #
48812   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
48813$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
48814if ${ac_cv_c_bigendian+:} false; then :
48815  $as_echo_n "(cached) " >&6
48816else
48817  ac_cv_c_bigendian=unknown
48818    # See if we're dealing with a universal compiler.
48819    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48820/* end confdefs.h.  */
48821#ifndef __APPLE_CC__
48822	       not a universal capable compiler
48823	     #endif
48824	     typedef int dummy;
48825
48826_ACEOF
48827if ac_fn_cxx_try_compile "$LINENO"; then :
48828
48829	# Check for potential -arch flags.  It is not universal unless
48830	# there are at least two -arch flags with different values.
48831	ac_arch=
48832	ac_prev=
48833	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
48834	 if test -n "$ac_prev"; then
48835	   case $ac_word in
48836	     i?86 | x86_64 | ppc | ppc64)
48837	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
48838		 ac_arch=$ac_word
48839	       else
48840		 ac_cv_c_bigendian=universal
48841		 break
48842	       fi
48843	       ;;
48844	   esac
48845	   ac_prev=
48846	 elif test "x$ac_word" = "x-arch"; then
48847	   ac_prev=arch
48848	 fi
48849       done
48850fi
48851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48852    if test $ac_cv_c_bigendian = unknown; then
48853      # See if sys/param.h defines the BYTE_ORDER macro.
48854      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48855/* end confdefs.h.  */
48856#include <sys/types.h>
48857	     #include <sys/param.h>
48858
48859int
48860main ()
48861{
48862#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
48863		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
48864		     && LITTLE_ENDIAN)
48865	      bogus endian macros
48866	     #endif
48867
48868  ;
48869  return 0;
48870}
48871_ACEOF
48872if ac_fn_cxx_try_compile "$LINENO"; then :
48873  # It does; now see whether it defined to BIG_ENDIAN or not.
48874	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48875/* end confdefs.h.  */
48876#include <sys/types.h>
48877		#include <sys/param.h>
48878
48879int
48880main ()
48881{
48882#if BYTE_ORDER != BIG_ENDIAN
48883		 not big endian
48884		#endif
48885
48886  ;
48887  return 0;
48888}
48889_ACEOF
48890if ac_fn_cxx_try_compile "$LINENO"; then :
48891  ac_cv_c_bigendian=yes
48892else
48893  ac_cv_c_bigendian=no
48894fi
48895rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48896fi
48897rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48898    fi
48899    if test $ac_cv_c_bigendian = unknown; then
48900      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
48901      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48902/* end confdefs.h.  */
48903#include <limits.h>
48904
48905int
48906main ()
48907{
48908#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
48909	      bogus endian macros
48910	     #endif
48911
48912  ;
48913  return 0;
48914}
48915_ACEOF
48916if ac_fn_cxx_try_compile "$LINENO"; then :
48917  # It does; now see whether it defined to _BIG_ENDIAN or not.
48918	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48919/* end confdefs.h.  */
48920#include <limits.h>
48921
48922int
48923main ()
48924{
48925#ifndef _BIG_ENDIAN
48926		 not big endian
48927		#endif
48928
48929  ;
48930  return 0;
48931}
48932_ACEOF
48933if ac_fn_cxx_try_compile "$LINENO"; then :
48934  ac_cv_c_bigendian=yes
48935else
48936  ac_cv_c_bigendian=no
48937fi
48938rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48939fi
48940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48941    fi
48942    if test $ac_cv_c_bigendian = unknown; then
48943      # Compile a test program.
48944      if test "$cross_compiling" = yes; then :
48945  # Try to guess by grepping values from an object file.
48946	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48947/* end confdefs.h.  */
48948short int ascii_mm[] =
48949		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
48950		short int ascii_ii[] =
48951		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
48952		int use_ascii (int i) {
48953		  return ascii_mm[i] + ascii_ii[i];
48954		}
48955		short int ebcdic_ii[] =
48956		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
48957		short int ebcdic_mm[] =
48958		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
48959		int use_ebcdic (int i) {
48960		  return ebcdic_mm[i] + ebcdic_ii[i];
48961		}
48962		extern int foo;
48963
48964int
48965main ()
48966{
48967return use_ascii (foo) == use_ebcdic (foo);
48968  ;
48969  return 0;
48970}
48971_ACEOF
48972if ac_fn_cxx_try_compile "$LINENO"; then :
48973  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
48974	      ac_cv_c_bigendian=yes
48975	    fi
48976	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
48977	      if test "$ac_cv_c_bigendian" = unknown; then
48978		ac_cv_c_bigendian=no
48979	      else
48980		# finding both strings is unlikely to happen, but who knows?
48981		ac_cv_c_bigendian=unknown
48982	      fi
48983	    fi
48984fi
48985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48986else
48987  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48988/* end confdefs.h.  */
48989$ac_includes_default
48990int
48991main ()
48992{
48993
48994	     /* Are we little or big endian?  From Harbison&Steele.  */
48995	     union
48996	     {
48997	       long int l;
48998	       char c[sizeof (long int)];
48999	     } u;
49000	     u.l = 1;
49001	     return u.c[sizeof (long int) - 1] == 1;
49002
49003  ;
49004  return 0;
49005}
49006_ACEOF
49007if ac_fn_cxx_try_run "$LINENO"; then :
49008  ac_cv_c_bigendian=no
49009else
49010  ac_cv_c_bigendian=yes
49011fi
49012rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49013  conftest.$ac_objext conftest.beam conftest.$ac_ext
49014fi
49015
49016    fi
49017fi
49018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
49019$as_echo "$ac_cv_c_bigendian" >&6; }
49020 case $ac_cv_c_bigendian in #(
49021   yes)
49022     ENDIAN="big";; #(
49023   no)
49024     ENDIAN="little" ;; #(
49025   universal)
49026     ENDIAN="universal_endianness"
49027     ;; #(
49028   *)
49029     ENDIAN="unknown" ;;
49030 esac
49031
49032
49033  if test "x$ENDIAN" = xuniversal_endianness; then
49034    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
49035  fi
49036  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
49037    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
49038  fi
49039
49040
49041# Configure flags for the tools
49042
49043  ###############################################################################
49044  #
49045  # How to compile shared libraries.
49046  #
49047
49048  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49049    PICFLAG="-fPIC"
49050    C_FLAG_REORDER=''
49051    CXX_FLAG_REORDER=''
49052
49053    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49054      # Linking is different on MacOSX
49055      if test "x$STATIC_BUILD" = xtrue; then
49056        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
49057      else
49058        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49059        JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49060      fi
49061      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49062      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49063      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49064      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49065    else
49066      # Default works for linux, might work on other platforms as well.
49067      SHARED_LIBRARY_FLAGS='-shared'
49068      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
49069      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49070      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49071      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49072    fi
49073  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49074    C_FLAG_REORDER=''
49075    CXX_FLAG_REORDER=''
49076
49077    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49078      # Linking is different on MacOSX
49079      PICFLAG=''
49080      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49081      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49082      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49083      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49084      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49085
49086      if test "x$STATIC_BUILD" = xfalse; then
49087        JVM_CFLAGS="$JVM_CFLAGS -fPIC"
49088      fi
49089    else
49090      # Default works for linux, might work on other platforms as well.
49091      PICFLAG='-fPIC'
49092      SHARED_LIBRARY_FLAGS='-shared'
49093      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
49094      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49095      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49096      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49097    fi
49098  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49099    PICFLAG="-KPIC"
49100    C_FLAG_REORDER='-xF'
49101    CXX_FLAG_REORDER='-xF'
49102    SHARED_LIBRARY_FLAGS="-G"
49103    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
49104    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49105    SET_SHARED_LIBRARY_NAME='-h $1'
49106    SET_SHARED_LIBRARY_MAPFILE='-M$1'
49107  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49108    # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
49109    # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
49110    # will have to patch this single instruction with a call to some out-of-order code which
49111    # does the load from the TOC. This is of course slow. But in that case we also would have
49112    # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
49113    # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
49114    # can be patched directly by the linker and does not require a jump to out-of-order code.
49115    # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
49116    # instead. This creates a distinct TOC for every compilation unit (and thus requires two
49117    # loads for accessing a global variable). But there are rumors that this may be seen as a
49118    # 'performance feature' because of improved code locality of the symbols used in a
49119    # compilation unit.
49120    PICFLAG="-qpic"
49121    JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49122    C_FLAG_REORDER=''
49123    CXX_FLAG_REORDER=''
49124    SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
49125    SET_EXECUTABLE_ORIGIN=""
49126    SET_SHARED_LIBRARY_ORIGIN=''
49127    SET_SHARED_LIBRARY_NAME=''
49128    SET_SHARED_LIBRARY_MAPFILE=''
49129  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49130    PICFLAG=""
49131    C_FLAG_REORDER=''
49132    CXX_FLAG_REORDER=''
49133    SHARED_LIBRARY_FLAGS="-dll"
49134    SET_EXECUTABLE_ORIGIN=''
49135    SET_SHARED_LIBRARY_ORIGIN=''
49136    SET_SHARED_LIBRARY_NAME=''
49137    SET_SHARED_LIBRARY_MAPFILE='-def:$1'
49138  fi
49139
49140
49141
49142
49143
49144
49145
49146
49147
49148  # The (cross) compiler is now configured, we can now test capabilities
49149  # of the target platform.
49150
49151
49152
49153  ###############################################################################
49154  #
49155  # Setup the opt flags for different compilers
49156  # and different operating systems.
49157  #
49158
49159  # FIXME: this was indirectly the old default, but just inherited.
49160  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49161  #   C_FLAG_DEPS="-MMD -MF"
49162  # fi
49163
49164  # Generate make dependency files
49165  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49166    C_FLAG_DEPS="-MMD -MF"
49167  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49168    C_FLAG_DEPS="-MMD -MF"
49169  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49170    C_FLAG_DEPS="-xMMD -xMF"
49171  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49172    C_FLAG_DEPS="-qmakedep=gcc -MF"
49173  fi
49174  CXX_FLAG_DEPS="$C_FLAG_DEPS"
49175
49176
49177
49178  # Debug symbols
49179  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49180    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
49181      # reduce from default "-g2" option to save space
49182      CFLAGS_DEBUG_SYMBOLS="-g1"
49183      CXXFLAGS_DEBUG_SYMBOLS="-g1"
49184    else
49185      CFLAGS_DEBUG_SYMBOLS="-g"
49186      CXXFLAGS_DEBUG_SYMBOLS="-g"
49187    fi
49188  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49189    CFLAGS_DEBUG_SYMBOLS="-g"
49190    CXXFLAGS_DEBUG_SYMBOLS="-g"
49191  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49192    CFLAGS_DEBUG_SYMBOLS="-g -xs"
49193    # -g0 enables debug symbols without disabling inlining.
49194    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
49195  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49196    CFLAGS_DEBUG_SYMBOLS="-g"
49197    CXXFLAGS_DEBUG_SYMBOLS="-g"
49198  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49199    CFLAGS_DEBUG_SYMBOLS="-Zi"
49200    CXXFLAGS_DEBUG_SYMBOLS="-Zi"
49201  fi
49202
49203
49204
49205  # Debug symbols for JVM_CFLAGS
49206  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49207    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
49208    if test "x$DEBUG_LEVEL" = xslowdebug; then
49209      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49210    else
49211      # -g0 does not disable inlining, which -g does.
49212      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
49213    fi
49214  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49215    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
49216  else
49217    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49218  fi
49219
49220
49221  # bounds, memory and behavior checking options
49222  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49223    case $DEBUG_LEVEL in
49224    release )
49225      # no adjustment
49226      ;;
49227    fastdebug )
49228      # no adjustment
49229      ;;
49230    slowdebug )
49231      # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
49232      # get's added conditionally on whether we produce debug symbols or not.
49233      # This is most likely not really correct.
49234
49235      # Add runtime stack smashing and undefined behavior checks.
49236      # Not all versions of gcc support -fstack-protector
49237      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
49238
49239
49240
49241
49242
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    # Execute function body
49281
49282
49283
49284
49285
49286
49287
49288
49289
49290
49291
49292
49293
49294
49295
49296
49297
49298
49299
49300
49301
49302
49303
49304
49305
49306
49307
49308
49309
49310
49311
49312
49313
49314
49315
49316
49317
49318
49319
49320
49321
49322
49323
49324
49325
49326
49327
49328
49329    # Execute function body
49330
49331  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49332$as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49333  supports=yes
49334
49335  saved_cflags="$CFLAGS"
49336  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
49337  ac_ext=c
49338ac_cpp='$CPP $CPPFLAGS'
49339ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49340ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49341ac_compiler_gnu=$ac_cv_c_compiler_gnu
49342
49343  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49344/* end confdefs.h.  */
49345int i;
49346_ACEOF
49347if ac_fn_c_try_compile "$LINENO"; then :
49348
49349else
49350  supports=no
49351fi
49352rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49353  ac_ext=cpp
49354ac_cpp='$CXXCPP $CPPFLAGS'
49355ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49356ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49357ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49358
49359  CFLAGS="$saved_cflags"
49360
49361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49362$as_echo "$supports" >&6; }
49363  if test "x$supports" = "xyes" ; then
49364    :
49365    C_COMP_SUPPORTS="yes"
49366  else
49367    :
49368    C_COMP_SUPPORTS="no"
49369  fi
49370
49371
49372
49373
49374
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    # Execute function body
49430
49431  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49432$as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49433  supports=yes
49434
49435  saved_cxxflags="$CXXFLAGS"
49436  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
49437  ac_ext=cpp
49438ac_cpp='$CXXCPP $CPPFLAGS'
49439ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49440ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49441ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49442
49443  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49444/* end confdefs.h.  */
49445int i;
49446_ACEOF
49447if ac_fn_cxx_try_compile "$LINENO"; then :
49448
49449else
49450  supports=no
49451fi
49452rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49453  ac_ext=cpp
49454ac_cpp='$CXXCPP $CPPFLAGS'
49455ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49456ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49457ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49458
49459  CXXFLAGS="$saved_cxxflags"
49460
49461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49462$as_echo "$supports" >&6; }
49463  if test "x$supports" = "xyes" ; then
49464    :
49465    CXX_COMP_SUPPORTS="yes"
49466  else
49467    :
49468    CXX_COMP_SUPPORTS="no"
49469  fi
49470
49471
49472
49473
49474
49475
49476
49477
49478
49479
49480
49481
49482
49483  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49484$as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49485  supports=no
49486  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49487
49488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49489$as_echo "$supports" >&6; }
49490  if test "x$supports" = "xyes" ; then
49491    :
49492
49493  else
49494    :
49495    STACK_PROTECTOR_CFLAG=""
49496  fi
49497
49498
49499
49500
49501
49502
49503
49504      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49505      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49506      if test "x$STACK_PROTECTOR_CFLAG" != x; then
49507        JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49508      fi
49509      ;;
49510    esac
49511  fi
49512
49513  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49514    if test "x$DEBUG_LEVEL" != xrelease; then
49515      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
49516        JVM_CFLAGS="$JVM_CFLAGS -homeparams"
49517      fi
49518    fi
49519  fi
49520
49521  # Optimization levels
49522  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49523    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
49524
49525    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
49526      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
49527      C_O_FLAG_HIGHEST_JVM="-xO4"
49528      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
49529      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
49530      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
49531      C_O_FLAG_DEBUG="-xregs=no%frameptr"
49532      C_O_FLAG_DEBUG_JVM=""
49533      C_O_FLAG_NONE="-xregs=no%frameptr"
49534      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49535      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
49536      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
49537      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
49538      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
49539      CXX_O_FLAG_DEBUG_JVM=""
49540      CXX_O_FLAG_NONE="-xregs=no%frameptr"
49541      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
49542        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
49543        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
49544      fi
49545    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49546      C_O_FLAG_HIGHEST_JVM="-xO4"
49547      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
49548      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49549      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49550      C_O_FLAG_DEBUG=""
49551      C_O_FLAG_DEBUG_JVM=""
49552      C_O_FLAG_NONE=""
49553      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49554      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
49555      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49556      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49557      CXX_O_FLAG_DEBUG=""
49558      CXX_O_FLAG_DEBUG_JVM=""
49559      CXX_O_FLAG_NONE=""
49560    fi
49561  else
49562    # The remaining toolchains share opt flags between CC and CXX;
49563    # setup for C and duplicate afterwards.
49564    if test "x$TOOLCHAIN_TYPE" = xgcc; then
49565      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49566        # On MacOSX we optimize for size, something
49567        # we should do for all platforms?
49568        C_O_FLAG_HIGHEST_JVM="-Os"
49569        C_O_FLAG_HIGHEST="-Os"
49570        C_O_FLAG_HI="-Os"
49571        C_O_FLAG_NORM="-Os"
49572        C_O_FLAG_SIZE="-Os"
49573      else
49574        C_O_FLAG_HIGHEST_JVM="-O3"
49575        C_O_FLAG_HIGHEST="-O3"
49576        C_O_FLAG_HI="-O3"
49577        C_O_FLAG_NORM="-O2"
49578        C_O_FLAG_SIZE="-Os"
49579      fi
49580      C_O_FLAG_DEBUG="-O0"
49581      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49582        C_O_FLAG_DEBUG_JVM=""
49583      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49584        C_O_FLAG_DEBUG_JVM="-O0"
49585      fi
49586      C_O_FLAG_NONE="-O0"
49587    elif test "x$TOOLCHAIN_TYPE" = xclang; then
49588      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49589        # On MacOSX we optimize for size, something
49590        # we should do for all platforms?
49591        C_O_FLAG_HIGHEST_JVM="-Os"
49592        C_O_FLAG_HIGHEST="-Os"
49593        C_O_FLAG_HI="-Os"
49594        C_O_FLAG_NORM="-Os"
49595        C_O_FLAG_SIZE="-Os"
49596      else
49597        C_O_FLAG_HIGHEST_JVM="-O3"
49598        C_O_FLAG_HIGHEST="-O3"
49599        C_O_FLAG_HI="-O3"
49600        C_O_FLAG_NORM="-O2"
49601        C_O_FLAG_SIZE="-Os"
49602      fi
49603      C_O_FLAG_DEBUG="-O0"
49604      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49605        C_O_FLAG_DEBUG_JVM=""
49606      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49607        C_O_FLAG_DEBUG_JVM="-O0"
49608      fi
49609      C_O_FLAG_NONE="-O0"
49610    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49611      C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
49612      C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
49613      C_O_FLAG_HI="-O3 -qinline -qinlglue"
49614      C_O_FLAG_NORM="-O2"
49615      C_O_FLAG_DEBUG="-qnoopt"
49616      # FIXME: Value below not verified.
49617      C_O_FLAG_DEBUG_JVM=""
49618      C_O_FLAG_NONE="-qnoopt"
49619    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49620      C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
49621      C_O_FLAG_HIGHEST="-O2"
49622      C_O_FLAG_HI="-O1"
49623      C_O_FLAG_NORM="-O1"
49624      C_O_FLAG_DEBUG="-Od"
49625      C_O_FLAG_DEBUG_JVM=""
49626      C_O_FLAG_NONE="-Od"
49627      C_O_FLAG_SIZE="-Os"
49628    fi
49629    CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
49630    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
49631    CXX_O_FLAG_HI="$C_O_FLAG_HI"
49632    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
49633    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
49634    CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
49635    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
49636    CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
49637  fi
49638
49639  # Adjust optimization flags according to debug level.
49640  case $DEBUG_LEVEL in
49641    release )
49642      # no adjustment
49643      ;;
49644    fastdebug )
49645      # Not quite so much optimization
49646      C_O_FLAG_HI="$C_O_FLAG_NORM"
49647      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
49648      ;;
49649    slowdebug )
49650      # Disable optimization
49651      C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
49652      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
49653      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
49654      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
49655      C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
49656      CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
49657      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
49658      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
49659      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
49660      CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
49661      ;;
49662  esac
49663
49664
49665
49666
49667
49668
49669
49670
49671
49672
49673
49674
49675
49676
49677
49678
49679
49680
49681
49682  # Special extras...
49683  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49684    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49685      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49686      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49687    fi
49688    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49689    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49690  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49691    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49692    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49693  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
49694    CXXSTD_CXXFLAG="-std=gnu++98"
49695
49696
49697
49698
49699
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    # Execute function body
49738
49739  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
49740$as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
49741  supports=yes
49742
49743  saved_cxxflags="$CXXFLAGS"
49744  CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
49745  ac_ext=cpp
49746ac_cpp='$CXXCPP $CPPFLAGS'
49747ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49748ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49749ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49750
49751  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49752/* end confdefs.h.  */
49753int i;
49754_ACEOF
49755if ac_fn_cxx_try_compile "$LINENO"; then :
49756
49757else
49758  supports=no
49759fi
49760rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49761  ac_ext=cpp
49762ac_cpp='$CXXCPP $CPPFLAGS'
49763ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49764ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49765ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49766
49767  CXXFLAGS="$saved_cxxflags"
49768
49769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49770$as_echo "$supports" >&6; }
49771  if test "x$supports" = "xyes" ; then
49772    :
49773
49774  else
49775    :
49776    CXXSTD_CXXFLAG=""
49777  fi
49778
49779
49780
49781
49782
49783
49784
49785
49786
49787
49788
49789
49790    CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
49791    JVM_CFLAGS="${JVM_CFLAGS} ${CXXSTD_CXXFLAG}"
49792
49793  fi
49794  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49795    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49796    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49797  fi
49798
49799  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49800    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49801    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49802  fi
49803
49804  CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
49805  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
49806  LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
49807
49808  ###############################################################################
49809  #
49810  # Now setup the CFLAGS and LDFLAGS for the JDK build.
49811  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
49812  #
49813
49814  # Setup compiler/platform specific flags into
49815  #    CFLAGS_JDK    - C Compiler flags
49816  #    CXXFLAGS_JDK  - C++ Compiler flags
49817  #    COMMON_CCXXFLAGS_JDK - common to C and C++
49818  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49819    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49820    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
49821    JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
49822    if test "x$OPENJDK_TARGET_CPU" = xx86; then
49823      # Force compatibility with i586 on 32 bit intel platforms.
49824      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49825      JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49826    fi
49827    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49828        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49829    case $OPENJDK_TARGET_CPU_ARCH in
49830      arm )
49831        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49832        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49833        ;;
49834      ppc )
49835        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49836        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49837        ;;
49838      s390 )
49839        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
49840        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49841        ;;
49842      * )
49843        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49844        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49845        ;;
49846    esac
49847
49848
49849
49850
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    # Execute function body
49902
49903  # Need to assign to a variable since m4 is blocked from modifying parts in [].
49904  REFERENCE_VERSION=6
49905
49906  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
49907    as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
49908  fi
49909
49910  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
49911    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
49912  fi
49913
49914  # Version comparison method inspired by http://stackoverflow.com/a/24067243
49915  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
49916
49917  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
49918    :
49919
49920  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
49921  # runs afoul of the more aggressive versions of these optimisations.
49922  # Notably, value range propagation now assumes that the this pointer of C++
49923  # member functions is non-null.
49924  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
49925        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
49926        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
49927$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
49928  CFLAGS_JDK="$CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
49929  JVM_CFLAGS="$JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
49930
49931  else
49932    :
49933
49934  fi
49935
49936
49937
49938
49939
49940
49941
49942
49943
49944
49945
49946
49947
49948
49949  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49950    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49951
49952    # Restrict the debug information created by Clang to avoid
49953    # too big object files and speed the build up a little bit
49954    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
49955    JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
49956    if test "x$OPENJDK_TARGET_OS" = xlinux; then
49957      if test "x$OPENJDK_TARGET_CPU" = xx86; then
49958        # Force compatibility with i586 on 32 bit intel platforms.
49959        COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49960        JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49961      fi
49962      JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
49963      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49964          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49965      case $OPENJDK_TARGET_CPU_ARCH in
49966        ppc )
49967          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49968          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49969          ;;
49970        * )
49971          COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49972          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49973          ;;
49974      esac
49975    fi
49976  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49977    JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
49978    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
49979    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
49980      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
49981    fi
49982
49983    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
49984    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
49985  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49986    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
49987    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
49988    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
49989  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49990    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
49991        -MD -Zc:wchar_t- -W3 -wd4800 \
49992        -DWIN32_LEAN_AND_MEAN \
49993        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
49994        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
49995        -DWIN32 -DIAL"
49996    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
49997      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
49998    else
49999      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50000    fi
50001    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50002    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50003    # studio.
50004    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50005      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50006      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50007      JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50008    fi
50009  fi
50010
50011  ###############################################################################
50012
50013  # Adjust flags according to debug level.
50014  case $DEBUG_LEVEL in
50015    fastdebug | slowdebug )
50016      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50017      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50018      JAVAC_FLAGS="$JAVAC_FLAGS -g"
50019      ;;
50020    release )
50021      ;;
50022    * )
50023      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50024      ;;
50025  esac
50026
50027  # Set some common defines. These works for all compilers, but assume
50028  # -D is universally accepted.
50029
50030  # Setup endianness
50031  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50032    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50033    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50034    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50035    #   Note: -Dmacro         is the same as    #define macro 1
50036    #         -Dmacro=        is the same as    #define macro
50037    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50038      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50039    else
50040      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50041    fi
50042  else
50043    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50044    # are defined in the system?
50045    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50046      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50047    else
50048      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50049    fi
50050  fi
50051
50052  # Setup target OS define. Use OS target name but in upper case.
50053  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50054  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
50055
50056  # Setup target CPU
50057  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50058      $OPENJDK_TARGET_ADD_LP64 \
50059      -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
50060
50061  # Setup debug/release defines
50062  if test "x$DEBUG_LEVEL" = xrelease; then
50063    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
50064    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50065      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
50066    fi
50067  else
50068    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
50069  fi
50070
50071  # Set some additional per-OS defines.
50072  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50073    JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
50074    JVM_CFLAGS="$JVM_CFLAGS -pipe -fPIC -fno-rtti -fno-exceptions \
50075        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50076  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50077    JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
50078    JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
50079        -D_Crun_inline_placement -library=%none -KPIC -mt -xwe -features=no%except"
50080  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50081    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50082    JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
50083    JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50084    JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50085        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50086        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50087        -fno-omit-frame-pointer"
50088  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50089    JVM_CFLAGS="$JVM_CFLAGS -DAIX"
50090    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50091    JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced \
50092        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50093        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50094  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50095    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50096  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50097    JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50098    JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
50099  fi
50100
50101  # Set some additional per-CPU defines.
50102  if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
50103    JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
50104  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50105    JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
50106  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
50107    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50108      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50109      # fixes `relocation truncated to fit' error for gcc 4.1.
50110      JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
50111      # Use ppc64 instructions, but schedule for power5
50112      JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50113    elif test "x$OPENJDK_TARGET_OS" = xaix; then
50114      JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
50115    fi
50116  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
50117    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50118      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50119      # Little endian machine uses ELFv2 ABI.
50120      JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
50121      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50122      JVM_CFLAGS="$JVM_CFLAGS -mcpu=power7 -mtune=power8"
50123    fi
50124  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
50125    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50126      JVM_CFLAGS="$JVM_CFLAGS -mbackchain -march=z10"
50127    fi
50128  fi
50129
50130  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50131    JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50132  fi
50133
50134  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50135    if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
50136      # Solaris does not have _LP64=1 in the old build.
50137      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50138      JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
50139    fi
50140  fi
50141
50142  # Set JVM_CFLAGS warning handling
50143  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50144    JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50145        -Wunused-value -Woverloaded-virtual"
50146
50147    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50148
50149
50150
50151
50152
50153
50154
50155
50156
50157
50158
50159
50160
50161
50162
50163
50164
50165
50166
50167
50168
50169
50170
50171
50172
50173
50174
50175
50176
50177
50178
50179
50180
50181
50182
50183
50184
50185
50186
50187
50188
50189
50190
50191
50192
50193
50194
50195
50196
50197
50198
50199
50200
50201
50202    # Execute function body
50203
50204  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50205  REFERENCE_VERSION=4.8
50206
50207  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
50208    as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
50209  fi
50210
50211  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50212    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
50213  fi
50214
50215  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50216  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
50217
50218  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50219    :
50220
50221            # These flags either do not work or give spurious warnings prior to gcc 4.8.
50222            JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
50223
50224
50225  else
50226    :
50227
50228  fi
50229
50230
50231
50232
50233
50234
50235
50236
50237
50238
50239
50240
50241
50242
50243    fi
50244    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
50245      # Non-zero builds have stricter warnings
50246      JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
50247    else
50248      if test "x$TOOLCHAIN_TYPE" = xclang; then
50249        # Some versions of llvm do not like -Wundef
50250        JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
50251      fi
50252    fi
50253  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50254    JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
50255        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
50256  fi
50257
50258  # Additional macosx handling
50259  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50260    # Setting these parameters makes it an error to link to macosx APIs that are
50261    # newer than the given OS version and makes the linked binaries compatible
50262    # even if built on a newer version of the OS.
50263    # The expected format is X.Y.Z
50264    MACOSX_VERSION_MIN=10.7.0
50265
50266
50267    # The macro takes the version with no dots, ex: 1070
50268    # Let the flags variables get resolved in make for easier override on make
50269    # command line.
50270    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50271    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50272  fi
50273
50274  # Setup some hard coded includes
50275  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50276      -I${JDK_TOPDIR}/src/java.base/share/native/include \
50277      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
50278      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
50279      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
50280      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
50281
50282  # The shared libraries are compiled using the picflag.
50283  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50284      $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
50285  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50286      $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
50287
50288  # Executable flags
50289  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
50290  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
50291
50292
50293
50294
50295
50296
50297  # Setup LDFLAGS et al.
50298  #
50299
50300  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50301    LDFLAGS_MICROSOFT="-nologo -opt:ref"
50302    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
50303    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
50304    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50305      LDFLAGS_SAFESH="-safeseh"
50306      LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
50307      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
50308      # NOTE: Old build added -machine. Probably not needed.
50309      JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
50310    else
50311      JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
50312    fi
50313  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50314      JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
50315      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50316        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
50317        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50318    fi
50319  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50320    # If this is a --hash-style=gnu system, use --hash-style=both, why?
50321    # We have previously set HAS_GNU_HASH if this is the case
50322    if test -n "$HAS_GNU_HASH"; then
50323      LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
50324      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
50325      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
50326    fi
50327      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50328        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50329    fi
50330    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50331      # And since we now know that the linker is gnu, then add -z defs, to forbid
50332      # undefined symbols in object files.
50333      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
50334      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
50335      JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
50336      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
50337      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
50338      if test "x$OPENJDK_TARGET_CPU" = xx86; then
50339        JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
50340      fi
50341      case $DEBUG_LEVEL in
50342        release )
50343          # tell linker to optimize libraries.
50344          # Should this be supplied to the OSS linker as well?
50345          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
50346          LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
50347          JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
50348          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50349            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50350          fi
50351          ;;
50352        slowdebug )
50353          # Hotspot always let the linker optimize
50354          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50355          if test "x$HAS_LINKER_NOW" = "xtrue"; then
50356            # do relocations at load
50357            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
50358            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
50359            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
50360          fi
50361          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50362            # mark relocations read only
50363            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50364            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50365            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50366          fi
50367          ;;
50368        fastdebug )
50369          # Hotspot always let the linker optimize
50370          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50371          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50372            # mark relocations read only
50373            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50374            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50375            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50376          fi
50377          ;;
50378        * )
50379          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50380          ;;
50381        esac
50382    fi
50383  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50384    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
50385    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
50386    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
50387    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
50388    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
50389    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50390      JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
50391    fi
50392  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50393    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
50394    LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
50395    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
50396  fi
50397
50398  # Customize LDFLAGS for executables
50399
50400  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
50401
50402  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50403    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
50404      LDFLAGS_STACK_SIZE=1048576
50405    else
50406      LDFLAGS_STACK_SIZE=327680
50407    fi
50408    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
50409  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50410    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
50411  fi
50412
50413  LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
50414
50415  # Customize LDFLAGS for libs
50416  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
50417
50418  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
50419  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50420    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50421        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
50422    JDKLIB_LIBS=""
50423  else
50424    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50425        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)"
50426
50427    if test "xTARGET" = "xTARGET"; then
50428    # On some platforms (mac) the linker warns about non existing -L dirs.
50429    # Add server first if available. Linking aginst client does not always produce the same results.
50430      # Only add client/minimal dir if client/minimal is being built.
50431    # Default to server for other variants.
50432      if   [[ " $JVM_VARIANTS " =~ " server " ]]  ; then
50433        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50434      elif   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
50435        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/client"
50436      elif   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
50437        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/minimal"
50438    else
50439        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50440    fi
50441    elif test "xTARGET" = "xBUILD"; then
50442      # When building a buildjdk, it's always only the server variant
50443      JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50444          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50445    fi
50446
50447    JDKLIB_LIBS="-ljava -ljvm"
50448    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50449      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
50450    fi
50451
50452  fi
50453
50454LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${JAVA_BASE_LDFLAGS}"
50455
50456  # Set JVM_LIBS (per os)
50457  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50458    JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
50459  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50460    # FIXME: This hard-coded path is not really proper.
50461    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50462      SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
50463    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50464      SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
50465    fi
50466    JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
50467        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
50468  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50469    JVM_LIBS="$JVM_LIBS -lm"
50470  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50471    JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
50472  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50473    JVM_LIBS="$JVM_LIBS -lm"
50474  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50475    JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
50476        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
50477        wsock32.lib winmm.lib version.lib psapi.lib"
50478    fi
50479
50480  # Set JVM_ASFLAGS
50481  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50482    if test "x$OPENJDK_TARGET_CPU" = xx86; then
50483      JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
50484    fi
50485  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50486    JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
50487  fi
50488
50489  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
50490
50491
50492
50493
50494
50495
50496
50497
50498
50499
50500
50501
50502
50503
50504
50505  # Special extras...
50506  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50507    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
50508      OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50509      OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50510    fi
50511    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50512    OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50513  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50514    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50515    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50516  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50517    OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
50518
50519
50520
50521
50522
50523
50524
50525
50526
50527
50528
50529
50530
50531
50532
50533
50534
50535
50536
50537
50538
50539
50540
50541
50542
50543
50544
50545
50546
50547
50548
50549
50550
50551
50552
50553
50554
50555
50556
50557
50558
50559
50560    # Execute function body
50561
50562  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
50563$as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
50564  supports=yes
50565
50566  saved_cxxflags="$CXXFLAGS"
50567  CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
50568  ac_ext=cpp
50569ac_cpp='$CXXCPP $CPPFLAGS'
50570ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50571ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50572ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50573
50574  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50575/* end confdefs.h.  */
50576int i;
50577_ACEOF
50578if ac_fn_cxx_try_compile "$LINENO"; then :
50579
50580else
50581  supports=no
50582fi
50583rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50584  ac_ext=cpp
50585ac_cpp='$CXXCPP $CPPFLAGS'
50586ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50587ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50588ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50589
50590  CXXFLAGS="$saved_cxxflags"
50591
50592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50593$as_echo "$supports" >&6; }
50594  if test "x$supports" = "xyes" ; then
50595    :
50596
50597  else
50598    :
50599    OPENJDK_BUILD_CXXSTD_CXXFLAG=""
50600  fi
50601
50602
50603
50604
50605
50606
50607
50608
50609
50610
50611
50612
50613    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50614    OPENJDK_BUILD_JVM_CFLAGS="${OPENJDK_BUILD_JVM_CFLAGS} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50615
50616  fi
50617  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50618    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50619    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50620  fi
50621
50622  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50623    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50624    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50625  fi
50626
50627  OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
50628  OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
50629  OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
50630
50631  ###############################################################################
50632  #
50633  # Now setup the CFLAGS and LDFLAGS for the JDK build.
50634  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
50635  #
50636
50637  # Setup compiler/platform specific flags into
50638  #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
50639  #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
50640  #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
50641  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50642    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50643    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
50644    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
50645    if test "x$OPENJDK_BUILD_CPU" = xx86; then
50646      # Force compatibility with i586 on 32 bit intel platforms.
50647      OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50648      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50649    fi
50650    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50651        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50652    case $OPENJDK_BUILD_CPU_ARCH in
50653      arm )
50654        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50655        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50656        ;;
50657      ppc )
50658        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50659        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50660        ;;
50661      s390 )
50662        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
50663        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50664        ;;
50665      * )
50666        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50667        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50668        ;;
50669    esac
50670
50671
50672
50673
50674
50675
50676
50677
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    # Execute function body
50725
50726  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50727  REFERENCE_VERSION=6
50728
50729  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
50730    as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
50731  fi
50732
50733  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50734    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50735  fi
50736
50737  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50738  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
50739
50740  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50741    :
50742
50743  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
50744  # runs afoul of the more aggressive versions of these optimisations.
50745  # Notably, value range propagation now assumes that the this pointer of C++
50746  # member functions is non-null.
50747  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
50748        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
50749        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
50750$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
50751  OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50752  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50753
50754  else
50755    :
50756
50757  fi
50758
50759
50760
50761
50762
50763
50764
50765
50766
50767
50768
50769
50770
50771
50772  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50773    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50774
50775    # Restrict the debug information created by Clang to avoid
50776    # too big object files and speed the build up a little bit
50777    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50778    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
50779    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50780      if test "x$OPENJDK_BUILD_CPU" = xx86; then
50781        # Force compatibility with i586 on 32 bit intel platforms.
50782        OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50783        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50784      fi
50785      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
50786      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50787          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50788      case $OPENJDK_BUILD_CPU_ARCH in
50789        ppc )
50790          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50791          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50792          ;;
50793        * )
50794          OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50795          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50796          ;;
50797      esac
50798    fi
50799  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50800    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
50801    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50802    if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
50803      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
50804    fi
50805
50806    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50807    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50808  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50809    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50810    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50811    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50812  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50813    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50814        -MD -Zc:wchar_t- -W3 -wd4800 \
50815        -DWIN32_LEAN_AND_MEAN \
50816        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50817        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50818        -DWIN32 -DIAL"
50819    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
50820      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50821    else
50822      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50823    fi
50824    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50825    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50826    # studio.
50827    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50828      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50829      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50830      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50831    fi
50832  fi
50833
50834  ###############################################################################
50835
50836  # Adjust flags according to debug level.
50837  case $DEBUG_LEVEL in
50838    fastdebug | slowdebug )
50839      OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50840      OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50841      JAVAC_FLAGS="$JAVAC_FLAGS -g"
50842      ;;
50843    release )
50844      ;;
50845    * )
50846      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50847      ;;
50848  esac
50849
50850  # Set some common defines. These works for all compilers, but assume
50851  # -D is universally accepted.
50852
50853  # Setup endianness
50854  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50855    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50856    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50857    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50858    #   Note: -Dmacro         is the same as    #define macro 1
50859    #         -Dmacro=        is the same as    #define macro
50860    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50861      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50862    else
50863      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50864    fi
50865  else
50866    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50867    # are defined in the system?
50868    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50869      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50870    else
50871      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50872    fi
50873  fi
50874
50875  # Setup target OS define. Use OS target name but in upper case.
50876  OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50877  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
50878
50879  # Setup target CPU
50880  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50881      $OPENJDK_BUILD_ADD_LP64 \
50882      -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
50883
50884  # Setup debug/release defines
50885  if test "x$DEBUG_LEVEL" = xrelease; then
50886    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
50887    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50888      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
50889    fi
50890  else
50891    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
50892  fi
50893
50894  # Set some additional per-OS defines.
50895  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50896    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
50897    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe -fPIC -fno-rtti -fno-exceptions \
50898        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50899  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
50900    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
50901    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
50902        -D_Crun_inline_placement -library=%none -KPIC -mt -xwe -features=no%except"
50903  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
50904    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50905    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
50906    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50907    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50908        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50909        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50910        -fno-omit-frame-pointer"
50911  elif test "x$OPENJDK_BUILD_OS" = xaix; then
50912    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
50913    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50914    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced \
50915        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50916        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50917  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
50918    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50919  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
50920    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50921    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
50922  fi
50923
50924  # Set some additional per-CPU defines.
50925  if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
50926    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
50927  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
50928    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
50929  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
50930    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50931      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50932      # fixes `relocation truncated to fit' error for gcc 4.1.
50933      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
50934      # Use ppc64 instructions, but schedule for power5
50935      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50936    elif test "x$OPENJDK_BUILD_OS" = xaix; then
50937      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
50938    fi
50939  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
50940    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50941      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50942      # Little endian machine uses ELFv2 ABI.
50943      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
50944      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50945      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power7 -mtune=power8"
50946    fi
50947  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
50948    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50949      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mbackchain -march=z10"
50950    fi
50951  fi
50952
50953  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50954    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50955  fi
50956
50957  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
50958    if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
50959      # Solaris does not have _LP64=1 in the old build.
50960      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50961      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
50962    fi
50963  fi
50964
50965  # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
50966  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50967    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50968        -Wunused-value -Woverloaded-virtual"
50969
50970    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50971
50972
50973
50974
50975
50976
50977
50978
50979
50980
50981
50982
50983
50984
50985
50986
50987
50988
50989
50990
50991
50992
50993
50994
50995
50996
50997
50998
50999
51000
51001
51002
51003
51004
51005
51006
51007
51008
51009
51010
51011
51012
51013
51014
51015
51016
51017
51018
51019
51020
51021
51022
51023
51024
51025    # Execute function body
51026
51027  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51028  REFERENCE_VERSION=4.8
51029
51030  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
51031    as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
51032  fi
51033
51034  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51035    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
51036  fi
51037
51038  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51039  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
51040
51041  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51042    :
51043
51044            # These flags either do not work or give spurious warnings prior to gcc 4.8.
51045            OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
51046
51047
51048  else
51049    :
51050
51051  fi
51052
51053
51054
51055
51056
51057
51058
51059
51060
51061
51062
51063
51064
51065
51066    fi
51067    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
51068      # Non-zero builds have stricter warnings
51069      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51070    else
51071      if test "x$TOOLCHAIN_TYPE" = xclang; then
51072        # Some versions of llvm do not like -Wundef
51073        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
51074      fi
51075    fi
51076  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51077    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51078        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51079  fi
51080
51081  # Additional macosx handling
51082  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51083    # Setting these parameters makes it an error to link to macosx APIs that are
51084    # newer than the given OS version and makes the linked binaries compatible
51085    # even if built on a newer version of the OS.
51086    # The expected format is X.Y.Z
51087    MACOSX_VERSION_MIN=10.7.0
51088
51089
51090    # The macro takes the version with no dots, ex: 1070
51091    # Let the flags variables get resolved in make for easier override on make
51092    # command line.
51093    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)"
51094    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51095  fi
51096
51097  # Setup some hard coded includes
51098  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51099      -I${JDK_TOPDIR}/src/java.base/share/native/include \
51100      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
51101      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
51102      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51103      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
51104
51105  # The shared libraries are compiled using the picflag.
51106  OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51107      $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
51108  OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51109      $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
51110
51111  # Executable flags
51112  OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
51113  OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
51114
51115
51116
51117
51118
51119
51120  # Setup LDFLAGS et al.
51121  #
51122
51123  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51124    LDFLAGS_MICROSOFT="-nologo -opt:ref"
51125    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51126    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51127    if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
51128      LDFLAGS_SAFESH="-safeseh"
51129      OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
51130      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
51131      # NOTE: Old build added -machine. Probably not needed.
51132      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
51133    else
51134      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
51135    fi
51136  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51137      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51138      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51139        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51140        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51141    fi
51142  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51143    # If this is a --hash-style=gnu system, use --hash-style=both, why?
51144    # We have previously set HAS_GNU_HASH if this is the case
51145    if test -n "$HAS_GNU_HASH"; then
51146      OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51147      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51148      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51149    fi
51150      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51151        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51152    fi
51153    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51154      # And since we now know that the linker is gnu, then add -z defs, to forbid
51155      # undefined symbols in object files.
51156      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51157      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51158      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51159      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51160      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51161      if test "x$OPENJDK_BUILD_CPU" = xx86; then
51162        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
51163      fi
51164      case $DEBUG_LEVEL in
51165        release )
51166          # tell linker to optimize libraries.
51167          # Should this be supplied to the OSS linker as well?
51168          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51169          OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51170          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51171          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51172            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51173          fi
51174          ;;
51175        slowdebug )
51176          # Hotspot always let the linker optimize
51177          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51178          if test "x$HAS_LINKER_NOW" = "xtrue"; then
51179            # do relocations at load
51180            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
51181            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51182            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
51183          fi
51184          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51185            # mark relocations read only
51186            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51187            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51188            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51189          fi
51190          ;;
51191        fastdebug )
51192          # Hotspot always let the linker optimize
51193          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51194          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51195            # mark relocations read only
51196            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51197            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51198            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51199          fi
51200          ;;
51201        * )
51202          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51203          ;;
51204        esac
51205    fi
51206  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51207    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
51208    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
51209    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
51210    OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
51211    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
51212    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
51213      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
51214    fi
51215  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51216    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
51217    OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
51218    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
51219  fi
51220
51221  # Customize LDFLAGS for executables
51222
51223  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
51224
51225  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51226    if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
51227      LDFLAGS_STACK_SIZE=1048576
51228    else
51229      LDFLAGS_STACK_SIZE=327680
51230    fi
51231    OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
51232  elif test "x$OPENJDK_BUILD_OS" = xlinux; then
51233    OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
51234  fi
51235
51236  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51237
51238  # Customize LDFLAGS for libs
51239  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
51240
51241  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
51242  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51243    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51244        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
51245    OPENJDK_BUILD_JDKLIB_LIBS=""
51246  else
51247    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51248        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)"
51249
51250    if test "xBUILD" = "xTARGET"; then
51251    # On some platforms (mac) the linker warns about non existing -L dirs.
51252    # Add server first if available. Linking aginst client does not always produce the same results.
51253      # Only add client/minimal dir if client/minimal is being built.
51254    # Default to server for other variants.
51255      if   [[ " $JVM_VARIANTS " =~ " server " ]]  ; then
51256        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51257      elif   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
51258        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/client"
51259      elif   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
51260        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/minimal"
51261    else
51262        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51263    fi
51264    elif test "xBUILD" = "xBUILD"; then
51265      # When building a buildjdk, it's always only the server variant
51266      OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51267          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51268    fi
51269
51270    OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
51271    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51272      OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
51273    fi
51274
51275  fi
51276
51277OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_JAVA_BASE_LDFLAGS}"
51278
51279  # Set OPENJDK_BUILD_JVM_LIBS (per os)
51280  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51281    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
51282  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51283    # FIXME: This hard-coded path is not really proper.
51284    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
51285      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
51286    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51287      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
51288    fi
51289    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
51290        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
51291  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51292    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51293  elif test "x$OPENJDK_BUILD_OS" = xaix; then
51294    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
51295  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51296    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51297  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51298    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
51299        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
51300        wsock32.lib winmm.lib version.lib psapi.lib"
51301    fi
51302
51303  # Set OPENJDK_BUILD_JVM_ASFLAGS
51304  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51305    if test "x$OPENJDK_BUILD_CPU" = xx86; then
51306      OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
51307    fi
51308  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51309    OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
51310  fi
51311
51312  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51313
51314
51315
51316
51317
51318
51319
51320
51321
51322
51323
51324
51325
51326
51327
51328  # Tests are only ever compiled for TARGET
51329  # Flags for compiling test libraries
51330  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51331  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51332
51333  # Flags for compiling test executables
51334  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
51335  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
51336
51337
51338
51339
51340
51341
51342  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
51343  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE $JAVA_BASE_LDFLAGS"
51344
51345
51346
51347
51348
51349
51350  # Some Zero and Shark settings.
51351  # ZERO_ARCHFLAG tells the compiler which mode to build for
51352  case "${OPENJDK_TARGET_CPU}" in
51353    s390)
51354      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
51355      ;;
51356    *)
51357      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51358  esac
51359
51360
51361
51362
51363
51364
51365
51366
51367
51368
51369
51370
51371
51372
51373
51374
51375
51376
51377
51378
51379
51380
51381
51382
51383
51384
51385
51386
51387
51388
51389
51390
51391
51392
51393
51394
51395
51396
51397
51398
51399
51400
51401    # Execute function body
51402
51403
51404
51405
51406
51407
51408
51409
51410
51411
51412
51413
51414
51415
51416
51417
51418
51419
51420
51421
51422
51423
51424
51425
51426
51427
51428
51429
51430
51431
51432
51433
51434
51435
51436
51437
51438
51439
51440
51441
51442
51443
51444
51445
51446
51447
51448
51449
51450    # Execute function body
51451
51452  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$ZERO_ARCHFLAG\"" >&5
51453$as_echo_n "checking if the C compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51454  supports=yes
51455
51456  saved_cflags="$CFLAGS"
51457  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
51458  ac_ext=c
51459ac_cpp='$CPP $CPPFLAGS'
51460ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51461ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51462ac_compiler_gnu=$ac_cv_c_compiler_gnu
51463
51464  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51465/* end confdefs.h.  */
51466int i;
51467_ACEOF
51468if ac_fn_c_try_compile "$LINENO"; then :
51469
51470else
51471  supports=no
51472fi
51473rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51474  ac_ext=cpp
51475ac_cpp='$CXXCPP $CPPFLAGS'
51476ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51477ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51478ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51479
51480  CFLAGS="$saved_cflags"
51481
51482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51483$as_echo "$supports" >&6; }
51484  if test "x$supports" = "xyes" ; then
51485    :
51486    C_COMP_SUPPORTS="yes"
51487  else
51488    :
51489    C_COMP_SUPPORTS="no"
51490  fi
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
51538
51539
51540
51541
51542
51543
51544
51545
51546
51547
51548
51549
51550    # Execute function body
51551
51552  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"" >&5
51553$as_echo_n "checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51554  supports=yes
51555
51556  saved_cxxflags="$CXXFLAGS"
51557  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
51558  ac_ext=cpp
51559ac_cpp='$CXXCPP $CPPFLAGS'
51560ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51561ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51562ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51563
51564  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51565/* end confdefs.h.  */
51566int i;
51567_ACEOF
51568if ac_fn_cxx_try_compile "$LINENO"; then :
51569
51570else
51571  supports=no
51572fi
51573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51574  ac_ext=cpp
51575ac_cpp='$CXXCPP $CPPFLAGS'
51576ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51577ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51578ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51579
51580  CXXFLAGS="$saved_cxxflags"
51581
51582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51583$as_echo "$supports" >&6; }
51584  if test "x$supports" = "xyes" ; then
51585    :
51586    CXX_COMP_SUPPORTS="yes"
51587  else
51588    :
51589    CXX_COMP_SUPPORTS="no"
51590  fi
51591
51592
51593
51594
51595
51596
51597
51598
51599
51600
51601
51602
51603
51604  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$ZERO_ARCHFLAG\"" >&5
51605$as_echo_n "checking if both compilers support \"$ZERO_ARCHFLAG\"... " >&6; }
51606  supports=no
51607  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51608
51609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51610$as_echo "$supports" >&6; }
51611  if test "x$supports" = "xyes" ; then
51612    :
51613
51614  else
51615    :
51616    ZERO_ARCHFLAG=""
51617  fi
51618
51619
51620
51621
51622
51623
51624
51625
51626  # Check that the compiler supports -mX (or -qX on AIX) flags
51627  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
51628
51629
51630
51631
51632
51633
51634
51635
51636
51637
51638
51639
51640
51641
51642
51643
51644
51645
51646
51647
51648
51649
51650
51651
51652
51653
51654
51655
51656
51657
51658
51659
51660
51661
51662
51663
51664
51665
51666
51667
51668
51669
51670
51671
51672
51673
51674
51675    # Execute function body
51676
51677
51678
51679
51680
51681
51682
51683
51684
51685
51686
51687
51688
51689
51690
51691
51692
51693
51694
51695
51696
51697
51698
51699
51700
51701
51702
51703
51704
51705
51706
51707
51708
51709
51710
51711
51712
51713
51714
51715
51716
51717
51718
51719
51720
51721
51722
51723
51724    # Execute function body
51725
51726  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51727$as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51728  supports=yes
51729
51730  saved_cflags="$CFLAGS"
51731  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51732  ac_ext=c
51733ac_cpp='$CPP $CPPFLAGS'
51734ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51735ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51736ac_compiler_gnu=$ac_cv_c_compiler_gnu
51737
51738  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51739/* end confdefs.h.  */
51740int i;
51741_ACEOF
51742if ac_fn_c_try_compile "$LINENO"; then :
51743
51744else
51745  supports=no
51746fi
51747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51748  ac_ext=cpp
51749ac_cpp='$CXXCPP $CPPFLAGS'
51750ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51751ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51752ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51753
51754  CFLAGS="$saved_cflags"
51755
51756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51757$as_echo "$supports" >&6; }
51758  if test "x$supports" = "xyes" ; then
51759    :
51760    C_COMP_SUPPORTS="yes"
51761  else
51762    :
51763    C_COMP_SUPPORTS="no"
51764  fi
51765
51766
51767
51768
51769
51770
51771
51772
51773
51774
51775
51776
51777
51778
51779
51780
51781
51782
51783
51784
51785
51786
51787
51788
51789
51790
51791
51792
51793
51794
51795
51796
51797
51798
51799
51800
51801
51802
51803
51804
51805
51806
51807
51808
51809
51810
51811
51812
51813
51814
51815
51816
51817
51818
51819
51820
51821
51822
51823
51824    # Execute function body
51825
51826  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51827$as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51828  supports=yes
51829
51830  saved_cxxflags="$CXXFLAGS"
51831  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51832  ac_ext=cpp
51833ac_cpp='$CXXCPP $CPPFLAGS'
51834ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51835ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51836ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51837
51838  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51839/* end confdefs.h.  */
51840int i;
51841_ACEOF
51842if ac_fn_cxx_try_compile "$LINENO"; then :
51843
51844else
51845  supports=no
51846fi
51847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51848  ac_ext=cpp
51849ac_cpp='$CXXCPP $CPPFLAGS'
51850ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51851ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51852ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51853
51854  CXXFLAGS="$saved_cxxflags"
51855
51856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51857$as_echo "$supports" >&6; }
51858  if test "x$supports" = "xyes" ; then
51859    :
51860    CXX_COMP_SUPPORTS="yes"
51861  else
51862    :
51863    CXX_COMP_SUPPORTS="no"
51864  fi
51865
51866
51867
51868
51869
51870
51871
51872
51873
51874
51875
51876
51877
51878  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51879$as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51880  supports=no
51881  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51882
51883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51884$as_echo "$supports" >&6; }
51885  if test "x$supports" = "xyes" ; then
51886    :
51887    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
51888  else
51889    :
51890    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
51891  fi
51892
51893
51894
51895
51896
51897
51898
51899
51900  # Check whether --enable-warnings-as-errors was given.
51901if test "${enable_warnings_as_errors+set}" = set; then :
51902  enableval=$enable_warnings_as_errors;
51903fi
51904
51905
51906  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
51907$as_echo_n "checking if native warnings are errors... " >&6; }
51908  if test "x$enable_warnings_as_errors" = "xyes"; then
51909    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
51910$as_echo "yes (explicitely set)" >&6; }
51911    WARNINGS_AS_ERRORS=true
51912  elif test "x$enable_warnings_as_errors" = "xno"; then
51913    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51914$as_echo "no" >&6; }
51915    WARNINGS_AS_ERRORS=false
51916  elif test "x$enable_warnings_as_errors" = "x"; then
51917    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
51918$as_echo "yes (default)" >&6; }
51919    WARNINGS_AS_ERRORS=true
51920  else
51921    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
51922  fi
51923
51924  if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
51925    # Set legacy hotspot variable
51926    HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
51927  else
51928    HOTSPOT_SET_WARNINGS_AS_ERRORS=""
51929  fi
51930
51931
51932
51933
51934  case "${TOOLCHAIN_TYPE}" in
51935    microsoft)
51936      DISABLE_WARNING_PREFIX="-wd"
51937      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
51938      ;;
51939    solstudio)
51940      DISABLE_WARNING_PREFIX="-erroff="
51941      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
51942      ;;
51943    gcc)
51944      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
51945
51946
51947
51948
51949
51950
51951
51952
51953
51954
51955
51956
51957
51958
51959
51960
51961
51962
51963
51964
51965
51966
51967
51968
51969
51970
51971
51972
51973
51974
51975
51976
51977
51978
51979
51980
51981
51982
51983
51984
51985
51986
51987
51988
51989
51990
51991
51992    # Execute function body
51993
51994
51995
51996
51997
51998
51999
52000
52001
52002
52003
52004
52005
52006
52007
52008
52009
52010
52011
52012
52013
52014
52015
52016
52017
52018
52019
52020
52021
52022
52023
52024
52025
52026
52027
52028
52029
52030
52031
52032
52033
52034
52035
52036
52037
52038
52039
52040
52041    # Execute function body
52042
52043  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52044$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52045  supports=yes
52046
52047  saved_cflags="$CFLAGS"
52048  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52049  ac_ext=c
52050ac_cpp='$CPP $CPPFLAGS'
52051ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52052ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52053ac_compiler_gnu=$ac_cv_c_compiler_gnu
52054
52055  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52056/* end confdefs.h.  */
52057int i;
52058_ACEOF
52059if ac_fn_c_try_compile "$LINENO"; then :
52060
52061else
52062  supports=no
52063fi
52064rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52065  ac_ext=cpp
52066ac_cpp='$CXXCPP $CPPFLAGS'
52067ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52068ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52069ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52070
52071  CFLAGS="$saved_cflags"
52072
52073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52074$as_echo "$supports" >&6; }
52075  if test "x$supports" = "xyes" ; then
52076    :
52077    C_COMP_SUPPORTS="yes"
52078  else
52079    :
52080    C_COMP_SUPPORTS="no"
52081  fi
52082
52083
52084
52085
52086
52087
52088
52089
52090
52091
52092
52093
52094
52095
52096
52097
52098
52099
52100
52101
52102
52103
52104
52105
52106
52107
52108
52109
52110
52111
52112
52113
52114
52115
52116
52117
52118
52119
52120
52121
52122
52123
52124
52125
52126
52127
52128
52129
52130
52131
52132
52133
52134
52135
52136
52137
52138
52139
52140
52141    # Execute function body
52142
52143  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52144$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52145  supports=yes
52146
52147  saved_cxxflags="$CXXFLAGS"
52148  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52149  ac_ext=cpp
52150ac_cpp='$CXXCPP $CPPFLAGS'
52151ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52152ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52153ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52154
52155  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52156/* end confdefs.h.  */
52157int i;
52158_ACEOF
52159if ac_fn_cxx_try_compile "$LINENO"; then :
52160
52161else
52162  supports=no
52163fi
52164rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52165  ac_ext=cpp
52166ac_cpp='$CXXCPP $CPPFLAGS'
52167ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52168ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52169ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52170
52171  CXXFLAGS="$saved_cxxflags"
52172
52173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52174$as_echo "$supports" >&6; }
52175  if test "x$supports" = "xyes" ; then
52176    :
52177    CXX_COMP_SUPPORTS="yes"
52178  else
52179    :
52180    CXX_COMP_SUPPORTS="no"
52181  fi
52182
52183
52184
52185
52186
52187
52188
52189
52190
52191
52192
52193
52194
52195  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52196$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52197  supports=no
52198  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52199
52200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52201$as_echo "$supports" >&6; }
52202  if test "x$supports" = "xyes" ; then
52203    :
52204    GCC_CAN_DISABLE_WARNINGS=true
52205  else
52206    :
52207    GCC_CAN_DISABLE_WARNINGS=false
52208
52209  fi
52210
52211
52212
52213
52214
52215
52216      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52217        DISABLE_WARNING_PREFIX="-Wno-"
52218      else
52219        DISABLE_WARNING_PREFIX=
52220      fi
52221      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52222      # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
52223      # CFLAGS since any target specific flags will likely not work with the
52224      # build compiler
52225      CC_OLD="$CC"
52226      CXX_OLD="$CXX"
52227      CC="$BUILD_CC"
52228      CXX="$BUILD_CXX"
52229      CFLAGS_OLD="$CFLAGS"
52230      CFLAGS=""
52231
52232
52233
52234
52235
52236
52237
52238
52239
52240
52241
52242
52243
52244
52245
52246
52247
52248
52249
52250
52251
52252
52253
52254
52255
52256
52257
52258
52259
52260
52261
52262
52263
52264
52265
52266
52267
52268
52269
52270
52271
52272
52273
52274
52275
52276
52277
52278    # Execute function body
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    # Execute function body
52328
52329  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52330$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52331  supports=yes
52332
52333  saved_cflags="$CFLAGS"
52334  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52335  ac_ext=c
52336ac_cpp='$CPP $CPPFLAGS'
52337ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52338ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52339ac_compiler_gnu=$ac_cv_c_compiler_gnu
52340
52341  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52342/* end confdefs.h.  */
52343int i;
52344_ACEOF
52345if ac_fn_c_try_compile "$LINENO"; then :
52346
52347else
52348  supports=no
52349fi
52350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52351  ac_ext=cpp
52352ac_cpp='$CXXCPP $CPPFLAGS'
52353ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52354ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52355ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52356
52357  CFLAGS="$saved_cflags"
52358
52359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52360$as_echo "$supports" >&6; }
52361  if test "x$supports" = "xyes" ; then
52362    :
52363    C_COMP_SUPPORTS="yes"
52364  else
52365    :
52366    C_COMP_SUPPORTS="no"
52367  fi
52368
52369
52370
52371
52372
52373
52374
52375
52376
52377
52378
52379
52380
52381
52382
52383
52384
52385
52386
52387
52388
52389
52390
52391
52392
52393
52394
52395
52396
52397
52398
52399
52400
52401
52402
52403
52404
52405
52406
52407
52408
52409
52410
52411
52412
52413
52414
52415
52416
52417
52418
52419
52420
52421
52422
52423
52424
52425
52426
52427    # Execute function body
52428
52429  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52430$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52431  supports=yes
52432
52433  saved_cxxflags="$CXXFLAGS"
52434  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52435  ac_ext=cpp
52436ac_cpp='$CXXCPP $CPPFLAGS'
52437ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52438ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52439ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52440
52441  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52442/* end confdefs.h.  */
52443int i;
52444_ACEOF
52445if ac_fn_cxx_try_compile "$LINENO"; then :
52446
52447else
52448  supports=no
52449fi
52450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52451  ac_ext=cpp
52452ac_cpp='$CXXCPP $CPPFLAGS'
52453ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52454ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52455ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52456
52457  CXXFLAGS="$saved_cxxflags"
52458
52459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52460$as_echo "$supports" >&6; }
52461  if test "x$supports" = "xyes" ; then
52462    :
52463    CXX_COMP_SUPPORTS="yes"
52464  else
52465    :
52466    CXX_COMP_SUPPORTS="no"
52467  fi
52468
52469
52470
52471
52472
52473
52474
52475
52476
52477
52478
52479
52480
52481  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52482$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52483  supports=no
52484  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52485
52486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52487$as_echo "$supports" >&6; }
52488  if test "x$supports" = "xyes" ; then
52489    :
52490    BUILD_CC_CAN_DISABLE_WARNINGS=true
52491  else
52492    :
52493    BUILD_CC_CAN_DISABLE_WARNINGS=false
52494
52495  fi
52496
52497
52498
52499
52500
52501
52502      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52503        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
52504      else
52505        BUILD_CC_DISABLE_WARNING_PREFIX=
52506      fi
52507      CC="$CC_OLD"
52508      CXX="$CXX_OLD"
52509      CFLAGS="$CFLAGS_OLD"
52510      ;;
52511    clang)
52512      DISABLE_WARNING_PREFIX="-Wno-"
52513      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52514      ;;
52515    xlc)
52516      DISABLE_WARNING_PREFIX="-qsuppress="
52517      CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
52518      ;;
52519  esac
52520
52521
52522
52523
52524
52525# Setup debug symbols (need objcopy from the toolchain for that)
52526
52527  #
52528  # NATIVE_DEBUG_SYMBOLS
52529  # This must be done after the toolchain is setup, since we're looking at objcopy.
52530  #
52531  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
52532$as_echo_n "checking what type of native debug symbols to use... " >&6; }
52533
52534# Check whether --with-native-debug-symbols was given.
52535if test "${with_native_debug_symbols+set}" = set; then :
52536  withval=$with_native_debug_symbols;
52537        if test "x$OPENJDK_TARGET_OS" = xaix; then
52538          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
52539            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
52540          fi
52541        fi
52542
52543else
52544
52545        if test "x$OPENJDK_TARGET_OS" = xaix; then
52546          # AIX doesn't support 'zipped' so use 'internal' as default
52547          with_native_debug_symbols="internal"
52548        else
52549          if test "x$STATIC_BUILD" = xtrue; then
52550            with_native_debug_symbols="none"
52551          else
52552            with_native_debug_symbols="zipped"
52553          fi
52554        fi
52555
52556fi
52557
52558  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
52559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
52560$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
52561
52562  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
52563
52564    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52565      if test "x$OBJCOPY" = x; then
52566        # enabling of enable-debug-symbols and can't find objcopy
52567        # this is an error
52568        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52569      fi
52570    fi
52571
52572    COMPILE_WITH_DEBUG_SYMBOLS=true
52573    COPY_DEBUG_SYMBOLS=true
52574    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
52575
52576    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
52577    DEBUG_BINARIES=false
52578    STRIP_POLICY=min_strip
52579
52580  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
52581    COMPILE_WITH_DEBUG_SYMBOLS=false
52582    COPY_DEBUG_SYMBOLS=false
52583    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52584
52585    DEBUG_BINARIES=false
52586    STRIP_POLICY=no_strip
52587  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
52588    COMPILE_WITH_DEBUG_SYMBOLS=true
52589    COPY_DEBUG_SYMBOLS=false
52590    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52591
52592    # Hotspot legacy support, will turn on -g when COPY_DEBUG_SYMBOLS=false
52593    DEBUG_BINARIES=true
52594    STRIP_POLICY=no_strip
52595    STRIP=""
52596
52597  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
52598
52599    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52600      if test "x$OBJCOPY" = x; then
52601        # enabling of enable-debug-symbols and can't find objcopy
52602        # this is an error
52603        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52604      fi
52605    fi
52606
52607    COMPILE_WITH_DEBUG_SYMBOLS=true
52608    COPY_DEBUG_SYMBOLS=true
52609    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52610
52611    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
52612    DEBUG_BINARIES=false
52613    STRIP_POLICY=min_strip
52614  else
52615    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
52616  fi
52617
52618  # --enable-debug-symbols is deprecated.
52619  # Please use --with-native-debug-symbols=[internal,external,zipped] .
52620
52621  # Check whether --enable-debug-symbols was given.
52622if test "${enable_debug_symbols+set}" = set; then :
52623  enableval=$enable_debug_symbols;
52624fi
52625
52626  if test "x$enable_debug_symbols" != x; then
52627    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
52628$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
52629
52630    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
52631      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
52632$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
52633    fi
52634
52635  fi
52636
52637
52638  # --enable-zip-debug-info is deprecated.
52639  # Please use --with-native-debug-symbols=zipped .
52640
52641  # Check whether --enable-zip-debug-info was given.
52642if test "${enable_zip_debug_info+set}" = set; then :
52643  enableval=$enable_zip_debug_info;
52644fi
52645
52646  if test "x$enable_zip_debug_info" != x; then
52647    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
52648$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
52649
52650    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
52651      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
52652$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
52653    fi
52654
52655  fi
52656
52657
52658
52659
52660
52661
52662  # Legacy values
52663
52664
52665
52666
52667  # Check whether --enable-native-coverage was given.
52668if test "${enable_native_coverage+set}" = set; then :
52669  enableval=$enable_native_coverage;
52670fi
52671
52672  GCOV_ENABLED="false"
52673  if test "x$enable_native_coverage" = "xyes"; then
52674    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
52675      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52676$as_echo_n "checking if native coverage is enabled... " >&6; }
52677      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52678$as_echo "yes" >&6; }
52679      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
52680      GCOV_LDFLAGS="-fprofile-arcs"
52681      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
52682      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
52683      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
52684      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
52685      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
52686      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
52687      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
52688      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
52689      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
52690      GCOV_ENABLED="true"
52691    else
52692      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
52693    fi
52694  elif test "x$enable_native_coverage" = "xno"; then
52695    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52696$as_echo_n "checking if native coverage is enabled... " >&6; }
52697    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52698$as_echo "no" >&6; }
52699  elif test "x$enable_native_coverage" != "x"; then
52700    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
52701  fi
52702
52703
52704
52705
52706# Need toolchain to setup dtrace
52707
52708  # Test for dtrace dependencies
52709  # Check whether --enable-dtrace was given.
52710if test "${enable_dtrace+set}" = set; then :
52711  enableval=$enable_dtrace;
52712fi
52713
52714
52715  DTRACE_DEP_MISSING=false
52716
52717  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
52718$as_echo_n "checking for dtrace tool... " >&6; }
52719  if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
52720    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
52721$as_echo "$DTRACE" >&6; }
52722  else
52723    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
52724$as_echo "not found, cannot build dtrace" >&6; }
52725    DTRACE_DEP_MISSING=true
52726  fi
52727
52728  for ac_header in sys/sdt.h
52729do :
52730  ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
52731if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
52732  cat >>confdefs.h <<_ACEOF
52733#define HAVE_SYS_SDT_H 1
52734_ACEOF
52735 DTRACE_HEADERS_OK=yes
52736else
52737  DTRACE_HEADERS_OK=no
52738fi
52739
52740done
52741
52742  if test "x$DTRACE_HEADERS_OK" != "xyes"; then
52743    DTRACE_DEP_MISSING=true
52744  fi
52745
52746  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
52747$as_echo_n "checking if dtrace should be built... " >&6; }
52748  if test "x$enable_dtrace" = "xyes"; then
52749    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52750      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52751$as_echo "no, missing dependencies" >&6; }
52752
52753  # Print a helpful message on how to acquire the necessary build dependency.
52754  # dtrace is the help tag: freetype, cups, alsa etc
52755  MISSING_DEPENDENCY=dtrace
52756
52757  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52758    cygwin_help $MISSING_DEPENDENCY
52759  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52760    msys_help $MISSING_DEPENDENCY
52761  else
52762    PKGHANDLER_COMMAND=
52763
52764    case $PKGHANDLER in
52765      apt-get)
52766        apt_help     $MISSING_DEPENDENCY ;;
52767      yum)
52768        yum_help     $MISSING_DEPENDENCY ;;
52769      port)
52770        port_help    $MISSING_DEPENDENCY ;;
52771      pkgutil)
52772        pkgutil_help $MISSING_DEPENDENCY ;;
52773      pkgadd)
52774        pkgadd_help  $MISSING_DEPENDENCY ;;
52775    esac
52776
52777    if test "x$PKGHANDLER_COMMAND" != x; then
52778      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
52779    fi
52780  fi
52781
52782      as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
52783    else
52784      INCLUDE_DTRACE=true
52785      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52786$as_echo "yes, forced" >&6; }
52787    fi
52788  elif test "x$enable_dtrace" = "xno"; then
52789    INCLUDE_DTRACE=false
52790    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52791$as_echo "no, forced" >&6; }
52792  elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
52793    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52794      INCLUDE_DTRACE=false
52795      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52796$as_echo "no, missing dependencies" >&6; }
52797    else
52798      INCLUDE_DTRACE=true
52799      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
52800$as_echo "yes, dependencies present" >&6; }
52801    fi
52802  else
52803    as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
52804  fi
52805
52806
52807
52808  # The user can in some cases supply additional jvm features. For the custom
52809  # variant, this defines the entire variant.
52810
52811# Check whether --with-jvm-features was given.
52812if test "${with_jvm_features+set}" = set; then :
52813  withval=$with_jvm_features;
52814fi
52815
52816  if test "x$with_jvm_features" != x; then
52817    { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
52818$as_echo_n "checking additional JVM features... " >&6; }
52819    JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
52820    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
52821$as_echo "$JVM_FEATURES" >&6; }
52822  fi
52823
52824  # Verify that dependencies are met for explicitly set features.
52825  if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
52826    as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
52827  fi
52828
52829  if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
52830    as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
52831  fi
52832
52833  if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && ! (  [[ " $JVM_FEATURES " =~ " compiler1 " ]]   ||   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ); then
52834    as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'" "$LINENO" 5
52835  fi
52836
52837  if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
52838    as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
52839  fi
52840
52841  if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
52842    as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
52843  fi
52844
52845  # Turn on additional features based on other parts of configure
52846  if test "x$INCLUDE_DTRACE" = "xtrue"; then
52847    JVM_FEATURES="$JVM_FEATURES dtrace"
52848  else
52849    if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
52850      as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
52851    fi
52852  fi
52853
52854  if test "x$STATIC_BUILD" = "xtrue"; then
52855    JVM_FEATURES="$JVM_FEATURES static-build"
52856  else
52857    if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
52858      as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
52859    fi
52860  fi
52861
52862  if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52863    if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
52864      as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
52865    fi
52866  fi
52867
52868  if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52869    if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
52870      as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
52871    fi
52872  fi
52873
52874  # Only enable jvmci on x86_64, sparcv9 and aarch64.
52875  if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
52876      test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
52877      test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
52878    JVM_FEATURES_jvmci="jvmci"
52879  else
52880    JVM_FEATURES_jvmci=""
52881  fi
52882
52883  # All variants but minimal (and custom) get these features
52884  NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
52885
52886  # Enable features depending on variant.
52887  JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
52888  JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
52889  JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
52890  JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES"
52891  JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
52892  JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
52893  JVM_FEATURES_custom="$JVM_FEATURES"
52894
52895
52896
52897
52898
52899
52900
52901
52902
52903  # Used for verification of Makefiles by check-jvm-feature
52904
52905
52906  # We don't support --with-jvm-interpreter anymore, use zero instead.
52907
52908
52909# Check whether --with-jvm-interpreter was given.
52910if test "${with_jvm_interpreter+set}" = set; then :
52911  withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
52912$as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
52913fi
52914
52915
52916
52917
52918  # Check whether --enable-hotspot-gtest was given.
52919if test "${enable_hotspot_gtest+set}" = set; then :
52920  enableval=$enable_hotspot_gtest;
52921fi
52922
52923
52924  if test -e "$HOTSPOT_TOPDIR/test/native"; then
52925    GTEST_DIR_EXISTS="true"
52926  else
52927    GTEST_DIR_EXISTS="false"
52928  fi
52929
52930  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Hotspot gtest unit tests should be built" >&5
52931$as_echo_n "checking if Hotspot gtest unit tests should be built... " >&6; }
52932  if test "x$enable_hotspot_gtest" = "xyes"; then
52933    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
52934      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52935$as_echo "yes, forced" >&6; }
52936      BUILD_GTEST="true"
52937    else
52938      as_fn_error $? "Cannot build gtest without the test source" "$LINENO" 5
52939    fi
52940  elif test "x$enable_hotspot_gtest" = "xno"; then
52941    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52942$as_echo "no, forced" >&6; }
52943    BUILD_GTEST="false"
52944  elif test "x$enable_hotspot_gtest" = "x"; then
52945    if test "x$GTEST_DIR_EXISTS" = "xtrue" && test "x$OPENJDK_TARGET_OS" != "xaix"; then
52946      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52947$as_echo "yes" >&6; }
52948      BUILD_GTEST="true"
52949    else
52950      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52951$as_echo "no" >&6; }
52952      BUILD_GTEST="false"
52953    fi
52954  else
52955    as_fn_error $? "--enable-gtest must be either yes or no" "$LINENO" 5
52956  fi
52957
52958
52959
52960
52961###############################################################################
52962#
52963# Check dependencies for external and internal libraries.
52964#
52965###############################################################################
52966
52967# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
52968
52969  # When using cygwin or msys, we need a wrapper binary that renames
52970  # /cygdrive/c/ arguments into c:/ arguments and peeks into
52971  # @files and rewrites these too! This wrapper binary is
52972  # called fixpath.
52973  FIXPATH=
52974  if test "x$OPENJDK_BUILD_OS" = xwindows; then
52975    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
52976$as_echo_n "checking if fixpath can be created... " >&6; }
52977    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
52978    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
52979    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
52980    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
52981      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
52982      FIXPATH="$FIXPATH_BIN -c"
52983    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
52984      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
52985      # @ was chosen as separator to minimize risk of other tools messing around with it
52986      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
52987          | tr ' ' '\n' | $GREP '^/./' | $SORT | $UNIQ`
52988      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
52989      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
52990    fi
52991    FIXPATH_SRC_W="$FIXPATH_SRC"
52992    FIXPATH_BIN_W="$FIXPATH_BIN"
52993
52994  unix_path="$FIXPATH_SRC_W"
52995  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52996    windows_path=`$CYGPATH -m "$unix_path"`
52997    FIXPATH_SRC_W="$windows_path"
52998  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52999    windows_path=`cmd //c echo $unix_path`
53000    FIXPATH_SRC_W="$windows_path"
53001  fi
53002
53003
53004  unix_path="$FIXPATH_BIN_W"
53005  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53006    windows_path=`$CYGPATH -m "$unix_path"`
53007    FIXPATH_BIN_W="$windows_path"
53008  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53009    windows_path=`cmd //c echo $unix_path`
53010    FIXPATH_BIN_W="$windows_path"
53011  fi
53012
53013    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
53014    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
53015    cd $FIXPATH_DIR
53016    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
53017    cd $CURDIR
53018
53019    if test ! -x $FIXPATH_BIN; then
53020      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53021$as_echo "no" >&6; }
53022      cat $FIXPATH_DIR/fixpath1.log
53023      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
53024    fi
53025    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53026$as_echo "yes" >&6; }
53027    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
53028$as_echo_n "checking if fixpath.exe works... " >&6; }
53029    cd $FIXPATH_DIR
53030    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
53031        > $FIXPATH_DIR/fixpath2.log 2>&1
53032    cd $CURDIR
53033    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
53034      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53035$as_echo "no" >&6; }
53036      cat $FIXPATH_DIR/fixpath2.log
53037      as_fn_error $? "fixpath did not work!" "$LINENO" 5
53038    fi
53039    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53040$as_echo "yes" >&6; }
53041
53042    FIXPATH_DETACH_FLAG="--detach"
53043  fi
53044
53045
53046
53047
53048
53049
53050  # Check if X11 is needed
53051  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
53052    # No X11 support on windows or macosx
53053    NEEDS_LIB_X11=false
53054  else
53055    # All other instances need X11, even if building headless only, libawt still
53056    # needs X11 headers.
53057    NEEDS_LIB_X11=true
53058  fi
53059
53060  # Check if cups is needed
53061  if test "x$OPENJDK_TARGET_OS" = xwindows; then
53062    # Windows have a separate print system
53063    NEEDS_LIB_CUPS=false
53064  else
53065    NEEDS_LIB_CUPS=true
53066  fi
53067
53068  # A custom hook may have set this already
53069  if test "x$NEEDS_LIB_FREETYPE" = "x"; then
53070    NEEDS_LIB_FREETYPE=true
53071  fi
53072
53073  # Check if alsa is needed
53074  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53075    NEEDS_LIB_ALSA=true
53076  else
53077    NEEDS_LIB_ALSA=false
53078  fi
53079
53080  # Check if ffi is needed
53081  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53082    NEEDS_LIB_FFI=true
53083  else
53084    NEEDS_LIB_FFI=false
53085  fi
53086
53087
53088  # statically link libstdc++ before C++ ABI is stablized on Linux unless
53089  # dynamic build is configured on command line.
53090
53091# Check whether --with-stdc++lib was given.
53092if test "${with_stdc__lib+set}" = set; then :
53093  withval=$with_stdc__lib;
53094        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
53095                && test "x$with_stdc__lib" != xdefault; then
53096          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
53097        fi
53098
53099else
53100  with_stdc__lib=default
53101
53102fi
53103
53104
53105  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53106    # Test if -lstdc++ works.
53107    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
53108$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
53109    ac_ext=cpp
53110ac_cpp='$CXXCPP $CPPFLAGS'
53111ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53112ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53113ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53114
53115    OLD_CXXFLAGS="$CXXFLAGS"
53116    CXXFLAGS="$CXXFLAGS -lstdc++"
53117    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53118/* end confdefs.h.  */
53119
53120int
53121main ()
53122{
53123return 0;
53124  ;
53125  return 0;
53126}
53127_ACEOF
53128if ac_fn_cxx_try_link "$LINENO"; then :
53129  has_dynamic_libstdcxx=yes
53130else
53131  has_dynamic_libstdcxx=no
53132fi
53133rm -f core conftest.err conftest.$ac_objext \
53134    conftest$ac_exeext conftest.$ac_ext
53135    CXXFLAGS="$OLD_CXXFLAGS"
53136    ac_ext=cpp
53137ac_cpp='$CXXCPP $CPPFLAGS'
53138ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53139ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53140ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53141
53142    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
53143$as_echo "$has_dynamic_libstdcxx" >&6; }
53144
53145    # Test if stdc++ can be linked statically.
53146    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
53147$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
53148    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
53149    ac_ext=cpp
53150ac_cpp='$CXXCPP $CPPFLAGS'
53151ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53152ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53153ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53154
53155    OLD_LIBS="$LIBS"
53156    OLD_CXX="$CXX"
53157    LIBS="$STATIC_STDCXX_FLAGS"
53158    CXX="$CC"
53159    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53160/* end confdefs.h.  */
53161
53162int
53163main ()
53164{
53165return 0;
53166  ;
53167  return 0;
53168}
53169_ACEOF
53170if ac_fn_cxx_try_link "$LINENO"; then :
53171  has_static_libstdcxx=yes
53172else
53173  has_static_libstdcxx=no
53174fi
53175rm -f core conftest.err conftest.$ac_objext \
53176    conftest$ac_exeext conftest.$ac_ext
53177    LIBS="$OLD_LIBS"
53178    CXX="$OLD_CXX"
53179    ac_ext=cpp
53180ac_cpp='$CXXCPP $CPPFLAGS'
53181ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53182ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53183ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53184
53185    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
53186$as_echo "$has_static_libstdcxx" >&6; }
53187
53188    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
53189      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
53190    fi
53191
53192    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
53193      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
53194    fi
53195
53196    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
53197      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
53198    fi
53199
53200    # If dynamic was requested, it's available since it would fail above otherwise.
53201    # If dynamic wasn't requested, go with static unless it isn't available.
53202    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
53203$as_echo_n "checking how to link with libstdc++... " >&6; }
53204    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53205      LIBCXX="$LIBCXX -lstdc++"
53206      # To help comparisons with old build, put stdc++ first in JVM_LIBS
53207      JVM_LIBS="-lstdc++ $JVM_LIBS"
53208      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
53209      # just use the same setting as for the TARGET toolchain.
53210      OPENJDK_BUILD_JVM_LIBS="-lstdc++ $OPENJDK_BUILD_JVM_LIBS"
53211      LDCXX="$CXX"
53212      STATIC_CXX_SETTING="STATIC_CXX=false"
53213      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
53214$as_echo "dynamic" >&6; }
53215    else
53216      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
53217      JVM_LDFLAGS="$JVM_LDFLAGS -static-libgcc"
53218      # To help comparisons with old build, put stdc++ first in JVM_LIBS
53219      JVM_LIBS="-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic $JVM_LIBS"
53220      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
53221      # just use the same setting as for the TARGET toolchain.
53222      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -static-libgcc"
53223      OPENJDK_BUILD_JVM_LIBS="-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic $OPENJDK_BUILD_JVM_LIBS"
53224      LDCXX="$CC"
53225      STATIC_CXX_SETTING="STATIC_CXX=true"
53226      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
53227$as_echo "static" >&6; }
53228    fi
53229  fi
53230
53231
53232  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
53233  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
53234    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
53235  fi
53236
53237  # TODO better (platform agnostic) test
53238  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
53239    LIBCXX="-lstdc++"
53240  fi
53241
53242
53243  # Setup Windows runtime dlls
53244  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
53245
53246
53247# Check whether --with-msvcr-dll was given.
53248if test "${with_msvcr_dll+set}" = set; then :
53249  withval=$with_msvcr_dll;
53250fi
53251
53252
53253  if test "x$with_msvcr_dll" != x; then
53254    # If given explicitely by user, do not probe. If not present, fail directly.
53255
53256  DLL_NAME="$MSVCR_NAME"
53257  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
53258  METHOD="--with-msvcr-dll"
53259  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53260    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53261$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53262
53263    # Need to check if the found msvcr is correct architecture
53264    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53265$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53266    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53267    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53268      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53269      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53270      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53271        CORRECT_MSVCR_ARCH="PE32 executable"
53272      else
53273        CORRECT_MSVCR_ARCH="PE32+ executable"
53274      fi
53275    else
53276      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53277        CORRECT_MSVCR_ARCH=386
53278      else
53279        CORRECT_MSVCR_ARCH=x86-64
53280      fi
53281    fi
53282    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53283      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53284$as_echo "ok" >&6; }
53285      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53286
53287  # Only process if variable expands to non-empty
53288
53289  if test "x$MSVC_DLL" != x; then
53290    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53291
53292  # Input might be given as Windows format, start by converting to
53293  # unix format.
53294  path="$MSVC_DLL"
53295  new_path=`$CYGPATH -u "$path"`
53296
53297  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53298  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53299  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53300  # "foo.exe" is OK but "foo" is an error.
53301  #
53302  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53303  # It is also a way to make sure we got the proper file name for the real test later on.
53304  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53305  if test "x$test_shortpath" = x; then
53306    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53307$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53308    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53309  fi
53310
53311  # Call helper function which possibly converts this using DOS-style short mode.
53312  # If so, the updated path is stored in $new_path.
53313
53314  input_path="$new_path"
53315  # Check if we need to convert this using DOS-style short mode. If the path
53316  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53317  # take no chances and rewrite it.
53318  # Note: m4 eats our [], so we need to use [ and ] instead.
53319  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53320  if test "x$has_forbidden_chars" != x; then
53321    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53322    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53323    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53324    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53325      # Going to short mode and back again did indeed matter. Since short mode is
53326      # case insensitive, let's make it lowercase to improve readability.
53327      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53328      # Now convert it back to Unix-style (cygpath)
53329      input_path=`$CYGPATH -u "$shortmode_path"`
53330      new_path="$input_path"
53331    fi
53332  fi
53333
53334  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53335  if test "x$test_cygdrive_prefix" = x; then
53336    # As a simple fix, exclude /usr/bin since it's not a real path.
53337    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53338      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53339      # a path prefixed by /cygdrive for fixpath to work.
53340      new_path="$CYGWIN_ROOT_PATH$input_path"
53341    fi
53342  fi
53343
53344
53345  if test "x$path" != "x$new_path"; then
53346    MSVC_DLL="$new_path"
53347    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53348$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53349  fi
53350
53351    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53352
53353  path="$MSVC_DLL"
53354  has_colon=`$ECHO $path | $GREP ^.:`
53355  new_path="$path"
53356  if test "x$has_colon" = x; then
53357    # Not in mixed or Windows style, start by that.
53358    new_path=`cmd //c echo $path`
53359  fi
53360
53361
53362  input_path="$new_path"
53363  # Check if we need to convert this using DOS-style short mode. If the path
53364  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53365  # take no chances and rewrite it.
53366  # Note: m4 eats our [], so we need to use [ and ] instead.
53367  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53368  if test "x$has_forbidden_chars" != x; then
53369    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53370    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53371  fi
53372
53373
53374  windows_path="$new_path"
53375  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53376    unix_path=`$CYGPATH -u "$windows_path"`
53377    new_path="$unix_path"
53378  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53379    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53380    new_path="$unix_path"
53381  fi
53382
53383  if test "x$path" != "x$new_path"; then
53384    MSVC_DLL="$new_path"
53385    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53386$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53387  fi
53388
53389  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53390  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53391
53392    else
53393      # We're on a unix platform. Hooray! :)
53394      path="$MSVC_DLL"
53395      has_space=`$ECHO "$path" | $GREP " "`
53396      if test "x$has_space" != x; then
53397        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53398$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53399        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53400      fi
53401
53402      # Use eval to expand a potential ~
53403      eval path="$path"
53404      if test ! -f "$path" && test ! -d "$path"; then
53405        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53406      fi
53407
53408      if test -d "$path"; then
53409        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53410      else
53411        dir="`$DIRNAME "$path"`"
53412        base="`$BASENAME "$path"`"
53413        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53414      fi
53415    fi
53416  fi
53417
53418      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53419$as_echo_n "checking for $DLL_NAME... " >&6; }
53420      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53421$as_echo "$MSVC_DLL" >&6; }
53422    else
53423      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53424$as_echo "incorrect, ignoring" >&6; }
53425      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53426$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53427    fi
53428  fi
53429
53430    if test "x$MSVC_DLL" = x; then
53431      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
53432    fi
53433    MSVCR_DLL="$MSVC_DLL"
53434  elif test "x$DEVKIT_MSVCR_DLL" != x; then
53435
53436  DLL_NAME="$MSVCR_NAME"
53437  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
53438  METHOD="devkit"
53439  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53440    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53441$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53442
53443    # Need to check if the found msvcr is correct architecture
53444    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53445$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53446    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53447    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53448      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53449      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53450      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53451        CORRECT_MSVCR_ARCH="PE32 executable"
53452      else
53453        CORRECT_MSVCR_ARCH="PE32+ executable"
53454      fi
53455    else
53456      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53457        CORRECT_MSVCR_ARCH=386
53458      else
53459        CORRECT_MSVCR_ARCH=x86-64
53460      fi
53461    fi
53462    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53463      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53464$as_echo "ok" >&6; }
53465      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53466
53467  # Only process if variable expands to non-empty
53468
53469  if test "x$MSVC_DLL" != x; then
53470    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53471
53472  # Input might be given as Windows format, start by converting to
53473  # unix format.
53474  path="$MSVC_DLL"
53475  new_path=`$CYGPATH -u "$path"`
53476
53477  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53478  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53479  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53480  # "foo.exe" is OK but "foo" is an error.
53481  #
53482  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53483  # It is also a way to make sure we got the proper file name for the real test later on.
53484  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53485  if test "x$test_shortpath" = x; then
53486    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53487$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53488    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53489  fi
53490
53491  # Call helper function which possibly converts this using DOS-style short mode.
53492  # If so, the updated path is stored in $new_path.
53493
53494  input_path="$new_path"
53495  # Check if we need to convert this using DOS-style short mode. If the path
53496  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53497  # take no chances and rewrite it.
53498  # Note: m4 eats our [], so we need to use [ and ] instead.
53499  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53500  if test "x$has_forbidden_chars" != x; then
53501    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53502    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53503    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53504    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53505      # Going to short mode and back again did indeed matter. Since short mode is
53506      # case insensitive, let's make it lowercase to improve readability.
53507      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53508      # Now convert it back to Unix-style (cygpath)
53509      input_path=`$CYGPATH -u "$shortmode_path"`
53510      new_path="$input_path"
53511    fi
53512  fi
53513
53514  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53515  if test "x$test_cygdrive_prefix" = x; then
53516    # As a simple fix, exclude /usr/bin since it's not a real path.
53517    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53518      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53519      # a path prefixed by /cygdrive for fixpath to work.
53520      new_path="$CYGWIN_ROOT_PATH$input_path"
53521    fi
53522  fi
53523
53524
53525  if test "x$path" != "x$new_path"; then
53526    MSVC_DLL="$new_path"
53527    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53528$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53529  fi
53530
53531    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53532
53533  path="$MSVC_DLL"
53534  has_colon=`$ECHO $path | $GREP ^.:`
53535  new_path="$path"
53536  if test "x$has_colon" = x; then
53537    # Not in mixed or Windows style, start by that.
53538    new_path=`cmd //c echo $path`
53539  fi
53540
53541
53542  input_path="$new_path"
53543  # Check if we need to convert this using DOS-style short mode. If the path
53544  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53545  # take no chances and rewrite it.
53546  # Note: m4 eats our [], so we need to use [ and ] instead.
53547  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53548  if test "x$has_forbidden_chars" != x; then
53549    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53550    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53551  fi
53552
53553
53554  windows_path="$new_path"
53555  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53556    unix_path=`$CYGPATH -u "$windows_path"`
53557    new_path="$unix_path"
53558  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53559    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53560    new_path="$unix_path"
53561  fi
53562
53563  if test "x$path" != "x$new_path"; then
53564    MSVC_DLL="$new_path"
53565    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53566$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53567  fi
53568
53569  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53570  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53571
53572    else
53573      # We're on a unix platform. Hooray! :)
53574      path="$MSVC_DLL"
53575      has_space=`$ECHO "$path" | $GREP " "`
53576      if test "x$has_space" != x; then
53577        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53578$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53579        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53580      fi
53581
53582      # Use eval to expand a potential ~
53583      eval path="$path"
53584      if test ! -f "$path" && test ! -d "$path"; then
53585        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53586      fi
53587
53588      if test -d "$path"; then
53589        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53590      else
53591        dir="`$DIRNAME "$path"`"
53592        base="`$BASENAME "$path"`"
53593        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53594      fi
53595    fi
53596  fi
53597
53598      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53599$as_echo_n "checking for $DLL_NAME... " >&6; }
53600      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53601$as_echo "$MSVC_DLL" >&6; }
53602    else
53603      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53604$as_echo "incorrect, ignoring" >&6; }
53605      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53606$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53607    fi
53608  fi
53609
53610    if test "x$MSVC_DLL" = x; then
53611      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
53612    fi
53613    MSVCR_DLL="$MSVC_DLL"
53614  else
53615
53616  DLL_NAME="${MSVCR_NAME}"
53617  MSVC_DLL=
53618
53619  if test "x$MSVC_DLL" = x; then
53620    # Probe: Using well-known location from Visual Studio 10.0
53621    if test "x$VCINSTALLDIR" != x; then
53622      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
53623
53624  windows_path="$CYGWIN_VC_INSTALL_DIR"
53625  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53626    unix_path=`$CYGPATH -u "$windows_path"`
53627    CYGWIN_VC_INSTALL_DIR="$unix_path"
53628  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53629    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53630    CYGWIN_VC_INSTALL_DIR="$unix_path"
53631  fi
53632
53633      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53634        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53635      else
53636        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53637      fi
53638      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
53639
53640  DLL_NAME="$DLL_NAME"
53641  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53642  METHOD="well-known location in VCINSTALLDIR"
53643  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53644    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53645$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53646
53647    # Need to check if the found msvcr is correct architecture
53648    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53649$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53650    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53651    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53652      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53653      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53654      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53655        CORRECT_MSVCR_ARCH="PE32 executable"
53656      else
53657        CORRECT_MSVCR_ARCH="PE32+ executable"
53658      fi
53659    else
53660      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53661        CORRECT_MSVCR_ARCH=386
53662      else
53663        CORRECT_MSVCR_ARCH=x86-64
53664      fi
53665    fi
53666    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53667      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53668$as_echo "ok" >&6; }
53669      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53670
53671  # Only process if variable expands to non-empty
53672
53673  if test "x$MSVC_DLL" != x; then
53674    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53675
53676  # Input might be given as Windows format, start by converting to
53677  # unix format.
53678  path="$MSVC_DLL"
53679  new_path=`$CYGPATH -u "$path"`
53680
53681  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53682  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53683  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53684  # "foo.exe" is OK but "foo" is an error.
53685  #
53686  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53687  # It is also a way to make sure we got the proper file name for the real test later on.
53688  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53689  if test "x$test_shortpath" = x; then
53690    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53691$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53692    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53693  fi
53694
53695  # Call helper function which possibly converts this using DOS-style short mode.
53696  # If so, the updated path is stored in $new_path.
53697
53698  input_path="$new_path"
53699  # Check if we need to convert this using DOS-style short mode. If the path
53700  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53701  # take no chances and rewrite it.
53702  # Note: m4 eats our [], so we need to use [ and ] instead.
53703  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53704  if test "x$has_forbidden_chars" != x; then
53705    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53706    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53707    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53708    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53709      # Going to short mode and back again did indeed matter. Since short mode is
53710      # case insensitive, let's make it lowercase to improve readability.
53711      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53712      # Now convert it back to Unix-style (cygpath)
53713      input_path=`$CYGPATH -u "$shortmode_path"`
53714      new_path="$input_path"
53715    fi
53716  fi
53717
53718  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53719  if test "x$test_cygdrive_prefix" = x; then
53720    # As a simple fix, exclude /usr/bin since it's not a real path.
53721    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53722      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53723      # a path prefixed by /cygdrive for fixpath to work.
53724      new_path="$CYGWIN_ROOT_PATH$input_path"
53725    fi
53726  fi
53727
53728
53729  if test "x$path" != "x$new_path"; then
53730    MSVC_DLL="$new_path"
53731    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53732$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53733  fi
53734
53735    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53736
53737  path="$MSVC_DLL"
53738  has_colon=`$ECHO $path | $GREP ^.:`
53739  new_path="$path"
53740  if test "x$has_colon" = x; then
53741    # Not in mixed or Windows style, start by that.
53742    new_path=`cmd //c echo $path`
53743  fi
53744
53745
53746  input_path="$new_path"
53747  # Check if we need to convert this using DOS-style short mode. If the path
53748  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53749  # take no chances and rewrite it.
53750  # Note: m4 eats our [], so we need to use [ and ] instead.
53751  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53752  if test "x$has_forbidden_chars" != x; then
53753    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53754    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53755  fi
53756
53757
53758  windows_path="$new_path"
53759  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53760    unix_path=`$CYGPATH -u "$windows_path"`
53761    new_path="$unix_path"
53762  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53763    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53764    new_path="$unix_path"
53765  fi
53766
53767  if test "x$path" != "x$new_path"; then
53768    MSVC_DLL="$new_path"
53769    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53770$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53771  fi
53772
53773  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53774  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53775
53776    else
53777      # We're on a unix platform. Hooray! :)
53778      path="$MSVC_DLL"
53779      has_space=`$ECHO "$path" | $GREP " "`
53780      if test "x$has_space" != x; then
53781        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53782$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53783        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53784      fi
53785
53786      # Use eval to expand a potential ~
53787      eval path="$path"
53788      if test ! -f "$path" && test ! -d "$path"; then
53789        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53790      fi
53791
53792      if test -d "$path"; then
53793        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53794      else
53795        dir="`$DIRNAME "$path"`"
53796        base="`$BASENAME "$path"`"
53797        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53798      fi
53799    fi
53800  fi
53801
53802      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53803$as_echo_n "checking for $DLL_NAME... " >&6; }
53804      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53805$as_echo "$MSVC_DLL" >&6; }
53806    else
53807      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53808$as_echo "incorrect, ignoring" >&6; }
53809      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53810$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53811    fi
53812  fi
53813
53814    fi
53815  fi
53816
53817  if test "x$MSVC_DLL" = x; then
53818    # Probe: Check in the Boot JDK directory.
53819    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
53820
53821  DLL_NAME="$DLL_NAME"
53822  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53823  METHOD="well-known location in Boot JDK"
53824  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53825    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53826$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53827
53828    # Need to check if the found msvcr is correct architecture
53829    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53830$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53831    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53832    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53833      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53834      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53835      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53836        CORRECT_MSVCR_ARCH="PE32 executable"
53837      else
53838        CORRECT_MSVCR_ARCH="PE32+ executable"
53839      fi
53840    else
53841      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53842        CORRECT_MSVCR_ARCH=386
53843      else
53844        CORRECT_MSVCR_ARCH=x86-64
53845      fi
53846    fi
53847    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53848      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53849$as_echo "ok" >&6; }
53850      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53851
53852  # Only process if variable expands to non-empty
53853
53854  if test "x$MSVC_DLL" != x; then
53855    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53856
53857  # Input might be given as Windows format, start by converting to
53858  # unix format.
53859  path="$MSVC_DLL"
53860  new_path=`$CYGPATH -u "$path"`
53861
53862  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53863  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53864  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53865  # "foo.exe" is OK but "foo" is an error.
53866  #
53867  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53868  # It is also a way to make sure we got the proper file name for the real test later on.
53869  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53870  if test "x$test_shortpath" = x; then
53871    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53872$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53873    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53874  fi
53875
53876  # Call helper function which possibly converts this using DOS-style short mode.
53877  # If so, the updated path is stored in $new_path.
53878
53879  input_path="$new_path"
53880  # Check if we need to convert this using DOS-style short mode. If the path
53881  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53882  # take no chances and rewrite it.
53883  # Note: m4 eats our [], so we need to use [ and ] instead.
53884  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53885  if test "x$has_forbidden_chars" != x; then
53886    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53887    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53888    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53889    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53890      # Going to short mode and back again did indeed matter. Since short mode is
53891      # case insensitive, let's make it lowercase to improve readability.
53892      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53893      # Now convert it back to Unix-style (cygpath)
53894      input_path=`$CYGPATH -u "$shortmode_path"`
53895      new_path="$input_path"
53896    fi
53897  fi
53898
53899  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53900  if test "x$test_cygdrive_prefix" = x; then
53901    # As a simple fix, exclude /usr/bin since it's not a real path.
53902    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53903      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53904      # a path prefixed by /cygdrive for fixpath to work.
53905      new_path="$CYGWIN_ROOT_PATH$input_path"
53906    fi
53907  fi
53908
53909
53910  if test "x$path" != "x$new_path"; then
53911    MSVC_DLL="$new_path"
53912    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53913$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53914  fi
53915
53916    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53917
53918  path="$MSVC_DLL"
53919  has_colon=`$ECHO $path | $GREP ^.:`
53920  new_path="$path"
53921  if test "x$has_colon" = x; then
53922    # Not in mixed or Windows style, start by that.
53923    new_path=`cmd //c echo $path`
53924  fi
53925
53926
53927  input_path="$new_path"
53928  # Check if we need to convert this using DOS-style short mode. If the path
53929  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53930  # take no chances and rewrite it.
53931  # Note: m4 eats our [], so we need to use [ and ] instead.
53932  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53933  if test "x$has_forbidden_chars" != x; then
53934    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53935    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53936  fi
53937
53938
53939  windows_path="$new_path"
53940  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53941    unix_path=`$CYGPATH -u "$windows_path"`
53942    new_path="$unix_path"
53943  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53944    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53945    new_path="$unix_path"
53946  fi
53947
53948  if test "x$path" != "x$new_path"; then
53949    MSVC_DLL="$new_path"
53950    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53951$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53952  fi
53953
53954  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53955  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53956
53957    else
53958      # We're on a unix platform. Hooray! :)
53959      path="$MSVC_DLL"
53960      has_space=`$ECHO "$path" | $GREP " "`
53961      if test "x$has_space" != x; then
53962        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53963$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53964        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53965      fi
53966
53967      # Use eval to expand a potential ~
53968      eval path="$path"
53969      if test ! -f "$path" && test ! -d "$path"; then
53970        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53971      fi
53972
53973      if test -d "$path"; then
53974        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53975      else
53976        dir="`$DIRNAME "$path"`"
53977        base="`$BASENAME "$path"`"
53978        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53979      fi
53980    fi
53981  fi
53982
53983      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53984$as_echo_n "checking for $DLL_NAME... " >&6; }
53985      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53986$as_echo "$MSVC_DLL" >&6; }
53987    else
53988      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53989$as_echo "incorrect, ignoring" >&6; }
53990      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53991$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53992    fi
53993  fi
53994
53995  fi
53996
53997  if test "x$MSVC_DLL" = x; then
53998    # Probe: Look in the Windows system32 directory
53999    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
54000
54001  windows_path="$CYGWIN_SYSTEMROOT"
54002  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54003    unix_path=`$CYGPATH -u "$windows_path"`
54004    CYGWIN_SYSTEMROOT="$unix_path"
54005  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54006    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54007    CYGWIN_SYSTEMROOT="$unix_path"
54008  fi
54009
54010    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
54011
54012  DLL_NAME="$DLL_NAME"
54013  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54014  METHOD="well-known location in SYSTEMROOT"
54015  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54016    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54017$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54018
54019    # Need to check if the found msvcr is correct architecture
54020    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54021$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54022    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54023    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54024      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54025      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54026      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54027        CORRECT_MSVCR_ARCH="PE32 executable"
54028      else
54029        CORRECT_MSVCR_ARCH="PE32+ executable"
54030      fi
54031    else
54032      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54033        CORRECT_MSVCR_ARCH=386
54034      else
54035        CORRECT_MSVCR_ARCH=x86-64
54036      fi
54037    fi
54038    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54039      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54040$as_echo "ok" >&6; }
54041      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54042
54043  # Only process if variable expands to non-empty
54044
54045  if test "x$MSVC_DLL" != x; then
54046    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54047
54048  # Input might be given as Windows format, start by converting to
54049  # unix format.
54050  path="$MSVC_DLL"
54051  new_path=`$CYGPATH -u "$path"`
54052
54053  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54054  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54055  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54056  # "foo.exe" is OK but "foo" is an error.
54057  #
54058  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54059  # It is also a way to make sure we got the proper file name for the real test later on.
54060  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54061  if test "x$test_shortpath" = x; then
54062    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54063$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54064    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54065  fi
54066
54067  # Call helper function which possibly converts this using DOS-style short mode.
54068  # If so, the updated path is stored in $new_path.
54069
54070  input_path="$new_path"
54071  # Check if we need to convert this using DOS-style short mode. If the path
54072  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54073  # take no chances and rewrite it.
54074  # Note: m4 eats our [], so we need to use [ and ] instead.
54075  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54076  if test "x$has_forbidden_chars" != x; then
54077    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54078    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54079    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54080    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54081      # Going to short mode and back again did indeed matter. Since short mode is
54082      # case insensitive, let's make it lowercase to improve readability.
54083      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54084      # Now convert it back to Unix-style (cygpath)
54085      input_path=`$CYGPATH -u "$shortmode_path"`
54086      new_path="$input_path"
54087    fi
54088  fi
54089
54090  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54091  if test "x$test_cygdrive_prefix" = x; then
54092    # As a simple fix, exclude /usr/bin since it's not a real path.
54093    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54094      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54095      # a path prefixed by /cygdrive for fixpath to work.
54096      new_path="$CYGWIN_ROOT_PATH$input_path"
54097    fi
54098  fi
54099
54100
54101  if test "x$path" != "x$new_path"; then
54102    MSVC_DLL="$new_path"
54103    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54104$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54105  fi
54106
54107    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54108
54109  path="$MSVC_DLL"
54110  has_colon=`$ECHO $path | $GREP ^.:`
54111  new_path="$path"
54112  if test "x$has_colon" = x; then
54113    # Not in mixed or Windows style, start by that.
54114    new_path=`cmd //c echo $path`
54115  fi
54116
54117
54118  input_path="$new_path"
54119  # Check if we need to convert this using DOS-style short mode. If the path
54120  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54121  # take no chances and rewrite it.
54122  # Note: m4 eats our [], so we need to use [ and ] instead.
54123  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54124  if test "x$has_forbidden_chars" != x; then
54125    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54126    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54127  fi
54128
54129
54130  windows_path="$new_path"
54131  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54132    unix_path=`$CYGPATH -u "$windows_path"`
54133    new_path="$unix_path"
54134  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54135    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54136    new_path="$unix_path"
54137  fi
54138
54139  if test "x$path" != "x$new_path"; then
54140    MSVC_DLL="$new_path"
54141    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54142$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54143  fi
54144
54145  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54146  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54147
54148    else
54149      # We're on a unix platform. Hooray! :)
54150      path="$MSVC_DLL"
54151      has_space=`$ECHO "$path" | $GREP " "`
54152      if test "x$has_space" != x; then
54153        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54154$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54155        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54156      fi
54157
54158      # Use eval to expand a potential ~
54159      eval path="$path"
54160      if test ! -f "$path" && test ! -d "$path"; then
54161        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54162      fi
54163
54164      if test -d "$path"; then
54165        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54166      else
54167        dir="`$DIRNAME "$path"`"
54168        base="`$BASENAME "$path"`"
54169        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54170      fi
54171    fi
54172  fi
54173
54174      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54175$as_echo_n "checking for $DLL_NAME... " >&6; }
54176      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54177$as_echo "$MSVC_DLL" >&6; }
54178    else
54179      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54180$as_echo "incorrect, ignoring" >&6; }
54181      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54182$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54183    fi
54184  fi
54185
54186  fi
54187
54188  if test "x$MSVC_DLL" = x; then
54189    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
54190    if test "x$VS100COMNTOOLS" != x; then
54191      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
54192
54193  windows_path="$CYGWIN_VS_TOOLS_DIR"
54194  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54195    unix_path=`$CYGPATH -u "$windows_path"`
54196    CYGWIN_VS_TOOLS_DIR="$unix_path"
54197  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54198    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54199    CYGWIN_VS_TOOLS_DIR="$unix_path"
54200  fi
54201
54202      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54203        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54204	    | $GREP -i /x64/ | $HEAD --lines 1`
54205      else
54206        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54207	    | $GREP -i /x86/ | $HEAD --lines 1`
54208      fi
54209
54210  DLL_NAME="$DLL_NAME"
54211  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54212  METHOD="search of VS100COMNTOOLS"
54213  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54214    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54215$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54216
54217    # Need to check if the found msvcr is correct architecture
54218    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54219$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54220    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54221    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54222      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54223      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54224      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54225        CORRECT_MSVCR_ARCH="PE32 executable"
54226      else
54227        CORRECT_MSVCR_ARCH="PE32+ executable"
54228      fi
54229    else
54230      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54231        CORRECT_MSVCR_ARCH=386
54232      else
54233        CORRECT_MSVCR_ARCH=x86-64
54234      fi
54235    fi
54236    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54237      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54238$as_echo "ok" >&6; }
54239      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54240
54241  # Only process if variable expands to non-empty
54242
54243  if test "x$MSVC_DLL" != x; then
54244    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54245
54246  # Input might be given as Windows format, start by converting to
54247  # unix format.
54248  path="$MSVC_DLL"
54249  new_path=`$CYGPATH -u "$path"`
54250
54251  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54252  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54253  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54254  # "foo.exe" is OK but "foo" is an error.
54255  #
54256  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54257  # It is also a way to make sure we got the proper file name for the real test later on.
54258  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54259  if test "x$test_shortpath" = x; then
54260    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54261$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54262    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54263  fi
54264
54265  # Call helper function which possibly converts this using DOS-style short mode.
54266  # If so, the updated path is stored in $new_path.
54267
54268  input_path="$new_path"
54269  # Check if we need to convert this using DOS-style short mode. If the path
54270  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54271  # take no chances and rewrite it.
54272  # Note: m4 eats our [], so we need to use [ and ] instead.
54273  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54274  if test "x$has_forbidden_chars" != x; then
54275    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54276    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54277    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54278    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54279      # Going to short mode and back again did indeed matter. Since short mode is
54280      # case insensitive, let's make it lowercase to improve readability.
54281      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54282      # Now convert it back to Unix-style (cygpath)
54283      input_path=`$CYGPATH -u "$shortmode_path"`
54284      new_path="$input_path"
54285    fi
54286  fi
54287
54288  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54289  if test "x$test_cygdrive_prefix" = x; then
54290    # As a simple fix, exclude /usr/bin since it's not a real path.
54291    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54292      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54293      # a path prefixed by /cygdrive for fixpath to work.
54294      new_path="$CYGWIN_ROOT_PATH$input_path"
54295    fi
54296  fi
54297
54298
54299  if test "x$path" != "x$new_path"; then
54300    MSVC_DLL="$new_path"
54301    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54302$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54303  fi
54304
54305    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54306
54307  path="$MSVC_DLL"
54308  has_colon=`$ECHO $path | $GREP ^.:`
54309  new_path="$path"
54310  if test "x$has_colon" = x; then
54311    # Not in mixed or Windows style, start by that.
54312    new_path=`cmd //c echo $path`
54313  fi
54314
54315
54316  input_path="$new_path"
54317  # Check if we need to convert this using DOS-style short mode. If the path
54318  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54319  # take no chances and rewrite it.
54320  # Note: m4 eats our [], so we need to use [ and ] instead.
54321  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54322  if test "x$has_forbidden_chars" != x; then
54323    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54324    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54325  fi
54326
54327
54328  windows_path="$new_path"
54329  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54330    unix_path=`$CYGPATH -u "$windows_path"`
54331    new_path="$unix_path"
54332  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54333    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54334    new_path="$unix_path"
54335  fi
54336
54337  if test "x$path" != "x$new_path"; then
54338    MSVC_DLL="$new_path"
54339    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54340$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54341  fi
54342
54343  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54344  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54345
54346    else
54347      # We're on a unix platform. Hooray! :)
54348      path="$MSVC_DLL"
54349      has_space=`$ECHO "$path" | $GREP " "`
54350      if test "x$has_space" != x; then
54351        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54352$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54353        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54354      fi
54355
54356      # Use eval to expand a potential ~
54357      eval path="$path"
54358      if test ! -f "$path" && test ! -d "$path"; then
54359        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54360      fi
54361
54362      if test -d "$path"; then
54363        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54364      else
54365        dir="`$DIRNAME "$path"`"
54366        base="`$BASENAME "$path"`"
54367        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54368      fi
54369    fi
54370  fi
54371
54372      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54373$as_echo_n "checking for $DLL_NAME... " >&6; }
54374      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54375$as_echo "$MSVC_DLL" >&6; }
54376    else
54377      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54378$as_echo "incorrect, ignoring" >&6; }
54379      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54380$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54381    fi
54382  fi
54383
54384    fi
54385  fi
54386
54387  if test "x$MSVC_DLL" = x; then
54388    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
54389    # (This was the original behaviour; kept since it might turn something up)
54390    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
54391      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54392        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54393	    | $GREP x64 | $HEAD --lines 1`
54394      else
54395        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54396	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
54397        if test "x$POSSIBLE_MSVC_DLL" = x; then
54398          # We're grasping at straws now...
54399          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54400	      | $HEAD --lines 1`
54401        fi
54402      fi
54403
54404
54405  DLL_NAME="$DLL_NAME"
54406  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54407  METHOD="search of VCINSTALLDIR"
54408  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54409    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54410$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54411
54412    # Need to check if the found msvcr is correct architecture
54413    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54414$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54415    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54416    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54417      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54418      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54419      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54420        CORRECT_MSVCR_ARCH="PE32 executable"
54421      else
54422        CORRECT_MSVCR_ARCH="PE32+ executable"
54423      fi
54424    else
54425      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54426        CORRECT_MSVCR_ARCH=386
54427      else
54428        CORRECT_MSVCR_ARCH=x86-64
54429      fi
54430    fi
54431    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54432      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54433$as_echo "ok" >&6; }
54434      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54435
54436  # Only process if variable expands to non-empty
54437
54438  if test "x$MSVC_DLL" != x; then
54439    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54440
54441  # Input might be given as Windows format, start by converting to
54442  # unix format.
54443  path="$MSVC_DLL"
54444  new_path=`$CYGPATH -u "$path"`
54445
54446  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54447  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54448  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54449  # "foo.exe" is OK but "foo" is an error.
54450  #
54451  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54452  # It is also a way to make sure we got the proper file name for the real test later on.
54453  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54454  if test "x$test_shortpath" = x; then
54455    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54456$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54457    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54458  fi
54459
54460  # Call helper function which possibly converts this using DOS-style short mode.
54461  # If so, the updated path is stored in $new_path.
54462
54463  input_path="$new_path"
54464  # Check if we need to convert this using DOS-style short mode. If the path
54465  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54466  # take no chances and rewrite it.
54467  # Note: m4 eats our [], so we need to use [ and ] instead.
54468  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54469  if test "x$has_forbidden_chars" != x; then
54470    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54471    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54472    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54473    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54474      # Going to short mode and back again did indeed matter. Since short mode is
54475      # case insensitive, let's make it lowercase to improve readability.
54476      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54477      # Now convert it back to Unix-style (cygpath)
54478      input_path=`$CYGPATH -u "$shortmode_path"`
54479      new_path="$input_path"
54480    fi
54481  fi
54482
54483  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54484  if test "x$test_cygdrive_prefix" = x; then
54485    # As a simple fix, exclude /usr/bin since it's not a real path.
54486    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54487      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54488      # a path prefixed by /cygdrive for fixpath to work.
54489      new_path="$CYGWIN_ROOT_PATH$input_path"
54490    fi
54491  fi
54492
54493
54494  if test "x$path" != "x$new_path"; then
54495    MSVC_DLL="$new_path"
54496    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54497$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54498  fi
54499
54500    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54501
54502  path="$MSVC_DLL"
54503  has_colon=`$ECHO $path | $GREP ^.:`
54504  new_path="$path"
54505  if test "x$has_colon" = x; then
54506    # Not in mixed or Windows style, start by that.
54507    new_path=`cmd //c echo $path`
54508  fi
54509
54510
54511  input_path="$new_path"
54512  # Check if we need to convert this using DOS-style short mode. If the path
54513  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54514  # take no chances and rewrite it.
54515  # Note: m4 eats our [], so we need to use [ and ] instead.
54516  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54517  if test "x$has_forbidden_chars" != x; then
54518    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54519    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54520  fi
54521
54522
54523  windows_path="$new_path"
54524  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54525    unix_path=`$CYGPATH -u "$windows_path"`
54526    new_path="$unix_path"
54527  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54528    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54529    new_path="$unix_path"
54530  fi
54531
54532  if test "x$path" != "x$new_path"; then
54533    MSVC_DLL="$new_path"
54534    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54535$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54536  fi
54537
54538  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54539  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54540
54541    else
54542      # We're on a unix platform. Hooray! :)
54543      path="$MSVC_DLL"
54544      has_space=`$ECHO "$path" | $GREP " "`
54545      if test "x$has_space" != x; then
54546        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54547$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54548        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54549      fi
54550
54551      # Use eval to expand a potential ~
54552      eval path="$path"
54553      if test ! -f "$path" && test ! -d "$path"; then
54554        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54555      fi
54556
54557      if test -d "$path"; then
54558        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54559      else
54560        dir="`$DIRNAME "$path"`"
54561        base="`$BASENAME "$path"`"
54562        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54563      fi
54564    fi
54565  fi
54566
54567      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54568$as_echo_n "checking for $DLL_NAME... " >&6; }
54569      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54570$as_echo "$MSVC_DLL" >&6; }
54571    else
54572      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54573$as_echo "incorrect, ignoring" >&6; }
54574      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54575$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54576    fi
54577  fi
54578
54579    fi
54580  fi
54581
54582  if test "x$MSVC_DLL" = x; then
54583    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54584$as_echo_n "checking for $DLL_NAME... " >&6; }
54585    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54586$as_echo "no" >&6; }
54587    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
54588  fi
54589
54590    MSVCR_DLL="$MSVC_DLL"
54591  fi
54592
54593
54594
54595# Check whether --with-msvcp-dll was given.
54596if test "${with_msvcp_dll+set}" = set; then :
54597  withval=$with_msvcp_dll;
54598fi
54599
54600
54601  if test "x$MSVCP_NAME" != "x"; then
54602    if test "x$with_msvcp_dll" != x; then
54603      # If given explicitely by user, do not probe. If not present, fail directly.
54604
54605  DLL_NAME="$MSVCP_NAME"
54606  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
54607  METHOD="--with-msvcp-dll"
54608  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54609    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54610$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54611
54612    # Need to check if the found msvcr is correct architecture
54613    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54614$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54615    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54616    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54617      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54618      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54619      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54620        CORRECT_MSVCR_ARCH="PE32 executable"
54621      else
54622        CORRECT_MSVCR_ARCH="PE32+ executable"
54623      fi
54624    else
54625      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54626        CORRECT_MSVCR_ARCH=386
54627      else
54628        CORRECT_MSVCR_ARCH=x86-64
54629      fi
54630    fi
54631    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54632      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54633$as_echo "ok" >&6; }
54634      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54635
54636  # Only process if variable expands to non-empty
54637
54638  if test "x$MSVC_DLL" != x; then
54639    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54640
54641  # Input might be given as Windows format, start by converting to
54642  # unix format.
54643  path="$MSVC_DLL"
54644  new_path=`$CYGPATH -u "$path"`
54645
54646  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54647  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54648  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54649  # "foo.exe" is OK but "foo" is an error.
54650  #
54651  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54652  # It is also a way to make sure we got the proper file name for the real test later on.
54653  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54654  if test "x$test_shortpath" = x; then
54655    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54656$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54657    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54658  fi
54659
54660  # Call helper function which possibly converts this using DOS-style short mode.
54661  # If so, the updated path is stored in $new_path.
54662
54663  input_path="$new_path"
54664  # Check if we need to convert this using DOS-style short mode. If the path
54665  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54666  # take no chances and rewrite it.
54667  # Note: m4 eats our [], so we need to use [ and ] instead.
54668  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54669  if test "x$has_forbidden_chars" != x; then
54670    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54671    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54672    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54673    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54674      # Going to short mode and back again did indeed matter. Since short mode is
54675      # case insensitive, let's make it lowercase to improve readability.
54676      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54677      # Now convert it back to Unix-style (cygpath)
54678      input_path=`$CYGPATH -u "$shortmode_path"`
54679      new_path="$input_path"
54680    fi
54681  fi
54682
54683  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54684  if test "x$test_cygdrive_prefix" = x; then
54685    # As a simple fix, exclude /usr/bin since it's not a real path.
54686    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54687      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54688      # a path prefixed by /cygdrive for fixpath to work.
54689      new_path="$CYGWIN_ROOT_PATH$input_path"
54690    fi
54691  fi
54692
54693
54694  if test "x$path" != "x$new_path"; then
54695    MSVC_DLL="$new_path"
54696    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54697$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54698  fi
54699
54700    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54701
54702  path="$MSVC_DLL"
54703  has_colon=`$ECHO $path | $GREP ^.:`
54704  new_path="$path"
54705  if test "x$has_colon" = x; then
54706    # Not in mixed or Windows style, start by that.
54707    new_path=`cmd //c echo $path`
54708  fi
54709
54710
54711  input_path="$new_path"
54712  # Check if we need to convert this using DOS-style short mode. If the path
54713  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54714  # take no chances and rewrite it.
54715  # Note: m4 eats our [], so we need to use [ and ] instead.
54716  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54717  if test "x$has_forbidden_chars" != x; then
54718    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54719    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54720  fi
54721
54722
54723  windows_path="$new_path"
54724  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54725    unix_path=`$CYGPATH -u "$windows_path"`
54726    new_path="$unix_path"
54727  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54728    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54729    new_path="$unix_path"
54730  fi
54731
54732  if test "x$path" != "x$new_path"; then
54733    MSVC_DLL="$new_path"
54734    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54735$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54736  fi
54737
54738  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54739  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54740
54741    else
54742      # We're on a unix platform. Hooray! :)
54743      path="$MSVC_DLL"
54744      has_space=`$ECHO "$path" | $GREP " "`
54745      if test "x$has_space" != x; then
54746        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54747$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54748        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54749      fi
54750
54751      # Use eval to expand a potential ~
54752      eval path="$path"
54753      if test ! -f "$path" && test ! -d "$path"; then
54754        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54755      fi
54756
54757      if test -d "$path"; then
54758        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54759      else
54760        dir="`$DIRNAME "$path"`"
54761        base="`$BASENAME "$path"`"
54762        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54763      fi
54764    fi
54765  fi
54766
54767      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54768$as_echo_n "checking for $DLL_NAME... " >&6; }
54769      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54770$as_echo "$MSVC_DLL" >&6; }
54771    else
54772      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54773$as_echo "incorrect, ignoring" >&6; }
54774      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54775$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54776    fi
54777  fi
54778
54779      if test "x$MSVC_DLL" = x; then
54780        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
54781      fi
54782      MSVCP_DLL="$MSVC_DLL"
54783    elif test "x$DEVKIT_MSVCP_DLL" != x; then
54784
54785  DLL_NAME="$MSVCP_NAME"
54786  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
54787  METHOD="devkit"
54788  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54789    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54790$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54791
54792    # Need to check if the found msvcr is correct architecture
54793    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54794$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54795    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54796    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54797      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54798      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54799      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54800        CORRECT_MSVCR_ARCH="PE32 executable"
54801      else
54802        CORRECT_MSVCR_ARCH="PE32+ executable"
54803      fi
54804    else
54805      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54806        CORRECT_MSVCR_ARCH=386
54807      else
54808        CORRECT_MSVCR_ARCH=x86-64
54809      fi
54810    fi
54811    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54812      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54813$as_echo "ok" >&6; }
54814      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54815
54816  # Only process if variable expands to non-empty
54817
54818  if test "x$MSVC_DLL" != x; then
54819    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54820
54821  # Input might be given as Windows format, start by converting to
54822  # unix format.
54823  path="$MSVC_DLL"
54824  new_path=`$CYGPATH -u "$path"`
54825
54826  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54827  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54828  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54829  # "foo.exe" is OK but "foo" is an error.
54830  #
54831  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54832  # It is also a way to make sure we got the proper file name for the real test later on.
54833  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54834  if test "x$test_shortpath" = x; then
54835    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54836$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54837    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54838  fi
54839
54840  # Call helper function which possibly converts this using DOS-style short mode.
54841  # If so, the updated path is stored in $new_path.
54842
54843  input_path="$new_path"
54844  # Check if we need to convert this using DOS-style short mode. If the path
54845  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54846  # take no chances and rewrite it.
54847  # Note: m4 eats our [], so we need to use [ and ] instead.
54848  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54849  if test "x$has_forbidden_chars" != x; then
54850    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54851    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54852    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54853    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54854      # Going to short mode and back again did indeed matter. Since short mode is
54855      # case insensitive, let's make it lowercase to improve readability.
54856      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54857      # Now convert it back to Unix-style (cygpath)
54858      input_path=`$CYGPATH -u "$shortmode_path"`
54859      new_path="$input_path"
54860    fi
54861  fi
54862
54863  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54864  if test "x$test_cygdrive_prefix" = x; then
54865    # As a simple fix, exclude /usr/bin since it's not a real path.
54866    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54867      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54868      # a path prefixed by /cygdrive for fixpath to work.
54869      new_path="$CYGWIN_ROOT_PATH$input_path"
54870    fi
54871  fi
54872
54873
54874  if test "x$path" != "x$new_path"; then
54875    MSVC_DLL="$new_path"
54876    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54877$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54878  fi
54879
54880    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54881
54882  path="$MSVC_DLL"
54883  has_colon=`$ECHO $path | $GREP ^.:`
54884  new_path="$path"
54885  if test "x$has_colon" = x; then
54886    # Not in mixed or Windows style, start by that.
54887    new_path=`cmd //c echo $path`
54888  fi
54889
54890
54891  input_path="$new_path"
54892  # Check if we need to convert this using DOS-style short mode. If the path
54893  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54894  # take no chances and rewrite it.
54895  # Note: m4 eats our [], so we need to use [ and ] instead.
54896  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54897  if test "x$has_forbidden_chars" != x; then
54898    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54899    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54900  fi
54901
54902
54903  windows_path="$new_path"
54904  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54905    unix_path=`$CYGPATH -u "$windows_path"`
54906    new_path="$unix_path"
54907  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54908    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54909    new_path="$unix_path"
54910  fi
54911
54912  if test "x$path" != "x$new_path"; then
54913    MSVC_DLL="$new_path"
54914    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54915$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54916  fi
54917
54918  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54919  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54920
54921    else
54922      # We're on a unix platform. Hooray! :)
54923      path="$MSVC_DLL"
54924      has_space=`$ECHO "$path" | $GREP " "`
54925      if test "x$has_space" != x; then
54926        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54927$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54928        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54929      fi
54930
54931      # Use eval to expand a potential ~
54932      eval path="$path"
54933      if test ! -f "$path" && test ! -d "$path"; then
54934        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54935      fi
54936
54937      if test -d "$path"; then
54938        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54939      else
54940        dir="`$DIRNAME "$path"`"
54941        base="`$BASENAME "$path"`"
54942        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54943      fi
54944    fi
54945  fi
54946
54947      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54948$as_echo_n "checking for $DLL_NAME... " >&6; }
54949      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54950$as_echo "$MSVC_DLL" >&6; }
54951    else
54952      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54953$as_echo "incorrect, ignoring" >&6; }
54954      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54955$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54956    fi
54957  fi
54958
54959      if test "x$MSVC_DLL" = x; then
54960        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
54961      fi
54962      MSVCP_DLL="$MSVC_DLL"
54963    else
54964
54965  DLL_NAME="${MSVCP_NAME}"
54966  MSVC_DLL=
54967
54968  if test "x$MSVC_DLL" = x; then
54969    # Probe: Using well-known location from Visual Studio 10.0
54970    if test "x$VCINSTALLDIR" != x; then
54971      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
54972
54973  windows_path="$CYGWIN_VC_INSTALL_DIR"
54974  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54975    unix_path=`$CYGPATH -u "$windows_path"`
54976    CYGWIN_VC_INSTALL_DIR="$unix_path"
54977  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54978    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54979    CYGWIN_VC_INSTALL_DIR="$unix_path"
54980  fi
54981
54982      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54983        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54984      else
54985        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54986      fi
54987      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
54988
54989  DLL_NAME="$DLL_NAME"
54990  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54991  METHOD="well-known location in VCINSTALLDIR"
54992  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54993    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54994$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54995
54996    # Need to check if the found msvcr is correct architecture
54997    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54998$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54999    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55000    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55001      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55002      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55003      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55004        CORRECT_MSVCR_ARCH="PE32 executable"
55005      else
55006        CORRECT_MSVCR_ARCH="PE32+ executable"
55007      fi
55008    else
55009      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55010        CORRECT_MSVCR_ARCH=386
55011      else
55012        CORRECT_MSVCR_ARCH=x86-64
55013      fi
55014    fi
55015    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55016      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55017$as_echo "ok" >&6; }
55018      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55019
55020  # Only process if variable expands to non-empty
55021
55022  if test "x$MSVC_DLL" != x; then
55023    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55024
55025  # Input might be given as Windows format, start by converting to
55026  # unix format.
55027  path="$MSVC_DLL"
55028  new_path=`$CYGPATH -u "$path"`
55029
55030  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55031  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55032  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55033  # "foo.exe" is OK but "foo" is an error.
55034  #
55035  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55036  # It is also a way to make sure we got the proper file name for the real test later on.
55037  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55038  if test "x$test_shortpath" = x; then
55039    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55040$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55041    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55042  fi
55043
55044  # Call helper function which possibly converts this using DOS-style short mode.
55045  # If so, the updated path is stored in $new_path.
55046
55047  input_path="$new_path"
55048  # Check if we need to convert this using DOS-style short mode. If the path
55049  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55050  # take no chances and rewrite it.
55051  # Note: m4 eats our [], so we need to use [ and ] instead.
55052  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55053  if test "x$has_forbidden_chars" != x; then
55054    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55055    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55056    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55057    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55058      # Going to short mode and back again did indeed matter. Since short mode is
55059      # case insensitive, let's make it lowercase to improve readability.
55060      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55061      # Now convert it back to Unix-style (cygpath)
55062      input_path=`$CYGPATH -u "$shortmode_path"`
55063      new_path="$input_path"
55064    fi
55065  fi
55066
55067  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55068  if test "x$test_cygdrive_prefix" = x; then
55069    # As a simple fix, exclude /usr/bin since it's not a real path.
55070    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55071      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55072      # a path prefixed by /cygdrive for fixpath to work.
55073      new_path="$CYGWIN_ROOT_PATH$input_path"
55074    fi
55075  fi
55076
55077
55078  if test "x$path" != "x$new_path"; then
55079    MSVC_DLL="$new_path"
55080    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55081$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55082  fi
55083
55084    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55085
55086  path="$MSVC_DLL"
55087  has_colon=`$ECHO $path | $GREP ^.:`
55088  new_path="$path"
55089  if test "x$has_colon" = x; then
55090    # Not in mixed or Windows style, start by that.
55091    new_path=`cmd //c echo $path`
55092  fi
55093
55094
55095  input_path="$new_path"
55096  # Check if we need to convert this using DOS-style short mode. If the path
55097  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55098  # take no chances and rewrite it.
55099  # Note: m4 eats our [], so we need to use [ and ] instead.
55100  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55101  if test "x$has_forbidden_chars" != x; then
55102    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55103    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55104  fi
55105
55106
55107  windows_path="$new_path"
55108  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55109    unix_path=`$CYGPATH -u "$windows_path"`
55110    new_path="$unix_path"
55111  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55112    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55113    new_path="$unix_path"
55114  fi
55115
55116  if test "x$path" != "x$new_path"; then
55117    MSVC_DLL="$new_path"
55118    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55119$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55120  fi
55121
55122  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55123  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55124
55125    else
55126      # We're on a unix platform. Hooray! :)
55127      path="$MSVC_DLL"
55128      has_space=`$ECHO "$path" | $GREP " "`
55129      if test "x$has_space" != x; then
55130        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55131$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55132        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55133      fi
55134
55135      # Use eval to expand a potential ~
55136      eval path="$path"
55137      if test ! -f "$path" && test ! -d "$path"; then
55138        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55139      fi
55140
55141      if test -d "$path"; then
55142        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55143      else
55144        dir="`$DIRNAME "$path"`"
55145        base="`$BASENAME "$path"`"
55146        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55147      fi
55148    fi
55149  fi
55150
55151      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55152$as_echo_n "checking for $DLL_NAME... " >&6; }
55153      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55154$as_echo "$MSVC_DLL" >&6; }
55155    else
55156      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55157$as_echo "incorrect, ignoring" >&6; }
55158      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55159$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55160    fi
55161  fi
55162
55163    fi
55164  fi
55165
55166  if test "x$MSVC_DLL" = x; then
55167    # Probe: Check in the Boot JDK directory.
55168    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
55169
55170  DLL_NAME="$DLL_NAME"
55171  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55172  METHOD="well-known location in Boot JDK"
55173  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55174    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55175$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55176
55177    # Need to check if the found msvcr is correct architecture
55178    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55179$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55180    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55181    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55182      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55183      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55184      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55185        CORRECT_MSVCR_ARCH="PE32 executable"
55186      else
55187        CORRECT_MSVCR_ARCH="PE32+ executable"
55188      fi
55189    else
55190      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55191        CORRECT_MSVCR_ARCH=386
55192      else
55193        CORRECT_MSVCR_ARCH=x86-64
55194      fi
55195    fi
55196    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55197      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55198$as_echo "ok" >&6; }
55199      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55200
55201  # Only process if variable expands to non-empty
55202
55203  if test "x$MSVC_DLL" != x; then
55204    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55205
55206  # Input might be given as Windows format, start by converting to
55207  # unix format.
55208  path="$MSVC_DLL"
55209  new_path=`$CYGPATH -u "$path"`
55210
55211  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55212  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55213  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55214  # "foo.exe" is OK but "foo" is an error.
55215  #
55216  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55217  # It is also a way to make sure we got the proper file name for the real test later on.
55218  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55219  if test "x$test_shortpath" = x; then
55220    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55221$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55222    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55223  fi
55224
55225  # Call helper function which possibly converts this using DOS-style short mode.
55226  # If so, the updated path is stored in $new_path.
55227
55228  input_path="$new_path"
55229  # Check if we need to convert this using DOS-style short mode. If the path
55230  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55231  # take no chances and rewrite it.
55232  # Note: m4 eats our [], so we need to use [ and ] instead.
55233  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55234  if test "x$has_forbidden_chars" != x; then
55235    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55236    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55237    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55238    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55239      # Going to short mode and back again did indeed matter. Since short mode is
55240      # case insensitive, let's make it lowercase to improve readability.
55241      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55242      # Now convert it back to Unix-style (cygpath)
55243      input_path=`$CYGPATH -u "$shortmode_path"`
55244      new_path="$input_path"
55245    fi
55246  fi
55247
55248  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55249  if test "x$test_cygdrive_prefix" = x; then
55250    # As a simple fix, exclude /usr/bin since it's not a real path.
55251    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55252      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55253      # a path prefixed by /cygdrive for fixpath to work.
55254      new_path="$CYGWIN_ROOT_PATH$input_path"
55255    fi
55256  fi
55257
55258
55259  if test "x$path" != "x$new_path"; then
55260    MSVC_DLL="$new_path"
55261    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55262$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55263  fi
55264
55265    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55266
55267  path="$MSVC_DLL"
55268  has_colon=`$ECHO $path | $GREP ^.:`
55269  new_path="$path"
55270  if test "x$has_colon" = x; then
55271    # Not in mixed or Windows style, start by that.
55272    new_path=`cmd //c echo $path`
55273  fi
55274
55275
55276  input_path="$new_path"
55277  # Check if we need to convert this using DOS-style short mode. If the path
55278  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55279  # take no chances and rewrite it.
55280  # Note: m4 eats our [], so we need to use [ and ] instead.
55281  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55282  if test "x$has_forbidden_chars" != x; then
55283    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55284    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55285  fi
55286
55287
55288  windows_path="$new_path"
55289  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55290    unix_path=`$CYGPATH -u "$windows_path"`
55291    new_path="$unix_path"
55292  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55293    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55294    new_path="$unix_path"
55295  fi
55296
55297  if test "x$path" != "x$new_path"; then
55298    MSVC_DLL="$new_path"
55299    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55300$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55301  fi
55302
55303  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55304  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55305
55306    else
55307      # We're on a unix platform. Hooray! :)
55308      path="$MSVC_DLL"
55309      has_space=`$ECHO "$path" | $GREP " "`
55310      if test "x$has_space" != x; then
55311        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55312$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55313        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55314      fi
55315
55316      # Use eval to expand a potential ~
55317      eval path="$path"
55318      if test ! -f "$path" && test ! -d "$path"; then
55319        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55320      fi
55321
55322      if test -d "$path"; then
55323        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55324      else
55325        dir="`$DIRNAME "$path"`"
55326        base="`$BASENAME "$path"`"
55327        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55328      fi
55329    fi
55330  fi
55331
55332      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55333$as_echo_n "checking for $DLL_NAME... " >&6; }
55334      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55335$as_echo "$MSVC_DLL" >&6; }
55336    else
55337      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55338$as_echo "incorrect, ignoring" >&6; }
55339      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55340$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55341    fi
55342  fi
55343
55344  fi
55345
55346  if test "x$MSVC_DLL" = x; then
55347    # Probe: Look in the Windows system32 directory
55348    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
55349
55350  windows_path="$CYGWIN_SYSTEMROOT"
55351  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55352    unix_path=`$CYGPATH -u "$windows_path"`
55353    CYGWIN_SYSTEMROOT="$unix_path"
55354  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55355    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55356    CYGWIN_SYSTEMROOT="$unix_path"
55357  fi
55358
55359    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
55360
55361  DLL_NAME="$DLL_NAME"
55362  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55363  METHOD="well-known location in SYSTEMROOT"
55364  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55365    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55366$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55367
55368    # Need to check if the found msvcr is correct architecture
55369    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55370$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55371    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55372    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55373      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55374      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55375      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55376        CORRECT_MSVCR_ARCH="PE32 executable"
55377      else
55378        CORRECT_MSVCR_ARCH="PE32+ executable"
55379      fi
55380    else
55381      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55382        CORRECT_MSVCR_ARCH=386
55383      else
55384        CORRECT_MSVCR_ARCH=x86-64
55385      fi
55386    fi
55387    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55388      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55389$as_echo "ok" >&6; }
55390      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55391
55392  # Only process if variable expands to non-empty
55393
55394  if test "x$MSVC_DLL" != x; then
55395    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55396
55397  # Input might be given as Windows format, start by converting to
55398  # unix format.
55399  path="$MSVC_DLL"
55400  new_path=`$CYGPATH -u "$path"`
55401
55402  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55403  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55404  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55405  # "foo.exe" is OK but "foo" is an error.
55406  #
55407  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55408  # It is also a way to make sure we got the proper file name for the real test later on.
55409  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55410  if test "x$test_shortpath" = x; then
55411    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55412$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55413    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55414  fi
55415
55416  # Call helper function which possibly converts this using DOS-style short mode.
55417  # If so, the updated path is stored in $new_path.
55418
55419  input_path="$new_path"
55420  # Check if we need to convert this using DOS-style short mode. If the path
55421  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55422  # take no chances and rewrite it.
55423  # Note: m4 eats our [], so we need to use [ and ] instead.
55424  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55425  if test "x$has_forbidden_chars" != x; then
55426    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55427    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55428    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55429    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55430      # Going to short mode and back again did indeed matter. Since short mode is
55431      # case insensitive, let's make it lowercase to improve readability.
55432      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55433      # Now convert it back to Unix-style (cygpath)
55434      input_path=`$CYGPATH -u "$shortmode_path"`
55435      new_path="$input_path"
55436    fi
55437  fi
55438
55439  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55440  if test "x$test_cygdrive_prefix" = x; then
55441    # As a simple fix, exclude /usr/bin since it's not a real path.
55442    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55443      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55444      # a path prefixed by /cygdrive for fixpath to work.
55445      new_path="$CYGWIN_ROOT_PATH$input_path"
55446    fi
55447  fi
55448
55449
55450  if test "x$path" != "x$new_path"; then
55451    MSVC_DLL="$new_path"
55452    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55453$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55454  fi
55455
55456    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55457
55458  path="$MSVC_DLL"
55459  has_colon=`$ECHO $path | $GREP ^.:`
55460  new_path="$path"
55461  if test "x$has_colon" = x; then
55462    # Not in mixed or Windows style, start by that.
55463    new_path=`cmd //c echo $path`
55464  fi
55465
55466
55467  input_path="$new_path"
55468  # Check if we need to convert this using DOS-style short mode. If the path
55469  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55470  # take no chances and rewrite it.
55471  # Note: m4 eats our [], so we need to use [ and ] instead.
55472  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55473  if test "x$has_forbidden_chars" != x; then
55474    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55475    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55476  fi
55477
55478
55479  windows_path="$new_path"
55480  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55481    unix_path=`$CYGPATH -u "$windows_path"`
55482    new_path="$unix_path"
55483  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55484    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55485    new_path="$unix_path"
55486  fi
55487
55488  if test "x$path" != "x$new_path"; then
55489    MSVC_DLL="$new_path"
55490    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55491$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55492  fi
55493
55494  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55495  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55496
55497    else
55498      # We're on a unix platform. Hooray! :)
55499      path="$MSVC_DLL"
55500      has_space=`$ECHO "$path" | $GREP " "`
55501      if test "x$has_space" != x; then
55502        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55503$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55504        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55505      fi
55506
55507      # Use eval to expand a potential ~
55508      eval path="$path"
55509      if test ! -f "$path" && test ! -d "$path"; then
55510        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55511      fi
55512
55513      if test -d "$path"; then
55514        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55515      else
55516        dir="`$DIRNAME "$path"`"
55517        base="`$BASENAME "$path"`"
55518        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55519      fi
55520    fi
55521  fi
55522
55523      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55524$as_echo_n "checking for $DLL_NAME... " >&6; }
55525      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55526$as_echo "$MSVC_DLL" >&6; }
55527    else
55528      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55529$as_echo "incorrect, ignoring" >&6; }
55530      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55531$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55532    fi
55533  fi
55534
55535  fi
55536
55537  if test "x$MSVC_DLL" = x; then
55538    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
55539    if test "x$VS100COMNTOOLS" != x; then
55540      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
55541
55542  windows_path="$CYGWIN_VS_TOOLS_DIR"
55543  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55544    unix_path=`$CYGPATH -u "$windows_path"`
55545    CYGWIN_VS_TOOLS_DIR="$unix_path"
55546  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55547    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55548    CYGWIN_VS_TOOLS_DIR="$unix_path"
55549  fi
55550
55551      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55552        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55553	    | $GREP -i /x64/ | $HEAD --lines 1`
55554      else
55555        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55556	    | $GREP -i /x86/ | $HEAD --lines 1`
55557      fi
55558
55559  DLL_NAME="$DLL_NAME"
55560  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55561  METHOD="search of VS100COMNTOOLS"
55562  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55563    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55564$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55565
55566    # Need to check if the found msvcr is correct architecture
55567    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55568$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55569    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55570    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55571      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55572      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55573      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55574        CORRECT_MSVCR_ARCH="PE32 executable"
55575      else
55576        CORRECT_MSVCR_ARCH="PE32+ executable"
55577      fi
55578    else
55579      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55580        CORRECT_MSVCR_ARCH=386
55581      else
55582        CORRECT_MSVCR_ARCH=x86-64
55583      fi
55584    fi
55585    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55586      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55587$as_echo "ok" >&6; }
55588      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55589
55590  # Only process if variable expands to non-empty
55591
55592  if test "x$MSVC_DLL" != x; then
55593    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55594
55595  # Input might be given as Windows format, start by converting to
55596  # unix format.
55597  path="$MSVC_DLL"
55598  new_path=`$CYGPATH -u "$path"`
55599
55600  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55601  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55602  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55603  # "foo.exe" is OK but "foo" is an error.
55604  #
55605  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55606  # It is also a way to make sure we got the proper file name for the real test later on.
55607  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55608  if test "x$test_shortpath" = x; then
55609    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55610$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55611    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55612  fi
55613
55614  # Call helper function which possibly converts this using DOS-style short mode.
55615  # If so, the updated path is stored in $new_path.
55616
55617  input_path="$new_path"
55618  # Check if we need to convert this using DOS-style short mode. If the path
55619  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55620  # take no chances and rewrite it.
55621  # Note: m4 eats our [], so we need to use [ and ] instead.
55622  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55623  if test "x$has_forbidden_chars" != x; then
55624    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55625    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55626    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55627    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55628      # Going to short mode and back again did indeed matter. Since short mode is
55629      # case insensitive, let's make it lowercase to improve readability.
55630      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55631      # Now convert it back to Unix-style (cygpath)
55632      input_path=`$CYGPATH -u "$shortmode_path"`
55633      new_path="$input_path"
55634    fi
55635  fi
55636
55637  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55638  if test "x$test_cygdrive_prefix" = x; then
55639    # As a simple fix, exclude /usr/bin since it's not a real path.
55640    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55641      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55642      # a path prefixed by /cygdrive for fixpath to work.
55643      new_path="$CYGWIN_ROOT_PATH$input_path"
55644    fi
55645  fi
55646
55647
55648  if test "x$path" != "x$new_path"; then
55649    MSVC_DLL="$new_path"
55650    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55651$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55652  fi
55653
55654    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55655
55656  path="$MSVC_DLL"
55657  has_colon=`$ECHO $path | $GREP ^.:`
55658  new_path="$path"
55659  if test "x$has_colon" = x; then
55660    # Not in mixed or Windows style, start by that.
55661    new_path=`cmd //c echo $path`
55662  fi
55663
55664
55665  input_path="$new_path"
55666  # Check if we need to convert this using DOS-style short mode. If the path
55667  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55668  # take no chances and rewrite it.
55669  # Note: m4 eats our [], so we need to use [ and ] instead.
55670  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55671  if test "x$has_forbidden_chars" != x; then
55672    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55673    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55674  fi
55675
55676
55677  windows_path="$new_path"
55678  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55679    unix_path=`$CYGPATH -u "$windows_path"`
55680    new_path="$unix_path"
55681  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55682    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55683    new_path="$unix_path"
55684  fi
55685
55686  if test "x$path" != "x$new_path"; then
55687    MSVC_DLL="$new_path"
55688    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55689$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55690  fi
55691
55692  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55693  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55694
55695    else
55696      # We're on a unix platform. Hooray! :)
55697      path="$MSVC_DLL"
55698      has_space=`$ECHO "$path" | $GREP " "`
55699      if test "x$has_space" != x; then
55700        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55701$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55702        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55703      fi
55704
55705      # Use eval to expand a potential ~
55706      eval path="$path"
55707      if test ! -f "$path" && test ! -d "$path"; then
55708        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55709      fi
55710
55711      if test -d "$path"; then
55712        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55713      else
55714        dir="`$DIRNAME "$path"`"
55715        base="`$BASENAME "$path"`"
55716        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55717      fi
55718    fi
55719  fi
55720
55721      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55722$as_echo_n "checking for $DLL_NAME... " >&6; }
55723      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55724$as_echo "$MSVC_DLL" >&6; }
55725    else
55726      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55727$as_echo "incorrect, ignoring" >&6; }
55728      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55729$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55730    fi
55731  fi
55732
55733    fi
55734  fi
55735
55736  if test "x$MSVC_DLL" = x; then
55737    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
55738    # (This was the original behaviour; kept since it might turn something up)
55739    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
55740      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55741        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55742	    | $GREP x64 | $HEAD --lines 1`
55743      else
55744        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55745	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
55746        if test "x$POSSIBLE_MSVC_DLL" = x; then
55747          # We're grasping at straws now...
55748          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55749	      | $HEAD --lines 1`
55750        fi
55751      fi
55752
55753
55754  DLL_NAME="$DLL_NAME"
55755  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55756  METHOD="search of VCINSTALLDIR"
55757  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55758    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55759$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55760
55761    # Need to check if the found msvcr is correct architecture
55762    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55763$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55764    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55765    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55766      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55767      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55768      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55769        CORRECT_MSVCR_ARCH="PE32 executable"
55770      else
55771        CORRECT_MSVCR_ARCH="PE32+ executable"
55772      fi
55773    else
55774      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55775        CORRECT_MSVCR_ARCH=386
55776      else
55777        CORRECT_MSVCR_ARCH=x86-64
55778      fi
55779    fi
55780    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55781      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55782$as_echo "ok" >&6; }
55783      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55784
55785  # Only process if variable expands to non-empty
55786
55787  if test "x$MSVC_DLL" != x; then
55788    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55789
55790  # Input might be given as Windows format, start by converting to
55791  # unix format.
55792  path="$MSVC_DLL"
55793  new_path=`$CYGPATH -u "$path"`
55794
55795  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55796  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55797  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55798  # "foo.exe" is OK but "foo" is an error.
55799  #
55800  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55801  # It is also a way to make sure we got the proper file name for the real test later on.
55802  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55803  if test "x$test_shortpath" = x; then
55804    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55805$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55806    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55807  fi
55808
55809  # Call helper function which possibly converts this using DOS-style short mode.
55810  # If so, the updated path is stored in $new_path.
55811
55812  input_path="$new_path"
55813  # Check if we need to convert this using DOS-style short mode. If the path
55814  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55815  # take no chances and rewrite it.
55816  # Note: m4 eats our [], so we need to use [ and ] instead.
55817  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55818  if test "x$has_forbidden_chars" != x; then
55819    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55820    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55821    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55822    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55823      # Going to short mode and back again did indeed matter. Since short mode is
55824      # case insensitive, let's make it lowercase to improve readability.
55825      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55826      # Now convert it back to Unix-style (cygpath)
55827      input_path=`$CYGPATH -u "$shortmode_path"`
55828      new_path="$input_path"
55829    fi
55830  fi
55831
55832  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55833  if test "x$test_cygdrive_prefix" = x; then
55834    # As a simple fix, exclude /usr/bin since it's not a real path.
55835    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55836      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55837      # a path prefixed by /cygdrive for fixpath to work.
55838      new_path="$CYGWIN_ROOT_PATH$input_path"
55839    fi
55840  fi
55841
55842
55843  if test "x$path" != "x$new_path"; then
55844    MSVC_DLL="$new_path"
55845    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55846$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55847  fi
55848
55849    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55850
55851  path="$MSVC_DLL"
55852  has_colon=`$ECHO $path | $GREP ^.:`
55853  new_path="$path"
55854  if test "x$has_colon" = x; then
55855    # Not in mixed or Windows style, start by that.
55856    new_path=`cmd //c echo $path`
55857  fi
55858
55859
55860  input_path="$new_path"
55861  # Check if we need to convert this using DOS-style short mode. If the path
55862  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55863  # take no chances and rewrite it.
55864  # Note: m4 eats our [], so we need to use [ and ] instead.
55865  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55866  if test "x$has_forbidden_chars" != x; then
55867    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55868    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55869  fi
55870
55871
55872  windows_path="$new_path"
55873  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55874    unix_path=`$CYGPATH -u "$windows_path"`
55875    new_path="$unix_path"
55876  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55877    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55878    new_path="$unix_path"
55879  fi
55880
55881  if test "x$path" != "x$new_path"; then
55882    MSVC_DLL="$new_path"
55883    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55884$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55885  fi
55886
55887  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55888  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55889
55890    else
55891      # We're on a unix platform. Hooray! :)
55892      path="$MSVC_DLL"
55893      has_space=`$ECHO "$path" | $GREP " "`
55894      if test "x$has_space" != x; then
55895        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55896$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55897        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55898      fi
55899
55900      # Use eval to expand a potential ~
55901      eval path="$path"
55902      if test ! -f "$path" && test ! -d "$path"; then
55903        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55904      fi
55905
55906      if test -d "$path"; then
55907        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55908      else
55909        dir="`$DIRNAME "$path"`"
55910        base="`$BASENAME "$path"`"
55911        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55912      fi
55913    fi
55914  fi
55915
55916      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55917$as_echo_n "checking for $DLL_NAME... " >&6; }
55918      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55919$as_echo "$MSVC_DLL" >&6; }
55920    else
55921      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55922$as_echo "incorrect, ignoring" >&6; }
55923      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55924$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55925    fi
55926  fi
55927
55928    fi
55929  fi
55930
55931  if test "x$MSVC_DLL" = x; then
55932    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55933$as_echo_n "checking for $DLL_NAME... " >&6; }
55934    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55935$as_echo "no" >&6; }
55936    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
55937  fi
55938
55939      MSVCP_DLL="$MSVC_DLL"
55940    fi
55941
55942  fi
55943
55944  fi
55945
55946
55947  if test "x$NEEDS_LIB_X11" = xfalse; then
55948    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
55949      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
55950$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
55951    fi
55952    X_CFLAGS=
55953    X_LIBS=
55954  else
55955
55956    if test "x${with_x}" = xno; then
55957      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
55958    fi
55959
55960    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
55961      # The user has specified a X11 base directory. Use it for includes and
55962      # libraries, unless explicitely overridden.
55963      if test "x$x_includes" = xNONE; then
55964        x_includes="${with_x}/include"
55965      fi
55966      if test "x$x_libraries" = xNONE; then
55967        x_libraries="${with_x}/lib"
55968      fi
55969    else
55970      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
55971      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
55972      # --x-libraries for the sysroot, if that seems to be correct.
55973      if test "x$SYSROOT" != "x"; then
55974        if test "x$x_includes" = xNONE; then
55975          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
55976            x_includes="$SYSROOT/usr/X11R6/include"
55977          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
55978            x_includes="$SYSROOT/usr/include"
55979          fi
55980        fi
55981        if test "x$x_libraries" = xNONE; then
55982          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
55983            x_libraries="$SYSROOT/usr/X11R6/lib"
55984          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55985            x_libraries="$SYSROOT/usr/lib64"
55986          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
55987            x_libraries="$SYSROOT/usr/lib"
55988          fi
55989        fi
55990      fi
55991    fi
55992
55993    # Now let autoconf do it's magic
55994    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
55995$as_echo_n "checking for X... " >&6; }
55996
55997
55998# Check whether --with-x was given.
55999if test "${with_x+set}" = set; then :
56000  withval=$with_x;
56001fi
56002
56003# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
56004if test "x$with_x" = xno; then
56005  # The user explicitly disabled X.
56006  have_x=disabled
56007else
56008  case $x_includes,$x_libraries in #(
56009    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
56010    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
56011  $as_echo_n "(cached) " >&6
56012else
56013  # One or both of the vars are not set, and there is no cached value.
56014ac_x_includes=no ac_x_libraries=no
56015rm -f -r conftest.dir
56016if mkdir conftest.dir; then
56017  cd conftest.dir
56018  cat >Imakefile <<'_ACEOF'
56019incroot:
56020	@echo incroot='${INCROOT}'
56021usrlibdir:
56022	@echo usrlibdir='${USRLIBDIR}'
56023libdir:
56024	@echo libdir='${LIBDIR}'
56025_ACEOF
56026  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
56027    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
56028    for ac_var in incroot usrlibdir libdir; do
56029      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
56030    done
56031    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
56032    for ac_extension in a so sl dylib la dll; do
56033      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
56034	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
56035	ac_im_usrlibdir=$ac_im_libdir; break
56036      fi
56037    done
56038    # Screen out bogus values from the imake configuration.  They are
56039    # bogus both because they are the default anyway, and because
56040    # using them would break gcc on systems where it needs fixed includes.
56041    case $ac_im_incroot in
56042	/usr/include) ac_x_includes= ;;
56043	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
56044    esac
56045    case $ac_im_usrlibdir in
56046	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
56047	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
56048    esac
56049  fi
56050  cd ..
56051  rm -f -r conftest.dir
56052fi
56053
56054# Standard set of common directories for X headers.
56055# Check X11 before X11Rn because it is often a symlink to the current release.
56056ac_x_header_dirs='
56057/usr/X11/include
56058/usr/X11R7/include
56059/usr/X11R6/include
56060/usr/X11R5/include
56061/usr/X11R4/include
56062
56063/usr/include/X11
56064/usr/include/X11R7
56065/usr/include/X11R6
56066/usr/include/X11R5
56067/usr/include/X11R4
56068
56069/usr/local/X11/include
56070/usr/local/X11R7/include
56071/usr/local/X11R6/include
56072/usr/local/X11R5/include
56073/usr/local/X11R4/include
56074
56075/usr/local/include/X11
56076/usr/local/include/X11R7
56077/usr/local/include/X11R6
56078/usr/local/include/X11R5
56079/usr/local/include/X11R4
56080
56081/usr/X386/include
56082/usr/x386/include
56083/usr/XFree86/include/X11
56084
56085/usr/include
56086/usr/local/include
56087/usr/unsupported/include
56088/usr/athena/include
56089/usr/local/x11r5/include
56090/usr/lpp/Xamples/include
56091
56092/usr/openwin/include
56093/usr/openwin/share/include'
56094
56095if test "$ac_x_includes" = no; then
56096  # Guess where to find include files, by looking for Xlib.h.
56097  # First, try using that file with no special directory specified.
56098  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56099/* end confdefs.h.  */
56100#include <X11/Xlib.h>
56101_ACEOF
56102if ac_fn_cxx_try_cpp "$LINENO"; then :
56103  # We can compile using X headers with no special include directory.
56104ac_x_includes=
56105else
56106  for ac_dir in $ac_x_header_dirs; do
56107  if test -r "$ac_dir/X11/Xlib.h"; then
56108    ac_x_includes=$ac_dir
56109    break
56110  fi
56111done
56112fi
56113rm -f conftest.err conftest.i conftest.$ac_ext
56114fi # $ac_x_includes = no
56115
56116if test "$ac_x_libraries" = no; then
56117  # Check for the libraries.
56118  # See if we find them without any special options.
56119  # Don't add to $LIBS permanently.
56120  ac_save_LIBS=$LIBS
56121  LIBS="-lX11 $LIBS"
56122  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56123/* end confdefs.h.  */
56124#include <X11/Xlib.h>
56125int
56126main ()
56127{
56128XrmInitialize ()
56129  ;
56130  return 0;
56131}
56132_ACEOF
56133if ac_fn_cxx_try_link "$LINENO"; then :
56134  LIBS=$ac_save_LIBS
56135# We can link X programs with no special library path.
56136ac_x_libraries=
56137else
56138  LIBS=$ac_save_LIBS
56139for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
56140do
56141  # Don't even attempt the hair of trying to link an X program!
56142  for ac_extension in a so sl dylib la dll; do
56143    if test -r "$ac_dir/libX11.$ac_extension"; then
56144      ac_x_libraries=$ac_dir
56145      break 2
56146    fi
56147  done
56148done
56149fi
56150rm -f core conftest.err conftest.$ac_objext \
56151    conftest$ac_exeext conftest.$ac_ext
56152fi # $ac_x_libraries = no
56153
56154case $ac_x_includes,$ac_x_libraries in #(
56155  no,* | *,no | *\'*)
56156    # Didn't find X, or a directory has "'" in its name.
56157    ac_cv_have_x="have_x=no";; #(
56158  *)
56159    # Record where we found X for the cache.
56160    ac_cv_have_x="have_x=yes\
56161	ac_x_includes='$ac_x_includes'\
56162	ac_x_libraries='$ac_x_libraries'"
56163esac
56164fi
56165;; #(
56166    *) have_x=yes;;
56167  esac
56168  eval "$ac_cv_have_x"
56169fi # $with_x != no
56170
56171if test "$have_x" != yes; then
56172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
56173$as_echo "$have_x" >&6; }
56174  no_x=yes
56175else
56176  # If each of the values was on the command line, it overrides each guess.
56177  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
56178  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
56179  # Update the cache value to reflect the command line values.
56180  ac_cv_have_x="have_x=yes\
56181	ac_x_includes='$x_includes'\
56182	ac_x_libraries='$x_libraries'"
56183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
56184$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
56185fi
56186
56187    if test "$no_x" = yes; then
56188  # Not all programs may use this symbol, but it does not hurt to define it.
56189
56190$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
56191
56192  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
56193else
56194  if test -n "$x_includes"; then
56195    X_CFLAGS="$X_CFLAGS -I$x_includes"
56196  fi
56197
56198  # It would also be nice to do this for all -L options, not just this one.
56199  if test -n "$x_libraries"; then
56200    X_LIBS="$X_LIBS -L$x_libraries"
56201    # For Solaris; some versions of Sun CC require a space after -R and
56202    # others require no space.  Words are not sufficient . . . .
56203    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
56204$as_echo_n "checking whether -R must be followed by a space... " >&6; }
56205    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
56206    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
56207    ac_cxx_werror_flag=yes
56208    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56209/* end confdefs.h.  */
56210
56211int
56212main ()
56213{
56214
56215  ;
56216  return 0;
56217}
56218_ACEOF
56219if ac_fn_cxx_try_link "$LINENO"; then :
56220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56221$as_echo "no" >&6; }
56222       X_LIBS="$X_LIBS -R$x_libraries"
56223else
56224  LIBS="$ac_xsave_LIBS -R $x_libraries"
56225       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56226/* end confdefs.h.  */
56227
56228int
56229main ()
56230{
56231
56232  ;
56233  return 0;
56234}
56235_ACEOF
56236if ac_fn_cxx_try_link "$LINENO"; then :
56237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56238$as_echo "yes" >&6; }
56239	  X_LIBS="$X_LIBS -R $x_libraries"
56240else
56241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
56242$as_echo "neither works" >&6; }
56243fi
56244rm -f core conftest.err conftest.$ac_objext \
56245    conftest$ac_exeext conftest.$ac_ext
56246fi
56247rm -f core conftest.err conftest.$ac_objext \
56248    conftest$ac_exeext conftest.$ac_ext
56249    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
56250    LIBS=$ac_xsave_LIBS
56251  fi
56252
56253  # Check for system-dependent libraries X programs must link with.
56254  # Do this before checking for the system-independent R6 libraries
56255  # (-lICE), since we may need -lsocket or whatever for X linking.
56256
56257  if test "$ISC" = yes; then
56258    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
56259  else
56260    # Martyn Johnson says this is needed for Ultrix, if the X
56261    # libraries were built with DECnet support.  And Karl Berry says
56262    # the Alpha needs dnet_stub (dnet does not exist).
56263    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
56264    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56265/* end confdefs.h.  */
56266
56267/* Override any GCC internal prototype to avoid an error.
56268   Use char because int might match the return type of a GCC
56269   builtin and then its argument prototype would still apply.  */
56270#ifdef __cplusplus
56271extern "C"
56272#endif
56273char XOpenDisplay ();
56274int
56275main ()
56276{
56277return XOpenDisplay ();
56278  ;
56279  return 0;
56280}
56281_ACEOF
56282if ac_fn_cxx_try_link "$LINENO"; then :
56283
56284else
56285  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
56286$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
56287if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
56288  $as_echo_n "(cached) " >&6
56289else
56290  ac_check_lib_save_LIBS=$LIBS
56291LIBS="-ldnet  $LIBS"
56292cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56293/* end confdefs.h.  */
56294
56295/* Override any GCC internal prototype to avoid an error.
56296   Use char because int might match the return type of a GCC
56297   builtin and then its argument prototype would still apply.  */
56298#ifdef __cplusplus
56299extern "C"
56300#endif
56301char dnet_ntoa ();
56302int
56303main ()
56304{
56305return dnet_ntoa ();
56306  ;
56307  return 0;
56308}
56309_ACEOF
56310if ac_fn_cxx_try_link "$LINENO"; then :
56311  ac_cv_lib_dnet_dnet_ntoa=yes
56312else
56313  ac_cv_lib_dnet_dnet_ntoa=no
56314fi
56315rm -f core conftest.err conftest.$ac_objext \
56316    conftest$ac_exeext conftest.$ac_ext
56317LIBS=$ac_check_lib_save_LIBS
56318fi
56319{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
56320$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
56321if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
56322  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
56323fi
56324
56325    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
56326      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
56327$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
56328if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
56329  $as_echo_n "(cached) " >&6
56330else
56331  ac_check_lib_save_LIBS=$LIBS
56332LIBS="-ldnet_stub  $LIBS"
56333cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56334/* end confdefs.h.  */
56335
56336/* Override any GCC internal prototype to avoid an error.
56337   Use char because int might match the return type of a GCC
56338   builtin and then its argument prototype would still apply.  */
56339#ifdef __cplusplus
56340extern "C"
56341#endif
56342char dnet_ntoa ();
56343int
56344main ()
56345{
56346return dnet_ntoa ();
56347  ;
56348  return 0;
56349}
56350_ACEOF
56351if ac_fn_cxx_try_link "$LINENO"; then :
56352  ac_cv_lib_dnet_stub_dnet_ntoa=yes
56353else
56354  ac_cv_lib_dnet_stub_dnet_ntoa=no
56355fi
56356rm -f core conftest.err conftest.$ac_objext \
56357    conftest$ac_exeext conftest.$ac_ext
56358LIBS=$ac_check_lib_save_LIBS
56359fi
56360{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
56361$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
56362if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
56363  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
56364fi
56365
56366    fi
56367fi
56368rm -f core conftest.err conftest.$ac_objext \
56369    conftest$ac_exeext conftest.$ac_ext
56370    LIBS="$ac_xsave_LIBS"
56371
56372    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
56373    # to get the SysV transport functions.
56374    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
56375    # needs -lnsl.
56376    # The nsl library prevents programs from opening the X display
56377    # on Irix 5.2, according to T.E. Dickey.
56378    # The functions gethostbyname, getservbyname, and inet_addr are
56379    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
56380    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
56381if test "x$ac_cv_func_gethostbyname" = xyes; then :
56382
56383fi
56384
56385    if test $ac_cv_func_gethostbyname = no; then
56386      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
56387$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
56388if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
56389  $as_echo_n "(cached) " >&6
56390else
56391  ac_check_lib_save_LIBS=$LIBS
56392LIBS="-lnsl  $LIBS"
56393cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56394/* end confdefs.h.  */
56395
56396/* Override any GCC internal prototype to avoid an error.
56397   Use char because int might match the return type of a GCC
56398   builtin and then its argument prototype would still apply.  */
56399#ifdef __cplusplus
56400extern "C"
56401#endif
56402char gethostbyname ();
56403int
56404main ()
56405{
56406return gethostbyname ();
56407  ;
56408  return 0;
56409}
56410_ACEOF
56411if ac_fn_cxx_try_link "$LINENO"; then :
56412  ac_cv_lib_nsl_gethostbyname=yes
56413else
56414  ac_cv_lib_nsl_gethostbyname=no
56415fi
56416rm -f core conftest.err conftest.$ac_objext \
56417    conftest$ac_exeext conftest.$ac_ext
56418LIBS=$ac_check_lib_save_LIBS
56419fi
56420{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
56421$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
56422if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
56423  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
56424fi
56425
56426      if test $ac_cv_lib_nsl_gethostbyname = no; then
56427	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
56428$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
56429if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
56430  $as_echo_n "(cached) " >&6
56431else
56432  ac_check_lib_save_LIBS=$LIBS
56433LIBS="-lbsd  $LIBS"
56434cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56435/* end confdefs.h.  */
56436
56437/* Override any GCC internal prototype to avoid an error.
56438   Use char because int might match the return type of a GCC
56439   builtin and then its argument prototype would still apply.  */
56440#ifdef __cplusplus
56441extern "C"
56442#endif
56443char gethostbyname ();
56444int
56445main ()
56446{
56447return gethostbyname ();
56448  ;
56449  return 0;
56450}
56451_ACEOF
56452if ac_fn_cxx_try_link "$LINENO"; then :
56453  ac_cv_lib_bsd_gethostbyname=yes
56454else
56455  ac_cv_lib_bsd_gethostbyname=no
56456fi
56457rm -f core conftest.err conftest.$ac_objext \
56458    conftest$ac_exeext conftest.$ac_ext
56459LIBS=$ac_check_lib_save_LIBS
56460fi
56461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
56462$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
56463if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
56464  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
56465fi
56466
56467      fi
56468    fi
56469
56470    # lieder@skyler.mavd.honeywell.com says without -lsocket,
56471    # socket/setsockopt and other routines are undefined under SCO ODT
56472    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
56473    # on later versions), says Simon Leinen: it contains gethostby*
56474    # variants that don't use the name server (or something).  -lsocket
56475    # must be given before -lnsl if both are needed.  We assume that
56476    # if connect needs -lnsl, so does gethostbyname.
56477    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
56478if test "x$ac_cv_func_connect" = xyes; then :
56479
56480fi
56481
56482    if test $ac_cv_func_connect = no; then
56483      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
56484$as_echo_n "checking for connect in -lsocket... " >&6; }
56485if ${ac_cv_lib_socket_connect+:} false; then :
56486  $as_echo_n "(cached) " >&6
56487else
56488  ac_check_lib_save_LIBS=$LIBS
56489LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
56490cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56491/* end confdefs.h.  */
56492
56493/* Override any GCC internal prototype to avoid an error.
56494   Use char because int might match the return type of a GCC
56495   builtin and then its argument prototype would still apply.  */
56496#ifdef __cplusplus
56497extern "C"
56498#endif
56499char connect ();
56500int
56501main ()
56502{
56503return connect ();
56504  ;
56505  return 0;
56506}
56507_ACEOF
56508if ac_fn_cxx_try_link "$LINENO"; then :
56509  ac_cv_lib_socket_connect=yes
56510else
56511  ac_cv_lib_socket_connect=no
56512fi
56513rm -f core conftest.err conftest.$ac_objext \
56514    conftest$ac_exeext conftest.$ac_ext
56515LIBS=$ac_check_lib_save_LIBS
56516fi
56517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
56518$as_echo "$ac_cv_lib_socket_connect" >&6; }
56519if test "x$ac_cv_lib_socket_connect" = xyes; then :
56520  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
56521fi
56522
56523    fi
56524
56525    # Guillermo Gomez says -lposix is necessary on A/UX.
56526    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
56527if test "x$ac_cv_func_remove" = xyes; then :
56528
56529fi
56530
56531    if test $ac_cv_func_remove = no; then
56532      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
56533$as_echo_n "checking for remove in -lposix... " >&6; }
56534if ${ac_cv_lib_posix_remove+:} false; then :
56535  $as_echo_n "(cached) " >&6
56536else
56537  ac_check_lib_save_LIBS=$LIBS
56538LIBS="-lposix  $LIBS"
56539cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56540/* end confdefs.h.  */
56541
56542/* Override any GCC internal prototype to avoid an error.
56543   Use char because int might match the return type of a GCC
56544   builtin and then its argument prototype would still apply.  */
56545#ifdef __cplusplus
56546extern "C"
56547#endif
56548char remove ();
56549int
56550main ()
56551{
56552return remove ();
56553  ;
56554  return 0;
56555}
56556_ACEOF
56557if ac_fn_cxx_try_link "$LINENO"; then :
56558  ac_cv_lib_posix_remove=yes
56559else
56560  ac_cv_lib_posix_remove=no
56561fi
56562rm -f core conftest.err conftest.$ac_objext \
56563    conftest$ac_exeext conftest.$ac_ext
56564LIBS=$ac_check_lib_save_LIBS
56565fi
56566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
56567$as_echo "$ac_cv_lib_posix_remove" >&6; }
56568if test "x$ac_cv_lib_posix_remove" = xyes; then :
56569  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
56570fi
56571
56572    fi
56573
56574    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
56575    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
56576if test "x$ac_cv_func_shmat" = xyes; then :
56577
56578fi
56579
56580    if test $ac_cv_func_shmat = no; then
56581      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
56582$as_echo_n "checking for shmat in -lipc... " >&6; }
56583if ${ac_cv_lib_ipc_shmat+:} false; then :
56584  $as_echo_n "(cached) " >&6
56585else
56586  ac_check_lib_save_LIBS=$LIBS
56587LIBS="-lipc  $LIBS"
56588cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56589/* end confdefs.h.  */
56590
56591/* Override any GCC internal prototype to avoid an error.
56592   Use char because int might match the return type of a GCC
56593   builtin and then its argument prototype would still apply.  */
56594#ifdef __cplusplus
56595extern "C"
56596#endif
56597char shmat ();
56598int
56599main ()
56600{
56601return shmat ();
56602  ;
56603  return 0;
56604}
56605_ACEOF
56606if ac_fn_cxx_try_link "$LINENO"; then :
56607  ac_cv_lib_ipc_shmat=yes
56608else
56609  ac_cv_lib_ipc_shmat=no
56610fi
56611rm -f core conftest.err conftest.$ac_objext \
56612    conftest$ac_exeext conftest.$ac_ext
56613LIBS=$ac_check_lib_save_LIBS
56614fi
56615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
56616$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
56617if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
56618  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
56619fi
56620
56621    fi
56622  fi
56623
56624  # Check for libraries that X11R6 Xt/Xaw programs need.
56625  ac_save_LDFLAGS=$LDFLAGS
56626  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
56627  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
56628  # check for ICE first), but we must link in the order -lSM -lICE or
56629  # we get undefined symbols.  So assume we have SM if we have ICE.
56630  # These have to be linked with before -lX11, unlike the other
56631  # libraries we check for below, so use a different variable.
56632  # John Interrante, Karl Berry
56633  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
56634$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
56635if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
56636  $as_echo_n "(cached) " >&6
56637else
56638  ac_check_lib_save_LIBS=$LIBS
56639LIBS="-lICE $X_EXTRA_LIBS $LIBS"
56640cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56641/* end confdefs.h.  */
56642
56643/* Override any GCC internal prototype to avoid an error.
56644   Use char because int might match the return type of a GCC
56645   builtin and then its argument prototype would still apply.  */
56646#ifdef __cplusplus
56647extern "C"
56648#endif
56649char IceConnectionNumber ();
56650int
56651main ()
56652{
56653return IceConnectionNumber ();
56654  ;
56655  return 0;
56656}
56657_ACEOF
56658if ac_fn_cxx_try_link "$LINENO"; then :
56659  ac_cv_lib_ICE_IceConnectionNumber=yes
56660else
56661  ac_cv_lib_ICE_IceConnectionNumber=no
56662fi
56663rm -f core conftest.err conftest.$ac_objext \
56664    conftest$ac_exeext conftest.$ac_ext
56665LIBS=$ac_check_lib_save_LIBS
56666fi
56667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
56668$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
56669if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
56670  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
56671fi
56672
56673  LDFLAGS=$ac_save_LDFLAGS
56674
56675fi
56676
56677
56678    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
56679    # this doesn't make sense so we remove it.
56680    if test "x$COMPILE_TYPE" = xcross; then
56681      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
56682    fi
56683
56684    if test "x$no_x" = xyes; then
56685
56686  # Print a helpful message on how to acquire the necessary build dependency.
56687  # x11 is the help tag: freetype, cups, alsa etc
56688  MISSING_DEPENDENCY=x11
56689
56690  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56691    cygwin_help $MISSING_DEPENDENCY
56692  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56693    msys_help $MISSING_DEPENDENCY
56694  else
56695    PKGHANDLER_COMMAND=
56696
56697    case $PKGHANDLER in
56698      apt-get)
56699        apt_help     $MISSING_DEPENDENCY ;;
56700      yum)
56701        yum_help     $MISSING_DEPENDENCY ;;
56702      port)
56703        port_help    $MISSING_DEPENDENCY ;;
56704      pkgutil)
56705        pkgutil_help $MISSING_DEPENDENCY ;;
56706      pkgadd)
56707        pkgadd_help  $MISSING_DEPENDENCY ;;
56708    esac
56709
56710    if test "x$PKGHANDLER_COMMAND" != x; then
56711      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56712    fi
56713  fi
56714
56715      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
56716    fi
56717
56718    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
56719      OPENWIN_HOME="/usr/openwin"
56720      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
56721      X_LIBS="-L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
56722          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
56723    fi
56724
56725    ac_ext=c
56726ac_cpp='$CPP $CPPFLAGS'
56727ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56728ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56729ac_compiler_gnu=$ac_cv_c_compiler_gnu
56730
56731    OLD_CFLAGS="$CFLAGS"
56732    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
56733
56734    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
56735    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
56736do :
56737  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56738ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
56739          # include <X11/Xlib.h>
56740          # include <X11/Xutil.h>
56741
56742
56743"
56744if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56745  cat >>confdefs.h <<_ACEOF
56746#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56747_ACEOF
56748 X11_HEADERS_OK=yes
56749else
56750  X11_HEADERS_OK=no; break
56751fi
56752
56753done
56754
56755
56756    if test "x$X11_HEADERS_OK" = xno; then
56757
56758  # Print a helpful message on how to acquire the necessary build dependency.
56759  # x11 is the help tag: freetype, cups, alsa etc
56760  MISSING_DEPENDENCY=x11
56761
56762  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56763    cygwin_help $MISSING_DEPENDENCY
56764  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56765    msys_help $MISSING_DEPENDENCY
56766  else
56767    PKGHANDLER_COMMAND=
56768
56769    case $PKGHANDLER in
56770      apt-get)
56771        apt_help     $MISSING_DEPENDENCY ;;
56772      yum)
56773        yum_help     $MISSING_DEPENDENCY ;;
56774      port)
56775        port_help    $MISSING_DEPENDENCY ;;
56776      pkgutil)
56777        pkgutil_help $MISSING_DEPENDENCY ;;
56778      pkgadd)
56779        pkgadd_help  $MISSING_DEPENDENCY ;;
56780    esac
56781
56782    if test "x$PKGHANDLER_COMMAND" != x; then
56783      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56784    fi
56785  fi
56786
56787      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
56788    fi
56789
56790    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
56791    # defined in libawt_xawt.
56792    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
56793$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
56794    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56795/* end confdefs.h.  */
56796#include <X11/extensions/Xrender.h>
56797int
56798main ()
56799{
56800XLinearGradient x;
56801  ;
56802  return 0;
56803}
56804_ACEOF
56805if ac_fn_c_try_compile "$LINENO"; then :
56806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56807$as_echo "yes" >&6; }
56808else
56809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56810$as_echo "no" >&6; }
56811         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
56812fi
56813rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
56814
56815    CFLAGS="$OLD_CFLAGS"
56816    ac_ext=cpp
56817ac_cpp='$CXXCPP $CPPFLAGS'
56818ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56819ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56820ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
56821
56822  fi # NEEDS_LIB_X11
56823
56824
56825
56826
56827
56828
56829# Check whether --with-cups was given.
56830if test "${with_cups+set}" = set; then :
56831  withval=$with_cups;
56832fi
56833
56834
56835# Check whether --with-cups-include was given.
56836if test "${with_cups_include+set}" = set; then :
56837  withval=$with_cups_include;
56838fi
56839
56840
56841  if test "x$NEEDS_LIB_CUPS" = xfalse; then
56842    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
56843        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
56844      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
56845$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
56846    fi
56847    CUPS_CFLAGS=
56848  else
56849    CUPS_FOUND=no
56850
56851    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
56852      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
56853    fi
56854
56855    if test "x${with_cups}" != x; then
56856      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56857$as_echo_n "checking for cups headers... " >&6; }
56858      if test -s "${with_cups}/include/cups/cups.h"; then
56859        CUPS_CFLAGS="-I${with_cups}/include"
56860        CUPS_FOUND=yes
56861        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56862$as_echo "$CUPS_FOUND" >&6; }
56863      else
56864        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
56865      fi
56866    fi
56867    if test "x${with_cups_include}" != x; then
56868      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56869$as_echo_n "checking for cups headers... " >&6; }
56870      if test -s "${with_cups_include}/cups/cups.h"; then
56871        CUPS_CFLAGS="-I${with_cups_include}"
56872        CUPS_FOUND=yes
56873        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56874$as_echo "$CUPS_FOUND" >&6; }
56875      else
56876        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
56877      fi
56878    fi
56879    if test "x$CUPS_FOUND" = xno; then
56880      # Are the cups headers installed in the default /usr/include location?
56881      for ac_header in cups/cups.h cups/ppd.h
56882do :
56883  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56884ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
56885if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56886  cat >>confdefs.h <<_ACEOF
56887#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56888_ACEOF
56889
56890          CUPS_FOUND=yes
56891          CUPS_CFLAGS=
56892          DEFAULT_CUPS=yes
56893
56894fi
56895
56896done
56897
56898    fi
56899    if test "x$CUPS_FOUND" = xno; then
56900
56901  # Print a helpful message on how to acquire the necessary build dependency.
56902  # cups is the help tag: freetype, cups, alsa etc
56903  MISSING_DEPENDENCY=cups
56904
56905  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56906    cygwin_help $MISSING_DEPENDENCY
56907  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56908    msys_help $MISSING_DEPENDENCY
56909  else
56910    PKGHANDLER_COMMAND=
56911
56912    case $PKGHANDLER in
56913      apt-get)
56914        apt_help     $MISSING_DEPENDENCY ;;
56915      yum)
56916        yum_help     $MISSING_DEPENDENCY ;;
56917      port)
56918        port_help    $MISSING_DEPENDENCY ;;
56919      pkgutil)
56920        pkgutil_help $MISSING_DEPENDENCY ;;
56921      pkgadd)
56922        pkgadd_help  $MISSING_DEPENDENCY ;;
56923    esac
56924
56925    if test "x$PKGHANDLER_COMMAND" != x; then
56926      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56927    fi
56928  fi
56929
56930      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
56931    fi
56932  fi
56933
56934
56935
56936
56937
56938# Check whether --with-freetype was given.
56939if test "${with_freetype+set}" = set; then :
56940  withval=$with_freetype;
56941fi
56942
56943
56944# Check whether --with-freetype-include was given.
56945if test "${with_freetype_include+set}" = set; then :
56946  withval=$with_freetype_include;
56947fi
56948
56949
56950# Check whether --with-freetype-lib was given.
56951if test "${with_freetype_lib+set}" = set; then :
56952  withval=$with_freetype_lib;
56953fi
56954
56955
56956# Check whether --with-freetype-src was given.
56957if test "${with_freetype_src+set}" = set; then :
56958  withval=$with_freetype_src;
56959fi
56960
56961  # Check whether --enable-freetype-bundling was given.
56962if test "${enable_freetype_bundling+set}" = set; then :
56963  enableval=$enable_freetype_bundling;
56964fi
56965
56966
56967  # Need to specify explicitly since it needs to be overridden on some versions of macosx
56968  FREETYPE_BASE_NAME=freetype
56969  FREETYPE_CFLAGS=
56970  FREETYPE_LIBS=
56971  FREETYPE_BUNDLE_LIB_PATH=
56972
56973  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
56974    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
56975        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
56976        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
56977        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
56978      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
56979$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
56980    fi
56981    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
56982      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
56983$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
56984    fi
56985  else
56986    # freetype is needed to build; go get it!
56987
56988    BUNDLE_FREETYPE="$enable_freetype_bundling"
56989
56990    if  test "x$with_freetype_src" != x; then
56991      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56992        # Try to build freetype if --with-freetype-src was given on Windows
56993
56994  FREETYPE_SRC_PATH="$with_freetype_src"
56995  BUILD_FREETYPE=yes
56996
56997  # Check if the freetype sources are acessible..
56998  if ! test -d $FREETYPE_SRC_PATH; then
56999    { $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
57000$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
57001    BUILD_FREETYPE=no
57002  fi
57003  # ..and contain a vc2010 project file
57004  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
57005  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
57006    { $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
57007$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
57008    BUILD_FREETYPE=no
57009  fi
57010  # Now check if configure found a version of 'msbuild.exe'
57011  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
57012    { $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
57013$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;}
57014    BUILD_FREETYPE=no
57015  fi
57016
57017  # Ready to go..
57018  if test "x$BUILD_FREETYPE" = xyes; then
57019    # msbuild requires trailing slashes for output directories
57020    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
57021    freetype_lib_path_unix="$freetype_lib_path"
57022    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
57023
57024  unix_path="$vcxproj_path"
57025  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57026    windows_path=`$CYGPATH -m "$unix_path"`
57027    vcxproj_path="$windows_path"
57028  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57029    windows_path=`cmd //c echo $unix_path`
57030    vcxproj_path="$windows_path"
57031  fi
57032
57033
57034  unix_path="$freetype_lib_path"
57035  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57036    windows_path=`$CYGPATH -m "$unix_path"`
57037    freetype_lib_path="$windows_path"
57038  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57039    windows_path=`cmd //c echo $unix_path`
57040    freetype_lib_path="$windows_path"
57041  fi
57042
57043
57044  unix_path="$freetype_obj_path"
57045  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57046    windows_path=`$CYGPATH -m "$unix_path"`
57047    freetype_obj_path="$windows_path"
57048  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57049    windows_path=`cmd //c echo $unix_path`
57050    freetype_obj_path="$windows_path"
57051  fi
57052
57053    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
57054      freetype_platform=x64
57055    else
57056      freetype_platform=win32
57057    fi
57058
57059    # The original freetype project file is for VS 2010 (i.e. 'v100'),
57060    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
57061    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
57062    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
57063    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
57064$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
57065
57066    # First we try to build the freetype.dll
57067    $ECHO -e "@echo off\n"\
57068        "$MSBUILD $vcxproj_path "\
57069        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57070        "/p:Configuration=\"Release Multithreaded\" "\
57071        "/p:Platform=$freetype_platform "\
57072        "/p:ConfigurationType=DynamicLibrary "\
57073        "/p:TargetName=freetype "\
57074        "/p:OutDir=\"$freetype_lib_path\" "\
57075        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
57076    cmd /c freetype.bat
57077
57078    if test -s "$freetype_lib_path_unix/freetype.dll"; then
57079      # If that succeeds we also build freetype.lib
57080      $ECHO -e "@echo off\n"\
57081          "$MSBUILD $vcxproj_path "\
57082          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57083          "/p:Configuration=\"Release Multithreaded\" "\
57084          "/p:Platform=$freetype_platform "\
57085          "/p:ConfigurationType=StaticLibrary "\
57086          "/p:TargetName=freetype "\
57087          "/p:OutDir=\"$freetype_lib_path\" "\
57088          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
57089      cmd /c freetype.bat
57090
57091      if test -s "$freetype_lib_path_unix/freetype.lib"; then
57092        # Once we build both, lib and dll, set freetype lib and include path appropriately
57093        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
57094        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
57095        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
57096$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
57097      else
57098        BUILD_FREETYPE=no
57099      fi
57100    else
57101      BUILD_FREETYPE=no
57102    fi
57103  fi
57104
57105        if test "x$BUILD_FREETYPE" = xyes; then
57106          # Okay, we built it. Check that it works.
57107
57108  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57109  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57110  METHOD="--with-freetype-src"
57111
57112  # Let's start with an optimistic view of the world :-)
57113  FOUND_FREETYPE=yes
57114
57115  # First look for the canonical freetype main include file ft2build.h.
57116  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57117    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57118    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57119    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57120      # Fail.
57121      FOUND_FREETYPE=no
57122    fi
57123  fi
57124
57125  if test "x$FOUND_FREETYPE" = xyes; then
57126    # Include file found, let's continue the sanity check.
57127    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57128$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57129
57130    # Reset to default value
57131    FREETYPE_BASE_NAME=freetype
57132    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57133    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57134      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57135          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57136        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57137        # for the .6 version explicitly.
57138        FREETYPE_BASE_NAME=freetype.6
57139        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57140        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57141$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57142      else
57143        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57144$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57145        FOUND_FREETYPE=no
57146      fi
57147    else
57148      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57149        # On Windows, we will need both .lib and .dll file.
57150        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57151          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57152$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57153          FOUND_FREETYPE=no
57154        fi
57155      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57156          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57157        # Found lib in isa dir, use that instead.
57158        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57159        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57160$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57161      fi
57162    fi
57163  fi
57164
57165  if test "x$FOUND_FREETYPE" = xyes; then
57166
57167  # Only process if variable expands to non-empty
57168
57169  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57170    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57171
57172  # Input might be given as Windows format, start by converting to
57173  # unix format.
57174  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57175  new_path=`$CYGPATH -u "$path"`
57176
57177  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57178  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57179  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57180  # "foo.exe" is OK but "foo" is an error.
57181  #
57182  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57183  # It is also a way to make sure we got the proper file name for the real test later on.
57184  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57185  if test "x$test_shortpath" = x; then
57186    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57187$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57188    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57189  fi
57190
57191  # Call helper function which possibly converts this using DOS-style short mode.
57192  # If so, the updated path is stored in $new_path.
57193
57194  input_path="$new_path"
57195  # Check if we need to convert this using DOS-style short mode. If the path
57196  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57197  # take no chances and rewrite it.
57198  # Note: m4 eats our [], so we need to use [ and ] instead.
57199  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57200  if test "x$has_forbidden_chars" != x; then
57201    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57202    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57203    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57204    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57205      # Going to short mode and back again did indeed matter. Since short mode is
57206      # case insensitive, let's make it lowercase to improve readability.
57207      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57208      # Now convert it back to Unix-style (cygpath)
57209      input_path=`$CYGPATH -u "$shortmode_path"`
57210      new_path="$input_path"
57211    fi
57212  fi
57213
57214  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57215  if test "x$test_cygdrive_prefix" = x; then
57216    # As a simple fix, exclude /usr/bin since it's not a real path.
57217    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57218      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57219      # a path prefixed by /cygdrive for fixpath to work.
57220      new_path="$CYGWIN_ROOT_PATH$input_path"
57221    fi
57222  fi
57223
57224
57225  if test "x$path" != "x$new_path"; then
57226    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57227    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57228$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57229  fi
57230
57231    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57232
57233  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57234  has_colon=`$ECHO $path | $GREP ^.:`
57235  new_path="$path"
57236  if test "x$has_colon" = x; then
57237    # Not in mixed or Windows style, start by that.
57238    new_path=`cmd //c echo $path`
57239  fi
57240
57241
57242  input_path="$new_path"
57243  # Check if we need to convert this using DOS-style short mode. If the path
57244  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57245  # take no chances and rewrite it.
57246  # Note: m4 eats our [], so we need to use [ and ] instead.
57247  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57248  if test "x$has_forbidden_chars" != x; then
57249    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57250    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57251  fi
57252
57253
57254  windows_path="$new_path"
57255  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57256    unix_path=`$CYGPATH -u "$windows_path"`
57257    new_path="$unix_path"
57258  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57259    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57260    new_path="$unix_path"
57261  fi
57262
57263  if test "x$path" != "x$new_path"; then
57264    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57265    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57266$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57267  fi
57268
57269  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57270  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57271
57272    else
57273      # We're on a unix platform. Hooray! :)
57274      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57275      has_space=`$ECHO "$path" | $GREP " "`
57276      if test "x$has_space" != x; then
57277        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57278$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57279        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57280      fi
57281
57282      # Use eval to expand a potential ~
57283      eval path="$path"
57284      if test ! -f "$path" && test ! -d "$path"; then
57285        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57286      fi
57287
57288      if test -d "$path"; then
57289        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57290      else
57291        dir="`$DIRNAME "$path"`"
57292        base="`$BASENAME "$path"`"
57293        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57294      fi
57295    fi
57296  fi
57297
57298
57299  # Only process if variable expands to non-empty
57300
57301  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57302    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57303
57304  # Input might be given as Windows format, start by converting to
57305  # unix format.
57306  path="$POTENTIAL_FREETYPE_LIB_PATH"
57307  new_path=`$CYGPATH -u "$path"`
57308
57309  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57310  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57311  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57312  # "foo.exe" is OK but "foo" is an error.
57313  #
57314  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57315  # It is also a way to make sure we got the proper file name for the real test later on.
57316  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57317  if test "x$test_shortpath" = x; then
57318    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57319$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57320    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57321  fi
57322
57323  # Call helper function which possibly converts this using DOS-style short mode.
57324  # If so, the updated path is stored in $new_path.
57325
57326  input_path="$new_path"
57327  # Check if we need to convert this using DOS-style short mode. If the path
57328  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57329  # take no chances and rewrite it.
57330  # Note: m4 eats our [], so we need to use [ and ] instead.
57331  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57332  if test "x$has_forbidden_chars" != x; then
57333    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57334    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57335    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57336    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57337      # Going to short mode and back again did indeed matter. Since short mode is
57338      # case insensitive, let's make it lowercase to improve readability.
57339      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57340      # Now convert it back to Unix-style (cygpath)
57341      input_path=`$CYGPATH -u "$shortmode_path"`
57342      new_path="$input_path"
57343    fi
57344  fi
57345
57346  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57347  if test "x$test_cygdrive_prefix" = x; then
57348    # As a simple fix, exclude /usr/bin since it's not a real path.
57349    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57350      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57351      # a path prefixed by /cygdrive for fixpath to work.
57352      new_path="$CYGWIN_ROOT_PATH$input_path"
57353    fi
57354  fi
57355
57356
57357  if test "x$path" != "x$new_path"; then
57358    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57359    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57360$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57361  fi
57362
57363    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57364
57365  path="$POTENTIAL_FREETYPE_LIB_PATH"
57366  has_colon=`$ECHO $path | $GREP ^.:`
57367  new_path="$path"
57368  if test "x$has_colon" = x; then
57369    # Not in mixed or Windows style, start by that.
57370    new_path=`cmd //c echo $path`
57371  fi
57372
57373
57374  input_path="$new_path"
57375  # Check if we need to convert this using DOS-style short mode. If the path
57376  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57377  # take no chances and rewrite it.
57378  # Note: m4 eats our [], so we need to use [ and ] instead.
57379  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57380  if test "x$has_forbidden_chars" != x; then
57381    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57382    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57383  fi
57384
57385
57386  windows_path="$new_path"
57387  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57388    unix_path=`$CYGPATH -u "$windows_path"`
57389    new_path="$unix_path"
57390  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57391    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57392    new_path="$unix_path"
57393  fi
57394
57395  if test "x$path" != "x$new_path"; then
57396    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57397    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57398$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57399  fi
57400
57401  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57402  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57403
57404    else
57405      # We're on a unix platform. Hooray! :)
57406      path="$POTENTIAL_FREETYPE_LIB_PATH"
57407      has_space=`$ECHO "$path" | $GREP " "`
57408      if test "x$has_space" != x; then
57409        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57410$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57411        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57412      fi
57413
57414      # Use eval to expand a potential ~
57415      eval path="$path"
57416      if test ! -f "$path" && test ! -d "$path"; then
57417        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57418      fi
57419
57420      if test -d "$path"; then
57421        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57422      else
57423        dir="`$DIRNAME "$path"`"
57424        base="`$BASENAME "$path"`"
57425        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57426      fi
57427    fi
57428  fi
57429
57430
57431    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57432    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57433$as_echo_n "checking for freetype includes... " >&6; }
57434    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57435$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57436    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57437    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57438$as_echo_n "checking for freetype libraries... " >&6; }
57439    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57440$as_echo "$FREETYPE_LIB_PATH" >&6; }
57441  fi
57442
57443          if test "x$FOUND_FREETYPE" != xyes; then
57444            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
57445          fi
57446        else
57447          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
57448$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
57449          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
57450        fi
57451      else
57452        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
57453$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
57454      fi
57455    fi
57456
57457    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
57458      # User has specified settings
57459
57460      if test "x$BUNDLE_FREETYPE" = x; then
57461        # If not specified, default is to bundle freetype
57462        BUNDLE_FREETYPE=yes
57463      fi
57464
57465      if test "x$with_freetype" != x; then
57466        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
57467        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
57468      fi
57469
57470      # Allow --with-freetype-lib and --with-freetype-include to override
57471      if test "x$with_freetype_include" != x; then
57472        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
57473      fi
57474      if test "x$with_freetype_lib" != x; then
57475        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
57476      fi
57477
57478      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57479        # Okay, we got it. Check that it works.
57480
57481  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57482  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57483  METHOD="--with-freetype"
57484
57485  # Let's start with an optimistic view of the world :-)
57486  FOUND_FREETYPE=yes
57487
57488  # First look for the canonical freetype main include file ft2build.h.
57489  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57490    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57491    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57492    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57493      # Fail.
57494      FOUND_FREETYPE=no
57495    fi
57496  fi
57497
57498  if test "x$FOUND_FREETYPE" = xyes; then
57499    # Include file found, let's continue the sanity check.
57500    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57501$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57502
57503    # Reset to default value
57504    FREETYPE_BASE_NAME=freetype
57505    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57506    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57507      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57508          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57509        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57510        # for the .6 version explicitly.
57511        FREETYPE_BASE_NAME=freetype.6
57512        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57513        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57514$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57515      else
57516        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57517$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57518        FOUND_FREETYPE=no
57519      fi
57520    else
57521      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57522        # On Windows, we will need both .lib and .dll file.
57523        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57524          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57525$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57526          FOUND_FREETYPE=no
57527        fi
57528      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57529          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57530        # Found lib in isa dir, use that instead.
57531        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57532        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57533$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57534      fi
57535    fi
57536  fi
57537
57538  if test "x$FOUND_FREETYPE" = xyes; then
57539
57540  # Only process if variable expands to non-empty
57541
57542  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57543    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57544
57545  # Input might be given as Windows format, start by converting to
57546  # unix format.
57547  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57548  new_path=`$CYGPATH -u "$path"`
57549
57550  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57551  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57552  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57553  # "foo.exe" is OK but "foo" is an error.
57554  #
57555  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57556  # It is also a way to make sure we got the proper file name for the real test later on.
57557  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57558  if test "x$test_shortpath" = x; then
57559    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57560$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57561    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57562  fi
57563
57564  # Call helper function which possibly converts this using DOS-style short mode.
57565  # If so, the updated path is stored in $new_path.
57566
57567  input_path="$new_path"
57568  # Check if we need to convert this using DOS-style short mode. If the path
57569  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57570  # take no chances and rewrite it.
57571  # Note: m4 eats our [], so we need to use [ and ] instead.
57572  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57573  if test "x$has_forbidden_chars" != x; then
57574    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57575    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57576    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57577    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57578      # Going to short mode and back again did indeed matter. Since short mode is
57579      # case insensitive, let's make it lowercase to improve readability.
57580      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57581      # Now convert it back to Unix-style (cygpath)
57582      input_path=`$CYGPATH -u "$shortmode_path"`
57583      new_path="$input_path"
57584    fi
57585  fi
57586
57587  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57588  if test "x$test_cygdrive_prefix" = x; then
57589    # As a simple fix, exclude /usr/bin since it's not a real path.
57590    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57591      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57592      # a path prefixed by /cygdrive for fixpath to work.
57593      new_path="$CYGWIN_ROOT_PATH$input_path"
57594    fi
57595  fi
57596
57597
57598  if test "x$path" != "x$new_path"; then
57599    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57600    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57601$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57602  fi
57603
57604    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57605
57606  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57607  has_colon=`$ECHO $path | $GREP ^.:`
57608  new_path="$path"
57609  if test "x$has_colon" = x; then
57610    # Not in mixed or Windows style, start by that.
57611    new_path=`cmd //c echo $path`
57612  fi
57613
57614
57615  input_path="$new_path"
57616  # Check if we need to convert this using DOS-style short mode. If the path
57617  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57618  # take no chances and rewrite it.
57619  # Note: m4 eats our [], so we need to use [ and ] instead.
57620  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57621  if test "x$has_forbidden_chars" != x; then
57622    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57623    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57624  fi
57625
57626
57627  windows_path="$new_path"
57628  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57629    unix_path=`$CYGPATH -u "$windows_path"`
57630    new_path="$unix_path"
57631  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57632    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57633    new_path="$unix_path"
57634  fi
57635
57636  if test "x$path" != "x$new_path"; then
57637    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57638    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57639$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57640  fi
57641
57642  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57643  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57644
57645    else
57646      # We're on a unix platform. Hooray! :)
57647      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57648      has_space=`$ECHO "$path" | $GREP " "`
57649      if test "x$has_space" != x; then
57650        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57651$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57652        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57653      fi
57654
57655      # Use eval to expand a potential ~
57656      eval path="$path"
57657      if test ! -f "$path" && test ! -d "$path"; then
57658        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57659      fi
57660
57661      if test -d "$path"; then
57662        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57663      else
57664        dir="`$DIRNAME "$path"`"
57665        base="`$BASENAME "$path"`"
57666        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57667      fi
57668    fi
57669  fi
57670
57671
57672  # Only process if variable expands to non-empty
57673
57674  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57675    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57676
57677  # Input might be given as Windows format, start by converting to
57678  # unix format.
57679  path="$POTENTIAL_FREETYPE_LIB_PATH"
57680  new_path=`$CYGPATH -u "$path"`
57681
57682  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57683  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57684  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57685  # "foo.exe" is OK but "foo" is an error.
57686  #
57687  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57688  # It is also a way to make sure we got the proper file name for the real test later on.
57689  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57690  if test "x$test_shortpath" = x; then
57691    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57692$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57693    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57694  fi
57695
57696  # Call helper function which possibly converts this using DOS-style short mode.
57697  # If so, the updated path is stored in $new_path.
57698
57699  input_path="$new_path"
57700  # Check if we need to convert this using DOS-style short mode. If the path
57701  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57702  # take no chances and rewrite it.
57703  # Note: m4 eats our [], so we need to use [ and ] instead.
57704  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57705  if test "x$has_forbidden_chars" != x; then
57706    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57707    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57708    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57709    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57710      # Going to short mode and back again did indeed matter. Since short mode is
57711      # case insensitive, let's make it lowercase to improve readability.
57712      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57713      # Now convert it back to Unix-style (cygpath)
57714      input_path=`$CYGPATH -u "$shortmode_path"`
57715      new_path="$input_path"
57716    fi
57717  fi
57718
57719  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57720  if test "x$test_cygdrive_prefix" = x; then
57721    # As a simple fix, exclude /usr/bin since it's not a real path.
57722    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57723      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57724      # a path prefixed by /cygdrive for fixpath to work.
57725      new_path="$CYGWIN_ROOT_PATH$input_path"
57726    fi
57727  fi
57728
57729
57730  if test "x$path" != "x$new_path"; then
57731    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57732    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57733$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57734  fi
57735
57736    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57737
57738  path="$POTENTIAL_FREETYPE_LIB_PATH"
57739  has_colon=`$ECHO $path | $GREP ^.:`
57740  new_path="$path"
57741  if test "x$has_colon" = x; then
57742    # Not in mixed or Windows style, start by that.
57743    new_path=`cmd //c echo $path`
57744  fi
57745
57746
57747  input_path="$new_path"
57748  # Check if we need to convert this using DOS-style short mode. If the path
57749  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57750  # take no chances and rewrite it.
57751  # Note: m4 eats our [], so we need to use [ and ] instead.
57752  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57753  if test "x$has_forbidden_chars" != x; then
57754    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57755    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57756  fi
57757
57758
57759  windows_path="$new_path"
57760  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57761    unix_path=`$CYGPATH -u "$windows_path"`
57762    new_path="$unix_path"
57763  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57764    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57765    new_path="$unix_path"
57766  fi
57767
57768  if test "x$path" != "x$new_path"; then
57769    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57770    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57771$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57772  fi
57773
57774  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57775  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57776
57777    else
57778      # We're on a unix platform. Hooray! :)
57779      path="$POTENTIAL_FREETYPE_LIB_PATH"
57780      has_space=`$ECHO "$path" | $GREP " "`
57781      if test "x$has_space" != x; then
57782        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57783$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57784        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57785      fi
57786
57787      # Use eval to expand a potential ~
57788      eval path="$path"
57789      if test ! -f "$path" && test ! -d "$path"; then
57790        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57791      fi
57792
57793      if test -d "$path"; then
57794        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57795      else
57796        dir="`$DIRNAME "$path"`"
57797        base="`$BASENAME "$path"`"
57798        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57799      fi
57800    fi
57801  fi
57802
57803
57804    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57805    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57806$as_echo_n "checking for freetype includes... " >&6; }
57807    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57808$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57809    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57810    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57811$as_echo_n "checking for freetype libraries... " >&6; }
57812    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57813$as_echo "$FREETYPE_LIB_PATH" >&6; }
57814  fi
57815
57816        if test "x$FOUND_FREETYPE" != xyes; then
57817          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
57818        fi
57819      else
57820        # User specified only one of lib or include. This is an error.
57821        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
57822          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
57823$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
57824          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57825        else
57826          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
57827$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
57828          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57829        fi
57830      fi
57831    else
57832      # User did not specify settings, but we need freetype. Try to locate it.
57833
57834      if test "x$BUNDLE_FREETYPE" = x; then
57835        # If not specified, default is to bundle freetype only on windows
57836        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57837          BUNDLE_FREETYPE=yes
57838        else
57839          BUNDLE_FREETYPE=no
57840        fi
57841      fi
57842
57843      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
57844      if test "x$SYSROOT" = x; then
57845        if test "x$FOUND_FREETYPE" != xyes; then
57846          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
57847          if test "x$PKG_CONFIG" != x; then
57848
57849pkg_failed=no
57850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
57851$as_echo_n "checking for FREETYPE... " >&6; }
57852
57853if test -n "$FREETYPE_CFLAGS"; then
57854    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
57855 elif test -n "$PKG_CONFIG"; then
57856    if test -n "$PKG_CONFIG" && \
57857    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57858  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57859  ac_status=$?
57860  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57861  test $ac_status = 0; }; then
57862  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
57863else
57864  pkg_failed=yes
57865fi
57866 else
57867    pkg_failed=untried
57868fi
57869if test -n "$FREETYPE_LIBS"; then
57870    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
57871 elif test -n "$PKG_CONFIG"; then
57872    if test -n "$PKG_CONFIG" && \
57873    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57874  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57875  ac_status=$?
57876  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57877  test $ac_status = 0; }; then
57878  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
57879else
57880  pkg_failed=yes
57881fi
57882 else
57883    pkg_failed=untried
57884fi
57885
57886
57887
57888if test $pkg_failed = yes; then
57889
57890if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
57891        _pkg_short_errors_supported=yes
57892else
57893        _pkg_short_errors_supported=no
57894fi
57895        if test $_pkg_short_errors_supported = yes; then
57896	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
57897        else
57898	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
57899        fi
57900	# Put the nasty error message in config.log where it belongs
57901	echo "$FREETYPE_PKG_ERRORS" >&5
57902
57903	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57904$as_echo "no" >&6; }
57905                FOUND_FREETYPE=no
57906elif test $pkg_failed = untried; then
57907	FOUND_FREETYPE=no
57908else
57909	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
57910	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
57911        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57912$as_echo "yes" >&6; }
57913	FOUND_FREETYPE=yes
57914fi
57915            if test "x$FOUND_FREETYPE" = xyes; then
57916              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
57917              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
57918              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
57919              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
57920                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
57921              fi
57922              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
57923              if test "x$BUNDLE_FREETYPE" = xyes; then
57924                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
57925$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
57926                FOUND_FREETYPE=no
57927              else
57928                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
57929$as_echo_n "checking for freetype... " >&6; }
57930                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
57931$as_echo "yes (using pkg-config)" >&6; }
57932              fi
57933            fi
57934          fi
57935        fi
57936      fi
57937
57938      if test "x$FOUND_FREETYPE" != xyes; then
57939        # Check in well-known locations
57940        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57941          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
57942
57943  windows_path="$FREETYPE_BASE_DIR"
57944  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57945    unix_path=`$CYGPATH -u "$windows_path"`
57946    FREETYPE_BASE_DIR="$unix_path"
57947  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57948    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57949    FREETYPE_BASE_DIR="$unix_path"
57950  fi
57951
57952
57953  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
57954  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
57955  METHOD="well-known location"
57956
57957  # Let's start with an optimistic view of the world :-)
57958  FOUND_FREETYPE=yes
57959
57960  # First look for the canonical freetype main include file ft2build.h.
57961  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57962    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57963    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57964    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57965      # Fail.
57966      FOUND_FREETYPE=no
57967    fi
57968  fi
57969
57970  if test "x$FOUND_FREETYPE" = xyes; then
57971    # Include file found, let's continue the sanity check.
57972    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57973$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57974
57975    # Reset to default value
57976    FREETYPE_BASE_NAME=freetype
57977    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57978    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57979      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57980          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57981        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57982        # for the .6 version explicitly.
57983        FREETYPE_BASE_NAME=freetype.6
57984        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57985        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57986$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57987      else
57988        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57989$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57990        FOUND_FREETYPE=no
57991      fi
57992    else
57993      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57994        # On Windows, we will need both .lib and .dll file.
57995        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57996          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57997$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57998          FOUND_FREETYPE=no
57999        fi
58000      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58001          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58002        # Found lib in isa dir, use that instead.
58003        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58004        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58005$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58006      fi
58007    fi
58008  fi
58009
58010  if test "x$FOUND_FREETYPE" = xyes; then
58011
58012  # Only process if variable expands to non-empty
58013
58014  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58015    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58016
58017  # Input might be given as Windows format, start by converting to
58018  # unix format.
58019  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58020  new_path=`$CYGPATH -u "$path"`
58021
58022  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58023  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58024  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58025  # "foo.exe" is OK but "foo" is an error.
58026  #
58027  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58028  # It is also a way to make sure we got the proper file name for the real test later on.
58029  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58030  if test "x$test_shortpath" = x; then
58031    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58032$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58033    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58034  fi
58035
58036  # Call helper function which possibly converts this using DOS-style short mode.
58037  # If so, the updated path is stored in $new_path.
58038
58039  input_path="$new_path"
58040  # Check if we need to convert this using DOS-style short mode. If the path
58041  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58042  # take no chances and rewrite it.
58043  # Note: m4 eats our [], so we need to use [ and ] instead.
58044  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58045  if test "x$has_forbidden_chars" != x; then
58046    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58047    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58048    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58049    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58050      # Going to short mode and back again did indeed matter. Since short mode is
58051      # case insensitive, let's make it lowercase to improve readability.
58052      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58053      # Now convert it back to Unix-style (cygpath)
58054      input_path=`$CYGPATH -u "$shortmode_path"`
58055      new_path="$input_path"
58056    fi
58057  fi
58058
58059  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58060  if test "x$test_cygdrive_prefix" = x; then
58061    # As a simple fix, exclude /usr/bin since it's not a real path.
58062    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58063      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58064      # a path prefixed by /cygdrive for fixpath to work.
58065      new_path="$CYGWIN_ROOT_PATH$input_path"
58066    fi
58067  fi
58068
58069
58070  if test "x$path" != "x$new_path"; then
58071    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58072    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58073$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58074  fi
58075
58076    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58077
58078  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58079  has_colon=`$ECHO $path | $GREP ^.:`
58080  new_path="$path"
58081  if test "x$has_colon" = x; then
58082    # Not in mixed or Windows style, start by that.
58083    new_path=`cmd //c echo $path`
58084  fi
58085
58086
58087  input_path="$new_path"
58088  # Check if we need to convert this using DOS-style short mode. If the path
58089  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58090  # take no chances and rewrite it.
58091  # Note: m4 eats our [], so we need to use [ and ] instead.
58092  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58093  if test "x$has_forbidden_chars" != x; then
58094    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58095    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58096  fi
58097
58098
58099  windows_path="$new_path"
58100  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58101    unix_path=`$CYGPATH -u "$windows_path"`
58102    new_path="$unix_path"
58103  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58104    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58105    new_path="$unix_path"
58106  fi
58107
58108  if test "x$path" != "x$new_path"; then
58109    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58110    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58111$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58112  fi
58113
58114  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58115  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58116
58117    else
58118      # We're on a unix platform. Hooray! :)
58119      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58120      has_space=`$ECHO "$path" | $GREP " "`
58121      if test "x$has_space" != x; then
58122        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58123$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58124        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58125      fi
58126
58127      # Use eval to expand a potential ~
58128      eval path="$path"
58129      if test ! -f "$path" && test ! -d "$path"; then
58130        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58131      fi
58132
58133      if test -d "$path"; then
58134        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58135      else
58136        dir="`$DIRNAME "$path"`"
58137        base="`$BASENAME "$path"`"
58138        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58139      fi
58140    fi
58141  fi
58142
58143
58144  # Only process if variable expands to non-empty
58145
58146  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58147    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58148
58149  # Input might be given as Windows format, start by converting to
58150  # unix format.
58151  path="$POTENTIAL_FREETYPE_LIB_PATH"
58152  new_path=`$CYGPATH -u "$path"`
58153
58154  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58155  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58156  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58157  # "foo.exe" is OK but "foo" is an error.
58158  #
58159  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58160  # It is also a way to make sure we got the proper file name for the real test later on.
58161  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58162  if test "x$test_shortpath" = x; then
58163    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58164$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58165    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58166  fi
58167
58168  # Call helper function which possibly converts this using DOS-style short mode.
58169  # If so, the updated path is stored in $new_path.
58170
58171  input_path="$new_path"
58172  # Check if we need to convert this using DOS-style short mode. If the path
58173  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58174  # take no chances and rewrite it.
58175  # Note: m4 eats our [], so we need to use [ and ] instead.
58176  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58177  if test "x$has_forbidden_chars" != x; then
58178    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58179    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58180    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58181    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58182      # Going to short mode and back again did indeed matter. Since short mode is
58183      # case insensitive, let's make it lowercase to improve readability.
58184      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58185      # Now convert it back to Unix-style (cygpath)
58186      input_path=`$CYGPATH -u "$shortmode_path"`
58187      new_path="$input_path"
58188    fi
58189  fi
58190
58191  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58192  if test "x$test_cygdrive_prefix" = x; then
58193    # As a simple fix, exclude /usr/bin since it's not a real path.
58194    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58195      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58196      # a path prefixed by /cygdrive for fixpath to work.
58197      new_path="$CYGWIN_ROOT_PATH$input_path"
58198    fi
58199  fi
58200
58201
58202  if test "x$path" != "x$new_path"; then
58203    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58204    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58205$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58206  fi
58207
58208    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58209
58210  path="$POTENTIAL_FREETYPE_LIB_PATH"
58211  has_colon=`$ECHO $path | $GREP ^.:`
58212  new_path="$path"
58213  if test "x$has_colon" = x; then
58214    # Not in mixed or Windows style, start by that.
58215    new_path=`cmd //c echo $path`
58216  fi
58217
58218
58219  input_path="$new_path"
58220  # Check if we need to convert this using DOS-style short mode. If the path
58221  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58222  # take no chances and rewrite it.
58223  # Note: m4 eats our [], so we need to use [ and ] instead.
58224  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58225  if test "x$has_forbidden_chars" != x; then
58226    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58227    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58228  fi
58229
58230
58231  windows_path="$new_path"
58232  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58233    unix_path=`$CYGPATH -u "$windows_path"`
58234    new_path="$unix_path"
58235  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58236    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58237    new_path="$unix_path"
58238  fi
58239
58240  if test "x$path" != "x$new_path"; then
58241    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58242    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58243$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58244  fi
58245
58246  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58247  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58248
58249    else
58250      # We're on a unix platform. Hooray! :)
58251      path="$POTENTIAL_FREETYPE_LIB_PATH"
58252      has_space=`$ECHO "$path" | $GREP " "`
58253      if test "x$has_space" != x; then
58254        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58255$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58256        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58257      fi
58258
58259      # Use eval to expand a potential ~
58260      eval path="$path"
58261      if test ! -f "$path" && test ! -d "$path"; then
58262        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58263      fi
58264
58265      if test -d "$path"; then
58266        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58267      else
58268        dir="`$DIRNAME "$path"`"
58269        base="`$BASENAME "$path"`"
58270        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58271      fi
58272    fi
58273  fi
58274
58275
58276    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58277    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58278$as_echo_n "checking for freetype includes... " >&6; }
58279    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58280$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58281    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58282    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58283$as_echo_n "checking for freetype libraries... " >&6; }
58284    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58285$as_echo "$FREETYPE_LIB_PATH" >&6; }
58286  fi
58287
58288          if test "x$FOUND_FREETYPE" != xyes; then
58289            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
58290
58291  windows_path="$FREETYPE_BASE_DIR"
58292  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58293    unix_path=`$CYGPATH -u "$windows_path"`
58294    FREETYPE_BASE_DIR="$unix_path"
58295  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58296    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58297    FREETYPE_BASE_DIR="$unix_path"
58298  fi
58299
58300
58301  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58302  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58303  METHOD="well-known location"
58304
58305  # Let's start with an optimistic view of the world :-)
58306  FOUND_FREETYPE=yes
58307
58308  # First look for the canonical freetype main include file ft2build.h.
58309  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58310    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58311    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58312    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58313      # Fail.
58314      FOUND_FREETYPE=no
58315    fi
58316  fi
58317
58318  if test "x$FOUND_FREETYPE" = xyes; then
58319    # Include file found, let's continue the sanity check.
58320    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58321$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58322
58323    # Reset to default value
58324    FREETYPE_BASE_NAME=freetype
58325    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58326    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58327      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58328          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58329        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58330        # for the .6 version explicitly.
58331        FREETYPE_BASE_NAME=freetype.6
58332        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58333        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58334$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58335      else
58336        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58337$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58338        FOUND_FREETYPE=no
58339      fi
58340    else
58341      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58342        # On Windows, we will need both .lib and .dll file.
58343        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58344          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58345$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58346          FOUND_FREETYPE=no
58347        fi
58348      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58349          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58350        # Found lib in isa dir, use that instead.
58351        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58352        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58353$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58354      fi
58355    fi
58356  fi
58357
58358  if test "x$FOUND_FREETYPE" = xyes; then
58359
58360  # Only process if variable expands to non-empty
58361
58362  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58363    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58364
58365  # Input might be given as Windows format, start by converting to
58366  # unix format.
58367  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58368  new_path=`$CYGPATH -u "$path"`
58369
58370  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58371  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58372  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58373  # "foo.exe" is OK but "foo" is an error.
58374  #
58375  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58376  # It is also a way to make sure we got the proper file name for the real test later on.
58377  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58378  if test "x$test_shortpath" = x; then
58379    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58380$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58381    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58382  fi
58383
58384  # Call helper function which possibly converts this using DOS-style short mode.
58385  # If so, the updated path is stored in $new_path.
58386
58387  input_path="$new_path"
58388  # Check if we need to convert this using DOS-style short mode. If the path
58389  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58390  # take no chances and rewrite it.
58391  # Note: m4 eats our [], so we need to use [ and ] instead.
58392  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58393  if test "x$has_forbidden_chars" != x; then
58394    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58395    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58396    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58397    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58398      # Going to short mode and back again did indeed matter. Since short mode is
58399      # case insensitive, let's make it lowercase to improve readability.
58400      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58401      # Now convert it back to Unix-style (cygpath)
58402      input_path=`$CYGPATH -u "$shortmode_path"`
58403      new_path="$input_path"
58404    fi
58405  fi
58406
58407  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58408  if test "x$test_cygdrive_prefix" = x; then
58409    # As a simple fix, exclude /usr/bin since it's not a real path.
58410    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58411      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58412      # a path prefixed by /cygdrive for fixpath to work.
58413      new_path="$CYGWIN_ROOT_PATH$input_path"
58414    fi
58415  fi
58416
58417
58418  if test "x$path" != "x$new_path"; then
58419    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58420    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58421$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58422  fi
58423
58424    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58425
58426  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58427  has_colon=`$ECHO $path | $GREP ^.:`
58428  new_path="$path"
58429  if test "x$has_colon" = x; then
58430    # Not in mixed or Windows style, start by that.
58431    new_path=`cmd //c echo $path`
58432  fi
58433
58434
58435  input_path="$new_path"
58436  # Check if we need to convert this using DOS-style short mode. If the path
58437  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58438  # take no chances and rewrite it.
58439  # Note: m4 eats our [], so we need to use [ and ] instead.
58440  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58441  if test "x$has_forbidden_chars" != x; then
58442    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58443    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58444  fi
58445
58446
58447  windows_path="$new_path"
58448  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58449    unix_path=`$CYGPATH -u "$windows_path"`
58450    new_path="$unix_path"
58451  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58452    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58453    new_path="$unix_path"
58454  fi
58455
58456  if test "x$path" != "x$new_path"; then
58457    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58458    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58459$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58460  fi
58461
58462  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58463  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58464
58465    else
58466      # We're on a unix platform. Hooray! :)
58467      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58468      has_space=`$ECHO "$path" | $GREP " "`
58469      if test "x$has_space" != x; then
58470        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58471$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58472        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58473      fi
58474
58475      # Use eval to expand a potential ~
58476      eval path="$path"
58477      if test ! -f "$path" && test ! -d "$path"; then
58478        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58479      fi
58480
58481      if test -d "$path"; then
58482        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58483      else
58484        dir="`$DIRNAME "$path"`"
58485        base="`$BASENAME "$path"`"
58486        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58487      fi
58488    fi
58489  fi
58490
58491
58492  # Only process if variable expands to non-empty
58493
58494  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58495    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58496
58497  # Input might be given as Windows format, start by converting to
58498  # unix format.
58499  path="$POTENTIAL_FREETYPE_LIB_PATH"
58500  new_path=`$CYGPATH -u "$path"`
58501
58502  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58503  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58504  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58505  # "foo.exe" is OK but "foo" is an error.
58506  #
58507  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58508  # It is also a way to make sure we got the proper file name for the real test later on.
58509  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58510  if test "x$test_shortpath" = x; then
58511    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58512$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58513    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58514  fi
58515
58516  # Call helper function which possibly converts this using DOS-style short mode.
58517  # If so, the updated path is stored in $new_path.
58518
58519  input_path="$new_path"
58520  # Check if we need to convert this using DOS-style short mode. If the path
58521  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58522  # take no chances and rewrite it.
58523  # Note: m4 eats our [], so we need to use [ and ] instead.
58524  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58525  if test "x$has_forbidden_chars" != x; then
58526    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58527    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58528    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58529    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58530      # Going to short mode and back again did indeed matter. Since short mode is
58531      # case insensitive, let's make it lowercase to improve readability.
58532      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58533      # Now convert it back to Unix-style (cygpath)
58534      input_path=`$CYGPATH -u "$shortmode_path"`
58535      new_path="$input_path"
58536    fi
58537  fi
58538
58539  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58540  if test "x$test_cygdrive_prefix" = x; then
58541    # As a simple fix, exclude /usr/bin since it's not a real path.
58542    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58543      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58544      # a path prefixed by /cygdrive for fixpath to work.
58545      new_path="$CYGWIN_ROOT_PATH$input_path"
58546    fi
58547  fi
58548
58549
58550  if test "x$path" != "x$new_path"; then
58551    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58552    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58553$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58554  fi
58555
58556    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58557
58558  path="$POTENTIAL_FREETYPE_LIB_PATH"
58559  has_colon=`$ECHO $path | $GREP ^.:`
58560  new_path="$path"
58561  if test "x$has_colon" = x; then
58562    # Not in mixed or Windows style, start by that.
58563    new_path=`cmd //c echo $path`
58564  fi
58565
58566
58567  input_path="$new_path"
58568  # Check if we need to convert this using DOS-style short mode. If the path
58569  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58570  # take no chances and rewrite it.
58571  # Note: m4 eats our [], so we need to use [ and ] instead.
58572  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58573  if test "x$has_forbidden_chars" != x; then
58574    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58575    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58576  fi
58577
58578
58579  windows_path="$new_path"
58580  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58581    unix_path=`$CYGPATH -u "$windows_path"`
58582    new_path="$unix_path"
58583  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58584    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58585    new_path="$unix_path"
58586  fi
58587
58588  if test "x$path" != "x$new_path"; then
58589    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58590    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58591$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58592  fi
58593
58594  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58595  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58596
58597    else
58598      # We're on a unix platform. Hooray! :)
58599      path="$POTENTIAL_FREETYPE_LIB_PATH"
58600      has_space=`$ECHO "$path" | $GREP " "`
58601      if test "x$has_space" != x; then
58602        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58603$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58604        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58605      fi
58606
58607      # Use eval to expand a potential ~
58608      eval path="$path"
58609      if test ! -f "$path" && test ! -d "$path"; then
58610        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58611      fi
58612
58613      if test -d "$path"; then
58614        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58615      else
58616        dir="`$DIRNAME "$path"`"
58617        base="`$BASENAME "$path"`"
58618        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58619      fi
58620    fi
58621  fi
58622
58623
58624    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58625    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58626$as_echo_n "checking for freetype includes... " >&6; }
58627    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58628$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58629    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58630    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58631$as_echo_n "checking for freetype libraries... " >&6; }
58632    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58633$as_echo "$FREETYPE_LIB_PATH" >&6; }
58634  fi
58635
58636          fi
58637          if test "x$FOUND_FREETYPE" != xyes; then
58638            FREETYPE_BASE_DIR="$HOME/freetype"
58639
58640  windows_path="$FREETYPE_BASE_DIR"
58641  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58642    unix_path=`$CYGPATH -u "$windows_path"`
58643    FREETYPE_BASE_DIR="$unix_path"
58644  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58645    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58646    FREETYPE_BASE_DIR="$unix_path"
58647  fi
58648
58649            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
58650
58651  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58652  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
58653  METHOD="well-known location"
58654
58655  # Let's start with an optimistic view of the world :-)
58656  FOUND_FREETYPE=yes
58657
58658  # First look for the canonical freetype main include file ft2build.h.
58659  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58660    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58661    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58662    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58663      # Fail.
58664      FOUND_FREETYPE=no
58665    fi
58666  fi
58667
58668  if test "x$FOUND_FREETYPE" = xyes; then
58669    # Include file found, let's continue the sanity check.
58670    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58671$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58672
58673    # Reset to default value
58674    FREETYPE_BASE_NAME=freetype
58675    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58676    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58677      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58678          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58679        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58680        # for the .6 version explicitly.
58681        FREETYPE_BASE_NAME=freetype.6
58682        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58683        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58684$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58685      else
58686        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58687$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58688        FOUND_FREETYPE=no
58689      fi
58690    else
58691      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58692        # On Windows, we will need both .lib and .dll file.
58693        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58694          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58695$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58696          FOUND_FREETYPE=no
58697        fi
58698      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58699          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58700        # Found lib in isa dir, use that instead.
58701        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58702        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58703$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58704      fi
58705    fi
58706  fi
58707
58708  if test "x$FOUND_FREETYPE" = xyes; then
58709
58710  # Only process if variable expands to non-empty
58711
58712  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58713    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58714
58715  # Input might be given as Windows format, start by converting to
58716  # unix format.
58717  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58718  new_path=`$CYGPATH -u "$path"`
58719
58720  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58721  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58722  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58723  # "foo.exe" is OK but "foo" is an error.
58724  #
58725  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58726  # It is also a way to make sure we got the proper file name for the real test later on.
58727  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58728  if test "x$test_shortpath" = x; then
58729    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58730$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58731    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58732  fi
58733
58734  # Call helper function which possibly converts this using DOS-style short mode.
58735  # If so, the updated path is stored in $new_path.
58736
58737  input_path="$new_path"
58738  # Check if we need to convert this using DOS-style short mode. If the path
58739  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58740  # take no chances and rewrite it.
58741  # Note: m4 eats our [], so we need to use [ and ] instead.
58742  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58743  if test "x$has_forbidden_chars" != x; then
58744    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58745    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58746    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58747    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58748      # Going to short mode and back again did indeed matter. Since short mode is
58749      # case insensitive, let's make it lowercase to improve readability.
58750      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58751      # Now convert it back to Unix-style (cygpath)
58752      input_path=`$CYGPATH -u "$shortmode_path"`
58753      new_path="$input_path"
58754    fi
58755  fi
58756
58757  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58758  if test "x$test_cygdrive_prefix" = x; then
58759    # As a simple fix, exclude /usr/bin since it's not a real path.
58760    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58761      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58762      # a path prefixed by /cygdrive for fixpath to work.
58763      new_path="$CYGWIN_ROOT_PATH$input_path"
58764    fi
58765  fi
58766
58767
58768  if test "x$path" != "x$new_path"; then
58769    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58770    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58771$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58772  fi
58773
58774    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58775
58776  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58777  has_colon=`$ECHO $path | $GREP ^.:`
58778  new_path="$path"
58779  if test "x$has_colon" = x; then
58780    # Not in mixed or Windows style, start by that.
58781    new_path=`cmd //c echo $path`
58782  fi
58783
58784
58785  input_path="$new_path"
58786  # Check if we need to convert this using DOS-style short mode. If the path
58787  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58788  # take no chances and rewrite it.
58789  # Note: m4 eats our [], so we need to use [ and ] instead.
58790  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58791  if test "x$has_forbidden_chars" != x; then
58792    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58793    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58794  fi
58795
58796
58797  windows_path="$new_path"
58798  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58799    unix_path=`$CYGPATH -u "$windows_path"`
58800    new_path="$unix_path"
58801  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58802    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58803    new_path="$unix_path"
58804  fi
58805
58806  if test "x$path" != "x$new_path"; then
58807    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58808    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58809$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58810  fi
58811
58812  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58813  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58814
58815    else
58816      # We're on a unix platform. Hooray! :)
58817      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58818      has_space=`$ECHO "$path" | $GREP " "`
58819      if test "x$has_space" != x; then
58820        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58821$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58822        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58823      fi
58824
58825      # Use eval to expand a potential ~
58826      eval path="$path"
58827      if test ! -f "$path" && test ! -d "$path"; then
58828        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58829      fi
58830
58831      if test -d "$path"; then
58832        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58833      else
58834        dir="`$DIRNAME "$path"`"
58835        base="`$BASENAME "$path"`"
58836        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58837      fi
58838    fi
58839  fi
58840
58841
58842  # Only process if variable expands to non-empty
58843
58844  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58845    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58846
58847  # Input might be given as Windows format, start by converting to
58848  # unix format.
58849  path="$POTENTIAL_FREETYPE_LIB_PATH"
58850  new_path=`$CYGPATH -u "$path"`
58851
58852  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58853  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58854  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58855  # "foo.exe" is OK but "foo" is an error.
58856  #
58857  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58858  # It is also a way to make sure we got the proper file name for the real test later on.
58859  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58860  if test "x$test_shortpath" = x; then
58861    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58862$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58863    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58864  fi
58865
58866  # Call helper function which possibly converts this using DOS-style short mode.
58867  # If so, the updated path is stored in $new_path.
58868
58869  input_path="$new_path"
58870  # Check if we need to convert this using DOS-style short mode. If the path
58871  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58872  # take no chances and rewrite it.
58873  # Note: m4 eats our [], so we need to use [ and ] instead.
58874  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58875  if test "x$has_forbidden_chars" != x; then
58876    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58877    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58878    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58879    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58880      # Going to short mode and back again did indeed matter. Since short mode is
58881      # case insensitive, let's make it lowercase to improve readability.
58882      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58883      # Now convert it back to Unix-style (cygpath)
58884      input_path=`$CYGPATH -u "$shortmode_path"`
58885      new_path="$input_path"
58886    fi
58887  fi
58888
58889  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58890  if test "x$test_cygdrive_prefix" = x; then
58891    # As a simple fix, exclude /usr/bin since it's not a real path.
58892    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58893      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58894      # a path prefixed by /cygdrive for fixpath to work.
58895      new_path="$CYGWIN_ROOT_PATH$input_path"
58896    fi
58897  fi
58898
58899
58900  if test "x$path" != "x$new_path"; then
58901    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58902    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58903$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58904  fi
58905
58906    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58907
58908  path="$POTENTIAL_FREETYPE_LIB_PATH"
58909  has_colon=`$ECHO $path | $GREP ^.:`
58910  new_path="$path"
58911  if test "x$has_colon" = x; then
58912    # Not in mixed or Windows style, start by that.
58913    new_path=`cmd //c echo $path`
58914  fi
58915
58916
58917  input_path="$new_path"
58918  # Check if we need to convert this using DOS-style short mode. If the path
58919  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58920  # take no chances and rewrite it.
58921  # Note: m4 eats our [], so we need to use [ and ] instead.
58922  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58923  if test "x$has_forbidden_chars" != x; then
58924    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58925    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58926  fi
58927
58928
58929  windows_path="$new_path"
58930  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58931    unix_path=`$CYGPATH -u "$windows_path"`
58932    new_path="$unix_path"
58933  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58934    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58935    new_path="$unix_path"
58936  fi
58937
58938  if test "x$path" != "x$new_path"; then
58939    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58940    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58941$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58942  fi
58943
58944  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58945  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58946
58947    else
58948      # We're on a unix platform. Hooray! :)
58949      path="$POTENTIAL_FREETYPE_LIB_PATH"
58950      has_space=`$ECHO "$path" | $GREP " "`
58951      if test "x$has_space" != x; then
58952        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58953$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58954        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58955      fi
58956
58957      # Use eval to expand a potential ~
58958      eval path="$path"
58959      if test ! -f "$path" && test ! -d "$path"; then
58960        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58961      fi
58962
58963      if test -d "$path"; then
58964        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58965      else
58966        dir="`$DIRNAME "$path"`"
58967        base="`$BASENAME "$path"`"
58968        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58969      fi
58970    fi
58971  fi
58972
58973
58974    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58975    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58976$as_echo_n "checking for freetype includes... " >&6; }
58977    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58978$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58979    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58980    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58981$as_echo_n "checking for freetype libraries... " >&6; }
58982    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58983$as_echo "$FREETYPE_LIB_PATH" >&6; }
58984  fi
58985
58986            else
58987
58988  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58989  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
58990  METHOD="well-known location"
58991
58992  # Let's start with an optimistic view of the world :-)
58993  FOUND_FREETYPE=yes
58994
58995  # First look for the canonical freetype main include file ft2build.h.
58996  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58997    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58998    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58999    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59000      # Fail.
59001      FOUND_FREETYPE=no
59002    fi
59003  fi
59004
59005  if test "x$FOUND_FREETYPE" = xyes; then
59006    # Include file found, let's continue the sanity check.
59007    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59008$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59009
59010    # Reset to default value
59011    FREETYPE_BASE_NAME=freetype
59012    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59013    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59014      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59015          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59016        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59017        # for the .6 version explicitly.
59018        FREETYPE_BASE_NAME=freetype.6
59019        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59020        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59021$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59022      else
59023        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59024$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59025        FOUND_FREETYPE=no
59026      fi
59027    else
59028      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59029        # On Windows, we will need both .lib and .dll file.
59030        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59031          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59032$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59033          FOUND_FREETYPE=no
59034        fi
59035      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59036          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59037        # Found lib in isa dir, use that instead.
59038        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59039        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59040$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59041      fi
59042    fi
59043  fi
59044
59045  if test "x$FOUND_FREETYPE" = xyes; then
59046
59047  # Only process if variable expands to non-empty
59048
59049  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59050    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59051
59052  # Input might be given as Windows format, start by converting to
59053  # unix format.
59054  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59055  new_path=`$CYGPATH -u "$path"`
59056
59057  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59058  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59059  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59060  # "foo.exe" is OK but "foo" is an error.
59061  #
59062  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59063  # It is also a way to make sure we got the proper file name for the real test later on.
59064  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59065  if test "x$test_shortpath" = x; then
59066    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59067$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59068    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59069  fi
59070
59071  # Call helper function which possibly converts this using DOS-style short mode.
59072  # If so, the updated path is stored in $new_path.
59073
59074  input_path="$new_path"
59075  # Check if we need to convert this using DOS-style short mode. If the path
59076  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59077  # take no chances and rewrite it.
59078  # Note: m4 eats our [], so we need to use [ and ] instead.
59079  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59080  if test "x$has_forbidden_chars" != x; then
59081    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59082    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59083    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59084    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59085      # Going to short mode and back again did indeed matter. Since short mode is
59086      # case insensitive, let's make it lowercase to improve readability.
59087      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59088      # Now convert it back to Unix-style (cygpath)
59089      input_path=`$CYGPATH -u "$shortmode_path"`
59090      new_path="$input_path"
59091    fi
59092  fi
59093
59094  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59095  if test "x$test_cygdrive_prefix" = x; then
59096    # As a simple fix, exclude /usr/bin since it's not a real path.
59097    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59098      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59099      # a path prefixed by /cygdrive for fixpath to work.
59100      new_path="$CYGWIN_ROOT_PATH$input_path"
59101    fi
59102  fi
59103
59104
59105  if test "x$path" != "x$new_path"; then
59106    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59107    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59108$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59109  fi
59110
59111    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59112
59113  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59114  has_colon=`$ECHO $path | $GREP ^.:`
59115  new_path="$path"
59116  if test "x$has_colon" = x; then
59117    # Not in mixed or Windows style, start by that.
59118    new_path=`cmd //c echo $path`
59119  fi
59120
59121
59122  input_path="$new_path"
59123  # Check if we need to convert this using DOS-style short mode. If the path
59124  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59125  # take no chances and rewrite it.
59126  # Note: m4 eats our [], so we need to use [ and ] instead.
59127  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59128  if test "x$has_forbidden_chars" != x; then
59129    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59130    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59131  fi
59132
59133
59134  windows_path="$new_path"
59135  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59136    unix_path=`$CYGPATH -u "$windows_path"`
59137    new_path="$unix_path"
59138  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59139    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59140    new_path="$unix_path"
59141  fi
59142
59143  if test "x$path" != "x$new_path"; then
59144    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59145    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59146$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59147  fi
59148
59149  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59150  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59151
59152    else
59153      # We're on a unix platform. Hooray! :)
59154      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59155      has_space=`$ECHO "$path" | $GREP " "`
59156      if test "x$has_space" != x; then
59157        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59158$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59159        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59160      fi
59161
59162      # Use eval to expand a potential ~
59163      eval path="$path"
59164      if test ! -f "$path" && test ! -d "$path"; then
59165        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59166      fi
59167
59168      if test -d "$path"; then
59169        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59170      else
59171        dir="`$DIRNAME "$path"`"
59172        base="`$BASENAME "$path"`"
59173        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59174      fi
59175    fi
59176  fi
59177
59178
59179  # Only process if variable expands to non-empty
59180
59181  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59182    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59183
59184  # Input might be given as Windows format, start by converting to
59185  # unix format.
59186  path="$POTENTIAL_FREETYPE_LIB_PATH"
59187  new_path=`$CYGPATH -u "$path"`
59188
59189  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59190  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59191  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59192  # "foo.exe" is OK but "foo" is an error.
59193  #
59194  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59195  # It is also a way to make sure we got the proper file name for the real test later on.
59196  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59197  if test "x$test_shortpath" = x; then
59198    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59199$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59200    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59201  fi
59202
59203  # Call helper function which possibly converts this using DOS-style short mode.
59204  # If so, the updated path is stored in $new_path.
59205
59206  input_path="$new_path"
59207  # Check if we need to convert this using DOS-style short mode. If the path
59208  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59209  # take no chances and rewrite it.
59210  # Note: m4 eats our [], so we need to use [ and ] instead.
59211  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59212  if test "x$has_forbidden_chars" != x; then
59213    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59214    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59215    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59216    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59217      # Going to short mode and back again did indeed matter. Since short mode is
59218      # case insensitive, let's make it lowercase to improve readability.
59219      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59220      # Now convert it back to Unix-style (cygpath)
59221      input_path=`$CYGPATH -u "$shortmode_path"`
59222      new_path="$input_path"
59223    fi
59224  fi
59225
59226  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59227  if test "x$test_cygdrive_prefix" = x; then
59228    # As a simple fix, exclude /usr/bin since it's not a real path.
59229    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59230      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59231      # a path prefixed by /cygdrive for fixpath to work.
59232      new_path="$CYGWIN_ROOT_PATH$input_path"
59233    fi
59234  fi
59235
59236
59237  if test "x$path" != "x$new_path"; then
59238    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59239    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59240$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59241  fi
59242
59243    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59244
59245  path="$POTENTIAL_FREETYPE_LIB_PATH"
59246  has_colon=`$ECHO $path | $GREP ^.:`
59247  new_path="$path"
59248  if test "x$has_colon" = x; then
59249    # Not in mixed or Windows style, start by that.
59250    new_path=`cmd //c echo $path`
59251  fi
59252
59253
59254  input_path="$new_path"
59255  # Check if we need to convert this using DOS-style short mode. If the path
59256  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59257  # take no chances and rewrite it.
59258  # Note: m4 eats our [], so we need to use [ and ] instead.
59259  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59260  if test "x$has_forbidden_chars" != x; then
59261    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59262    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59263  fi
59264
59265
59266  windows_path="$new_path"
59267  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59268    unix_path=`$CYGPATH -u "$windows_path"`
59269    new_path="$unix_path"
59270  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59271    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59272    new_path="$unix_path"
59273  fi
59274
59275  if test "x$path" != "x$new_path"; then
59276    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59277    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59278$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59279  fi
59280
59281  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59282  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59283
59284    else
59285      # We're on a unix platform. Hooray! :)
59286      path="$POTENTIAL_FREETYPE_LIB_PATH"
59287      has_space=`$ECHO "$path" | $GREP " "`
59288      if test "x$has_space" != x; then
59289        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59290$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59291        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59292      fi
59293
59294      # Use eval to expand a potential ~
59295      eval path="$path"
59296      if test ! -f "$path" && test ! -d "$path"; then
59297        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59298      fi
59299
59300      if test -d "$path"; then
59301        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59302      else
59303        dir="`$DIRNAME "$path"`"
59304        base="`$BASENAME "$path"`"
59305        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59306      fi
59307    fi
59308  fi
59309
59310
59311    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59312    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59313$as_echo_n "checking for freetype includes... " >&6; }
59314    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59315$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59316    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59317    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59318$as_echo_n "checking for freetype libraries... " >&6; }
59319    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59320$as_echo "$FREETYPE_LIB_PATH" >&6; }
59321  fi
59322
59323            fi
59324            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
59325                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
59326              # Source is available, as a last resort try to build freetype in default location
59327
59328  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
59329  BUILD_FREETYPE=yes
59330
59331  # Check if the freetype sources are acessible..
59332  if ! test -d $FREETYPE_SRC_PATH; then
59333    { $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
59334$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
59335    BUILD_FREETYPE=no
59336  fi
59337  # ..and contain a vc2010 project file
59338  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
59339  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
59340    { $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
59341$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
59342    BUILD_FREETYPE=no
59343  fi
59344  # Now check if configure found a version of 'msbuild.exe'
59345  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
59346    { $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
59347$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;}
59348    BUILD_FREETYPE=no
59349  fi
59350
59351  # Ready to go..
59352  if test "x$BUILD_FREETYPE" = xyes; then
59353    # msbuild requires trailing slashes for output directories
59354    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
59355    freetype_lib_path_unix="$freetype_lib_path"
59356    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
59357
59358  unix_path="$vcxproj_path"
59359  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59360    windows_path=`$CYGPATH -m "$unix_path"`
59361    vcxproj_path="$windows_path"
59362  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59363    windows_path=`cmd //c echo $unix_path`
59364    vcxproj_path="$windows_path"
59365  fi
59366
59367
59368  unix_path="$freetype_lib_path"
59369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59370    windows_path=`$CYGPATH -m "$unix_path"`
59371    freetype_lib_path="$windows_path"
59372  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59373    windows_path=`cmd //c echo $unix_path`
59374    freetype_lib_path="$windows_path"
59375  fi
59376
59377
59378  unix_path="$freetype_obj_path"
59379  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59380    windows_path=`$CYGPATH -m "$unix_path"`
59381    freetype_obj_path="$windows_path"
59382  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59383    windows_path=`cmd //c echo $unix_path`
59384    freetype_obj_path="$windows_path"
59385  fi
59386
59387    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59388      freetype_platform=x64
59389    else
59390      freetype_platform=win32
59391    fi
59392
59393    # The original freetype project file is for VS 2010 (i.e. 'v100'),
59394    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
59395    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
59396    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
59397    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
59398$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
59399
59400    # First we try to build the freetype.dll
59401    $ECHO -e "@echo off\n"\
59402        "$MSBUILD $vcxproj_path "\
59403        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59404        "/p:Configuration=\"Release Multithreaded\" "\
59405        "/p:Platform=$freetype_platform "\
59406        "/p:ConfigurationType=DynamicLibrary "\
59407        "/p:TargetName=freetype "\
59408        "/p:OutDir=\"$freetype_lib_path\" "\
59409        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
59410    cmd /c freetype.bat
59411
59412    if test -s "$freetype_lib_path_unix/freetype.dll"; then
59413      # If that succeeds we also build freetype.lib
59414      $ECHO -e "@echo off\n"\
59415          "$MSBUILD $vcxproj_path "\
59416          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59417          "/p:Configuration=\"Release Multithreaded\" "\
59418          "/p:Platform=$freetype_platform "\
59419          "/p:ConfigurationType=StaticLibrary "\
59420          "/p:TargetName=freetype "\
59421          "/p:OutDir=\"$freetype_lib_path\" "\
59422          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
59423      cmd /c freetype.bat
59424
59425      if test -s "$freetype_lib_path_unix/freetype.lib"; then
59426        # Once we build both, lib and dll, set freetype lib and include path appropriately
59427        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
59428        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
59429        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
59430$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
59431      else
59432        BUILD_FREETYPE=no
59433      fi
59434    else
59435      BUILD_FREETYPE=no
59436    fi
59437  fi
59438
59439              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59440
59441  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59442  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59443  METHOD="well-known location"
59444
59445  # Let's start with an optimistic view of the world :-)
59446  FOUND_FREETYPE=yes
59447
59448  # First look for the canonical freetype main include file ft2build.h.
59449  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59450    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59451    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59452    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59453      # Fail.
59454      FOUND_FREETYPE=no
59455    fi
59456  fi
59457
59458  if test "x$FOUND_FREETYPE" = xyes; then
59459    # Include file found, let's continue the sanity check.
59460    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59461$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59462
59463    # Reset to default value
59464    FREETYPE_BASE_NAME=freetype
59465    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59466    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59467      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59468          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59469        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59470        # for the .6 version explicitly.
59471        FREETYPE_BASE_NAME=freetype.6
59472        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59473        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59474$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59475      else
59476        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59477$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59478        FOUND_FREETYPE=no
59479      fi
59480    else
59481      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59482        # On Windows, we will need both .lib and .dll file.
59483        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59484          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59485$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59486          FOUND_FREETYPE=no
59487        fi
59488      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59489          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59490        # Found lib in isa dir, use that instead.
59491        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59492        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59493$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59494      fi
59495    fi
59496  fi
59497
59498  if test "x$FOUND_FREETYPE" = xyes; then
59499
59500  # Only process if variable expands to non-empty
59501
59502  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59503    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59504
59505  # Input might be given as Windows format, start by converting to
59506  # unix format.
59507  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59508  new_path=`$CYGPATH -u "$path"`
59509
59510  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59511  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59512  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59513  # "foo.exe" is OK but "foo" is an error.
59514  #
59515  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59516  # It is also a way to make sure we got the proper file name for the real test later on.
59517  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59518  if test "x$test_shortpath" = x; then
59519    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59520$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59521    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59522  fi
59523
59524  # Call helper function which possibly converts this using DOS-style short mode.
59525  # If so, the updated path is stored in $new_path.
59526
59527  input_path="$new_path"
59528  # Check if we need to convert this using DOS-style short mode. If the path
59529  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59530  # take no chances and rewrite it.
59531  # Note: m4 eats our [], so we need to use [ and ] instead.
59532  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59533  if test "x$has_forbidden_chars" != x; then
59534    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59535    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59536    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59537    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59538      # Going to short mode and back again did indeed matter. Since short mode is
59539      # case insensitive, let's make it lowercase to improve readability.
59540      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59541      # Now convert it back to Unix-style (cygpath)
59542      input_path=`$CYGPATH -u "$shortmode_path"`
59543      new_path="$input_path"
59544    fi
59545  fi
59546
59547  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59548  if test "x$test_cygdrive_prefix" = x; then
59549    # As a simple fix, exclude /usr/bin since it's not a real path.
59550    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59551      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59552      # a path prefixed by /cygdrive for fixpath to work.
59553      new_path="$CYGWIN_ROOT_PATH$input_path"
59554    fi
59555  fi
59556
59557
59558  if test "x$path" != "x$new_path"; then
59559    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59560    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59561$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59562  fi
59563
59564    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59565
59566  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59567  has_colon=`$ECHO $path | $GREP ^.:`
59568  new_path="$path"
59569  if test "x$has_colon" = x; then
59570    # Not in mixed or Windows style, start by that.
59571    new_path=`cmd //c echo $path`
59572  fi
59573
59574
59575  input_path="$new_path"
59576  # Check if we need to convert this using DOS-style short mode. If the path
59577  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59578  # take no chances and rewrite it.
59579  # Note: m4 eats our [], so we need to use [ and ] instead.
59580  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59581  if test "x$has_forbidden_chars" != x; then
59582    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59583    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59584  fi
59585
59586
59587  windows_path="$new_path"
59588  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59589    unix_path=`$CYGPATH -u "$windows_path"`
59590    new_path="$unix_path"
59591  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59592    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59593    new_path="$unix_path"
59594  fi
59595
59596  if test "x$path" != "x$new_path"; then
59597    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59598    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59599$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59600  fi
59601
59602  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59603  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59604
59605    else
59606      # We're on a unix platform. Hooray! :)
59607      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59608      has_space=`$ECHO "$path" | $GREP " "`
59609      if test "x$has_space" != x; then
59610        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59611$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59612        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59613      fi
59614
59615      # Use eval to expand a potential ~
59616      eval path="$path"
59617      if test ! -f "$path" && test ! -d "$path"; then
59618        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59619      fi
59620
59621      if test -d "$path"; then
59622        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59623      else
59624        dir="`$DIRNAME "$path"`"
59625        base="`$BASENAME "$path"`"
59626        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59627      fi
59628    fi
59629  fi
59630
59631
59632  # Only process if variable expands to non-empty
59633
59634  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59635    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59636
59637  # Input might be given as Windows format, start by converting to
59638  # unix format.
59639  path="$POTENTIAL_FREETYPE_LIB_PATH"
59640  new_path=`$CYGPATH -u "$path"`
59641
59642  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59643  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59644  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59645  # "foo.exe" is OK but "foo" is an error.
59646  #
59647  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59648  # It is also a way to make sure we got the proper file name for the real test later on.
59649  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59650  if test "x$test_shortpath" = x; then
59651    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59652$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59653    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59654  fi
59655
59656  # Call helper function which possibly converts this using DOS-style short mode.
59657  # If so, the updated path is stored in $new_path.
59658
59659  input_path="$new_path"
59660  # Check if we need to convert this using DOS-style short mode. If the path
59661  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59662  # take no chances and rewrite it.
59663  # Note: m4 eats our [], so we need to use [ and ] instead.
59664  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59665  if test "x$has_forbidden_chars" != x; then
59666    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59667    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59668    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59669    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59670      # Going to short mode and back again did indeed matter. Since short mode is
59671      # case insensitive, let's make it lowercase to improve readability.
59672      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59673      # Now convert it back to Unix-style (cygpath)
59674      input_path=`$CYGPATH -u "$shortmode_path"`
59675      new_path="$input_path"
59676    fi
59677  fi
59678
59679  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59680  if test "x$test_cygdrive_prefix" = x; then
59681    # As a simple fix, exclude /usr/bin since it's not a real path.
59682    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59683      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59684      # a path prefixed by /cygdrive for fixpath to work.
59685      new_path="$CYGWIN_ROOT_PATH$input_path"
59686    fi
59687  fi
59688
59689
59690  if test "x$path" != "x$new_path"; then
59691    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59692    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59693$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59694  fi
59695
59696    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59697
59698  path="$POTENTIAL_FREETYPE_LIB_PATH"
59699  has_colon=`$ECHO $path | $GREP ^.:`
59700  new_path="$path"
59701  if test "x$has_colon" = x; then
59702    # Not in mixed or Windows style, start by that.
59703    new_path=`cmd //c echo $path`
59704  fi
59705
59706
59707  input_path="$new_path"
59708  # Check if we need to convert this using DOS-style short mode. If the path
59709  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59710  # take no chances and rewrite it.
59711  # Note: m4 eats our [], so we need to use [ and ] instead.
59712  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59713  if test "x$has_forbidden_chars" != x; then
59714    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59715    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59716  fi
59717
59718
59719  windows_path="$new_path"
59720  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59721    unix_path=`$CYGPATH -u "$windows_path"`
59722    new_path="$unix_path"
59723  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59724    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59725    new_path="$unix_path"
59726  fi
59727
59728  if test "x$path" != "x$new_path"; then
59729    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59730    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59731$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59732  fi
59733
59734  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59735  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59736
59737    else
59738      # We're on a unix platform. Hooray! :)
59739      path="$POTENTIAL_FREETYPE_LIB_PATH"
59740      has_space=`$ECHO "$path" | $GREP " "`
59741      if test "x$has_space" != x; then
59742        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59743$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59744        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59745      fi
59746
59747      # Use eval to expand a potential ~
59748      eval path="$path"
59749      if test ! -f "$path" && test ! -d "$path"; then
59750        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59751      fi
59752
59753      if test -d "$path"; then
59754        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59755      else
59756        dir="`$DIRNAME "$path"`"
59757        base="`$BASENAME "$path"`"
59758        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59759      fi
59760    fi
59761  fi
59762
59763
59764    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59765    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59766$as_echo_n "checking for freetype includes... " >&6; }
59767    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59768$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59769    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59770    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59771$as_echo_n "checking for freetype libraries... " >&6; }
59772    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59773$as_echo "$FREETYPE_LIB_PATH" >&6; }
59774  fi
59775
59776              else
59777
59778  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59779  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59780  METHOD="well-known location"
59781
59782  # Let's start with an optimistic view of the world :-)
59783  FOUND_FREETYPE=yes
59784
59785  # First look for the canonical freetype main include file ft2build.h.
59786  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59787    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59788    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59789    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59790      # Fail.
59791      FOUND_FREETYPE=no
59792    fi
59793  fi
59794
59795  if test "x$FOUND_FREETYPE" = xyes; then
59796    # Include file found, let's continue the sanity check.
59797    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59798$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59799
59800    # Reset to default value
59801    FREETYPE_BASE_NAME=freetype
59802    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59803    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59804      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59805          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59806        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59807        # for the .6 version explicitly.
59808        FREETYPE_BASE_NAME=freetype.6
59809        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59810        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59811$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59812      else
59813        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59814$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59815        FOUND_FREETYPE=no
59816      fi
59817    else
59818      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59819        # On Windows, we will need both .lib and .dll file.
59820        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59821          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59822$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59823          FOUND_FREETYPE=no
59824        fi
59825      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59826          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59827        # Found lib in isa dir, use that instead.
59828        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59829        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59830$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59831      fi
59832    fi
59833  fi
59834
59835  if test "x$FOUND_FREETYPE" = xyes; then
59836
59837  # Only process if variable expands to non-empty
59838
59839  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59840    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59841
59842  # Input might be given as Windows format, start by converting to
59843  # unix format.
59844  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59845  new_path=`$CYGPATH -u "$path"`
59846
59847  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59848  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59849  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59850  # "foo.exe" is OK but "foo" is an error.
59851  #
59852  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59853  # It is also a way to make sure we got the proper file name for the real test later on.
59854  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59855  if test "x$test_shortpath" = x; then
59856    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59857$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59858    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59859  fi
59860
59861  # Call helper function which possibly converts this using DOS-style short mode.
59862  # If so, the updated path is stored in $new_path.
59863
59864  input_path="$new_path"
59865  # Check if we need to convert this using DOS-style short mode. If the path
59866  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59867  # take no chances and rewrite it.
59868  # Note: m4 eats our [], so we need to use [ and ] instead.
59869  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59870  if test "x$has_forbidden_chars" != x; then
59871    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59872    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59873    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59874    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59875      # Going to short mode and back again did indeed matter. Since short mode is
59876      # case insensitive, let's make it lowercase to improve readability.
59877      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59878      # Now convert it back to Unix-style (cygpath)
59879      input_path=`$CYGPATH -u "$shortmode_path"`
59880      new_path="$input_path"
59881    fi
59882  fi
59883
59884  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59885  if test "x$test_cygdrive_prefix" = x; then
59886    # As a simple fix, exclude /usr/bin since it's not a real path.
59887    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59888      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59889      # a path prefixed by /cygdrive for fixpath to work.
59890      new_path="$CYGWIN_ROOT_PATH$input_path"
59891    fi
59892  fi
59893
59894
59895  if test "x$path" != "x$new_path"; then
59896    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59897    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59898$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59899  fi
59900
59901    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59902
59903  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59904  has_colon=`$ECHO $path | $GREP ^.:`
59905  new_path="$path"
59906  if test "x$has_colon" = x; then
59907    # Not in mixed or Windows style, start by that.
59908    new_path=`cmd //c echo $path`
59909  fi
59910
59911
59912  input_path="$new_path"
59913  # Check if we need to convert this using DOS-style short mode. If the path
59914  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59915  # take no chances and rewrite it.
59916  # Note: m4 eats our [], so we need to use [ and ] instead.
59917  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59918  if test "x$has_forbidden_chars" != x; then
59919    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59920    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59921  fi
59922
59923
59924  windows_path="$new_path"
59925  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59926    unix_path=`$CYGPATH -u "$windows_path"`
59927    new_path="$unix_path"
59928  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59929    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59930    new_path="$unix_path"
59931  fi
59932
59933  if test "x$path" != "x$new_path"; then
59934    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59935    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59936$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59937  fi
59938
59939  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59940  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59941
59942    else
59943      # We're on a unix platform. Hooray! :)
59944      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59945      has_space=`$ECHO "$path" | $GREP " "`
59946      if test "x$has_space" != x; then
59947        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59948$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59949        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59950      fi
59951
59952      # Use eval to expand a potential ~
59953      eval path="$path"
59954      if test ! -f "$path" && test ! -d "$path"; then
59955        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59956      fi
59957
59958      if test -d "$path"; then
59959        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59960      else
59961        dir="`$DIRNAME "$path"`"
59962        base="`$BASENAME "$path"`"
59963        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59964      fi
59965    fi
59966  fi
59967
59968
59969  # Only process if variable expands to non-empty
59970
59971  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59972    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59973
59974  # Input might be given as Windows format, start by converting to
59975  # unix format.
59976  path="$POTENTIAL_FREETYPE_LIB_PATH"
59977  new_path=`$CYGPATH -u "$path"`
59978
59979  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59980  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59981  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59982  # "foo.exe" is OK but "foo" is an error.
59983  #
59984  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59985  # It is also a way to make sure we got the proper file name for the real test later on.
59986  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59987  if test "x$test_shortpath" = x; then
59988    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59989$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59990    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59991  fi
59992
59993  # Call helper function which possibly converts this using DOS-style short mode.
59994  # If so, the updated path is stored in $new_path.
59995
59996  input_path="$new_path"
59997  # Check if we need to convert this using DOS-style short mode. If the path
59998  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59999  # take no chances and rewrite it.
60000  # Note: m4 eats our [], so we need to use [ and ] instead.
60001  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60002  if test "x$has_forbidden_chars" != x; then
60003    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60004    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60005    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60006    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60007      # Going to short mode and back again did indeed matter. Since short mode is
60008      # case insensitive, let's make it lowercase to improve readability.
60009      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60010      # Now convert it back to Unix-style (cygpath)
60011      input_path=`$CYGPATH -u "$shortmode_path"`
60012      new_path="$input_path"
60013    fi
60014  fi
60015
60016  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60017  if test "x$test_cygdrive_prefix" = x; then
60018    # As a simple fix, exclude /usr/bin since it's not a real path.
60019    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60020      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60021      # a path prefixed by /cygdrive for fixpath to work.
60022      new_path="$CYGWIN_ROOT_PATH$input_path"
60023    fi
60024  fi
60025
60026
60027  if test "x$path" != "x$new_path"; then
60028    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60029    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60030$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60031  fi
60032
60033    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60034
60035  path="$POTENTIAL_FREETYPE_LIB_PATH"
60036  has_colon=`$ECHO $path | $GREP ^.:`
60037  new_path="$path"
60038  if test "x$has_colon" = x; then
60039    # Not in mixed or Windows style, start by that.
60040    new_path=`cmd //c echo $path`
60041  fi
60042
60043
60044  input_path="$new_path"
60045  # Check if we need to convert this using DOS-style short mode. If the path
60046  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60047  # take no chances and rewrite it.
60048  # Note: m4 eats our [], so we need to use [ and ] instead.
60049  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60050  if test "x$has_forbidden_chars" != x; then
60051    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60052    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60053  fi
60054
60055
60056  windows_path="$new_path"
60057  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60058    unix_path=`$CYGPATH -u "$windows_path"`
60059    new_path="$unix_path"
60060  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60061    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60062    new_path="$unix_path"
60063  fi
60064
60065  if test "x$path" != "x$new_path"; then
60066    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60067    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60068$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60069  fi
60070
60071  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60072  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60073
60074    else
60075      # We're on a unix platform. Hooray! :)
60076      path="$POTENTIAL_FREETYPE_LIB_PATH"
60077      has_space=`$ECHO "$path" | $GREP " "`
60078      if test "x$has_space" != x; then
60079        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60080$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60081        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60082      fi
60083
60084      # Use eval to expand a potential ~
60085      eval path="$path"
60086      if test ! -f "$path" && test ! -d "$path"; then
60087        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60088      fi
60089
60090      if test -d "$path"; then
60091        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60092      else
60093        dir="`$DIRNAME "$path"`"
60094        base="`$BASENAME "$path"`"
60095        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60096      fi
60097    fi
60098  fi
60099
60100
60101    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60102    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60103$as_echo_n "checking for freetype includes... " >&6; }
60104    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60105$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60106    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60107    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60108$as_echo_n "checking for freetype libraries... " >&6; }
60109    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60110$as_echo "$FREETYPE_LIB_PATH" >&6; }
60111  fi
60112
60113              fi
60114            fi
60115          fi
60116        else
60117          FREETYPE_BASE_DIR="$SYSROOT/usr"
60118
60119  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60120  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60121  METHOD="well-known location"
60122
60123  # Let's start with an optimistic view of the world :-)
60124  FOUND_FREETYPE=yes
60125
60126  # First look for the canonical freetype main include file ft2build.h.
60127  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60128    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60129    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60130    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60131      # Fail.
60132      FOUND_FREETYPE=no
60133    fi
60134  fi
60135
60136  if test "x$FOUND_FREETYPE" = xyes; then
60137    # Include file found, let's continue the sanity check.
60138    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60139$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60140
60141    # Reset to default value
60142    FREETYPE_BASE_NAME=freetype
60143    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60144    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60145      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60146          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60147        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60148        # for the .6 version explicitly.
60149        FREETYPE_BASE_NAME=freetype.6
60150        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60151        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60152$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60153      else
60154        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60155$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60156        FOUND_FREETYPE=no
60157      fi
60158    else
60159      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60160        # On Windows, we will need both .lib and .dll file.
60161        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60162          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60163$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60164          FOUND_FREETYPE=no
60165        fi
60166      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60167          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60168        # Found lib in isa dir, use that instead.
60169        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60170        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60171$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60172      fi
60173    fi
60174  fi
60175
60176  if test "x$FOUND_FREETYPE" = xyes; then
60177
60178  # Only process if variable expands to non-empty
60179
60180  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60181    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60182
60183  # Input might be given as Windows format, start by converting to
60184  # unix format.
60185  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60186  new_path=`$CYGPATH -u "$path"`
60187
60188  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60189  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60190  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60191  # "foo.exe" is OK but "foo" is an error.
60192  #
60193  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60194  # It is also a way to make sure we got the proper file name for the real test later on.
60195  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60196  if test "x$test_shortpath" = x; then
60197    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60198$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60199    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60200  fi
60201
60202  # Call helper function which possibly converts this using DOS-style short mode.
60203  # If so, the updated path is stored in $new_path.
60204
60205  input_path="$new_path"
60206  # Check if we need to convert this using DOS-style short mode. If the path
60207  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60208  # take no chances and rewrite it.
60209  # Note: m4 eats our [], so we need to use [ and ] instead.
60210  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60211  if test "x$has_forbidden_chars" != x; then
60212    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60213    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60214    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60215    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60216      # Going to short mode and back again did indeed matter. Since short mode is
60217      # case insensitive, let's make it lowercase to improve readability.
60218      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60219      # Now convert it back to Unix-style (cygpath)
60220      input_path=`$CYGPATH -u "$shortmode_path"`
60221      new_path="$input_path"
60222    fi
60223  fi
60224
60225  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60226  if test "x$test_cygdrive_prefix" = x; then
60227    # As a simple fix, exclude /usr/bin since it's not a real path.
60228    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60229      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60230      # a path prefixed by /cygdrive for fixpath to work.
60231      new_path="$CYGWIN_ROOT_PATH$input_path"
60232    fi
60233  fi
60234
60235
60236  if test "x$path" != "x$new_path"; then
60237    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60238    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60239$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60240  fi
60241
60242    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60243
60244  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60245  has_colon=`$ECHO $path | $GREP ^.:`
60246  new_path="$path"
60247  if test "x$has_colon" = x; then
60248    # Not in mixed or Windows style, start by that.
60249    new_path=`cmd //c echo $path`
60250  fi
60251
60252
60253  input_path="$new_path"
60254  # Check if we need to convert this using DOS-style short mode. If the path
60255  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60256  # take no chances and rewrite it.
60257  # Note: m4 eats our [], so we need to use [ and ] instead.
60258  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60259  if test "x$has_forbidden_chars" != x; then
60260    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60261    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60262  fi
60263
60264
60265  windows_path="$new_path"
60266  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60267    unix_path=`$CYGPATH -u "$windows_path"`
60268    new_path="$unix_path"
60269  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60270    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60271    new_path="$unix_path"
60272  fi
60273
60274  if test "x$path" != "x$new_path"; then
60275    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60276    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60277$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60278  fi
60279
60280  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60281  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60282
60283    else
60284      # We're on a unix platform. Hooray! :)
60285      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60286      has_space=`$ECHO "$path" | $GREP " "`
60287      if test "x$has_space" != x; then
60288        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60289$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60290        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60291      fi
60292
60293      # Use eval to expand a potential ~
60294      eval path="$path"
60295      if test ! -f "$path" && test ! -d "$path"; then
60296        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60297      fi
60298
60299      if test -d "$path"; then
60300        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60301      else
60302        dir="`$DIRNAME "$path"`"
60303        base="`$BASENAME "$path"`"
60304        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60305      fi
60306    fi
60307  fi
60308
60309
60310  # Only process if variable expands to non-empty
60311
60312  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60313    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60314
60315  # Input might be given as Windows format, start by converting to
60316  # unix format.
60317  path="$POTENTIAL_FREETYPE_LIB_PATH"
60318  new_path=`$CYGPATH -u "$path"`
60319
60320  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60321  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60322  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60323  # "foo.exe" is OK but "foo" is an error.
60324  #
60325  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60326  # It is also a way to make sure we got the proper file name for the real test later on.
60327  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60328  if test "x$test_shortpath" = x; then
60329    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60330$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60331    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60332  fi
60333
60334  # Call helper function which possibly converts this using DOS-style short mode.
60335  # If so, the updated path is stored in $new_path.
60336
60337  input_path="$new_path"
60338  # Check if we need to convert this using DOS-style short mode. If the path
60339  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60340  # take no chances and rewrite it.
60341  # Note: m4 eats our [], so we need to use [ and ] instead.
60342  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60343  if test "x$has_forbidden_chars" != x; then
60344    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60345    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60346    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60347    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60348      # Going to short mode and back again did indeed matter. Since short mode is
60349      # case insensitive, let's make it lowercase to improve readability.
60350      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60351      # Now convert it back to Unix-style (cygpath)
60352      input_path=`$CYGPATH -u "$shortmode_path"`
60353      new_path="$input_path"
60354    fi
60355  fi
60356
60357  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60358  if test "x$test_cygdrive_prefix" = x; then
60359    # As a simple fix, exclude /usr/bin since it's not a real path.
60360    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60361      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60362      # a path prefixed by /cygdrive for fixpath to work.
60363      new_path="$CYGWIN_ROOT_PATH$input_path"
60364    fi
60365  fi
60366
60367
60368  if test "x$path" != "x$new_path"; then
60369    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60370    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60371$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60372  fi
60373
60374    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60375
60376  path="$POTENTIAL_FREETYPE_LIB_PATH"
60377  has_colon=`$ECHO $path | $GREP ^.:`
60378  new_path="$path"
60379  if test "x$has_colon" = x; then
60380    # Not in mixed or Windows style, start by that.
60381    new_path=`cmd //c echo $path`
60382  fi
60383
60384
60385  input_path="$new_path"
60386  # Check if we need to convert this using DOS-style short mode. If the path
60387  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60388  # take no chances and rewrite it.
60389  # Note: m4 eats our [], so we need to use [ and ] instead.
60390  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60391  if test "x$has_forbidden_chars" != x; then
60392    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60393    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60394  fi
60395
60396
60397  windows_path="$new_path"
60398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60399    unix_path=`$CYGPATH -u "$windows_path"`
60400    new_path="$unix_path"
60401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60402    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60403    new_path="$unix_path"
60404  fi
60405
60406  if test "x$path" != "x$new_path"; then
60407    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60408    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60409$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60410  fi
60411
60412  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60413  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60414
60415    else
60416      # We're on a unix platform. Hooray! :)
60417      path="$POTENTIAL_FREETYPE_LIB_PATH"
60418      has_space=`$ECHO "$path" | $GREP " "`
60419      if test "x$has_space" != x; then
60420        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60421$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60422        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60423      fi
60424
60425      # Use eval to expand a potential ~
60426      eval path="$path"
60427      if test ! -f "$path" && test ! -d "$path"; then
60428        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60429      fi
60430
60431      if test -d "$path"; then
60432        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60433      else
60434        dir="`$DIRNAME "$path"`"
60435        base="`$BASENAME "$path"`"
60436        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60437      fi
60438    fi
60439  fi
60440
60441
60442    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60443    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60444$as_echo_n "checking for freetype includes... " >&6; }
60445    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60446$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60447    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60448    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60449$as_echo_n "checking for freetype libraries... " >&6; }
60450    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60451$as_echo "$FREETYPE_LIB_PATH" >&6; }
60452  fi
60453
60454
60455          if test "x$FOUND_FREETYPE" != xyes; then
60456            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
60457
60458  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60459  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60460  METHOD="well-known location"
60461
60462  # Let's start with an optimistic view of the world :-)
60463  FOUND_FREETYPE=yes
60464
60465  # First look for the canonical freetype main include file ft2build.h.
60466  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60467    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60468    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60469    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60470      # Fail.
60471      FOUND_FREETYPE=no
60472    fi
60473  fi
60474
60475  if test "x$FOUND_FREETYPE" = xyes; then
60476    # Include file found, let's continue the sanity check.
60477    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60478$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60479
60480    # Reset to default value
60481    FREETYPE_BASE_NAME=freetype
60482    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60483    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60484      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60485          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60486        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60487        # for the .6 version explicitly.
60488        FREETYPE_BASE_NAME=freetype.6
60489        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60490        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60491$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60492      else
60493        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60494$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60495        FOUND_FREETYPE=no
60496      fi
60497    else
60498      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60499        # On Windows, we will need both .lib and .dll file.
60500        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60501          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60502$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60503          FOUND_FREETYPE=no
60504        fi
60505      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60506          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60507        # Found lib in isa dir, use that instead.
60508        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60509        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60510$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60511      fi
60512    fi
60513  fi
60514
60515  if test "x$FOUND_FREETYPE" = xyes; then
60516
60517  # Only process if variable expands to non-empty
60518
60519  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60520    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60521
60522  # Input might be given as Windows format, start by converting to
60523  # unix format.
60524  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60525  new_path=`$CYGPATH -u "$path"`
60526
60527  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60528  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60529  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60530  # "foo.exe" is OK but "foo" is an error.
60531  #
60532  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60533  # It is also a way to make sure we got the proper file name for the real test later on.
60534  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60535  if test "x$test_shortpath" = x; then
60536    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60537$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60538    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60539  fi
60540
60541  # Call helper function which possibly converts this using DOS-style short mode.
60542  # If so, the updated path is stored in $new_path.
60543
60544  input_path="$new_path"
60545  # Check if we need to convert this using DOS-style short mode. If the path
60546  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60547  # take no chances and rewrite it.
60548  # Note: m4 eats our [], so we need to use [ and ] instead.
60549  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60550  if test "x$has_forbidden_chars" != x; then
60551    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60552    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60553    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60554    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60555      # Going to short mode and back again did indeed matter. Since short mode is
60556      # case insensitive, let's make it lowercase to improve readability.
60557      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60558      # Now convert it back to Unix-style (cygpath)
60559      input_path=`$CYGPATH -u "$shortmode_path"`
60560      new_path="$input_path"
60561    fi
60562  fi
60563
60564  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60565  if test "x$test_cygdrive_prefix" = x; then
60566    # As a simple fix, exclude /usr/bin since it's not a real path.
60567    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60568      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60569      # a path prefixed by /cygdrive for fixpath to work.
60570      new_path="$CYGWIN_ROOT_PATH$input_path"
60571    fi
60572  fi
60573
60574
60575  if test "x$path" != "x$new_path"; then
60576    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60577    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60578$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60579  fi
60580
60581    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60582
60583  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60584  has_colon=`$ECHO $path | $GREP ^.:`
60585  new_path="$path"
60586  if test "x$has_colon" = x; then
60587    # Not in mixed or Windows style, start by that.
60588    new_path=`cmd //c echo $path`
60589  fi
60590
60591
60592  input_path="$new_path"
60593  # Check if we need to convert this using DOS-style short mode. If the path
60594  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60595  # take no chances and rewrite it.
60596  # Note: m4 eats our [], so we need to use [ and ] instead.
60597  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60598  if test "x$has_forbidden_chars" != x; then
60599    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60600    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60601  fi
60602
60603
60604  windows_path="$new_path"
60605  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60606    unix_path=`$CYGPATH -u "$windows_path"`
60607    new_path="$unix_path"
60608  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60609    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60610    new_path="$unix_path"
60611  fi
60612
60613  if test "x$path" != "x$new_path"; then
60614    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60615    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60616$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60617  fi
60618
60619  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60620  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60621
60622    else
60623      # We're on a unix platform. Hooray! :)
60624      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60625      has_space=`$ECHO "$path" | $GREP " "`
60626      if test "x$has_space" != x; then
60627        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60628$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60629        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60630      fi
60631
60632      # Use eval to expand a potential ~
60633      eval path="$path"
60634      if test ! -f "$path" && test ! -d "$path"; then
60635        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60636      fi
60637
60638      if test -d "$path"; then
60639        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60640      else
60641        dir="`$DIRNAME "$path"`"
60642        base="`$BASENAME "$path"`"
60643        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60644      fi
60645    fi
60646  fi
60647
60648
60649  # Only process if variable expands to non-empty
60650
60651  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60652    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60653
60654  # Input might be given as Windows format, start by converting to
60655  # unix format.
60656  path="$POTENTIAL_FREETYPE_LIB_PATH"
60657  new_path=`$CYGPATH -u "$path"`
60658
60659  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60660  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60661  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60662  # "foo.exe" is OK but "foo" is an error.
60663  #
60664  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60665  # It is also a way to make sure we got the proper file name for the real test later on.
60666  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60667  if test "x$test_shortpath" = x; then
60668    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60669$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60670    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60671  fi
60672
60673  # Call helper function which possibly converts this using DOS-style short mode.
60674  # If so, the updated path is stored in $new_path.
60675
60676  input_path="$new_path"
60677  # Check if we need to convert this using DOS-style short mode. If the path
60678  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60679  # take no chances and rewrite it.
60680  # Note: m4 eats our [], so we need to use [ and ] instead.
60681  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60682  if test "x$has_forbidden_chars" != x; then
60683    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60684    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60685    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60686    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60687      # Going to short mode and back again did indeed matter. Since short mode is
60688      # case insensitive, let's make it lowercase to improve readability.
60689      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60690      # Now convert it back to Unix-style (cygpath)
60691      input_path=`$CYGPATH -u "$shortmode_path"`
60692      new_path="$input_path"
60693    fi
60694  fi
60695
60696  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60697  if test "x$test_cygdrive_prefix" = x; then
60698    # As a simple fix, exclude /usr/bin since it's not a real path.
60699    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60700      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60701      # a path prefixed by /cygdrive for fixpath to work.
60702      new_path="$CYGWIN_ROOT_PATH$input_path"
60703    fi
60704  fi
60705
60706
60707  if test "x$path" != "x$new_path"; then
60708    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60709    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60710$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60711  fi
60712
60713    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60714
60715  path="$POTENTIAL_FREETYPE_LIB_PATH"
60716  has_colon=`$ECHO $path | $GREP ^.:`
60717  new_path="$path"
60718  if test "x$has_colon" = x; then
60719    # Not in mixed or Windows style, start by that.
60720    new_path=`cmd //c echo $path`
60721  fi
60722
60723
60724  input_path="$new_path"
60725  # Check if we need to convert this using DOS-style short mode. If the path
60726  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60727  # take no chances and rewrite it.
60728  # Note: m4 eats our [], so we need to use [ and ] instead.
60729  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60730  if test "x$has_forbidden_chars" != x; then
60731    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60732    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60733  fi
60734
60735
60736  windows_path="$new_path"
60737  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60738    unix_path=`$CYGPATH -u "$windows_path"`
60739    new_path="$unix_path"
60740  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60741    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60742    new_path="$unix_path"
60743  fi
60744
60745  if test "x$path" != "x$new_path"; then
60746    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60747    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60748$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60749  fi
60750
60751  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60752  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60753
60754    else
60755      # We're on a unix platform. Hooray! :)
60756      path="$POTENTIAL_FREETYPE_LIB_PATH"
60757      has_space=`$ECHO "$path" | $GREP " "`
60758      if test "x$has_space" != x; then
60759        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60760$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60761        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60762      fi
60763
60764      # Use eval to expand a potential ~
60765      eval path="$path"
60766      if test ! -f "$path" && test ! -d "$path"; then
60767        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60768      fi
60769
60770      if test -d "$path"; then
60771        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60772      else
60773        dir="`$DIRNAME "$path"`"
60774        base="`$BASENAME "$path"`"
60775        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60776      fi
60777    fi
60778  fi
60779
60780
60781    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60782    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60783$as_echo_n "checking for freetype includes... " >&6; }
60784    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60785$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60786    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60787    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60788$as_echo_n "checking for freetype libraries... " >&6; }
60789    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60790$as_echo "$FREETYPE_LIB_PATH" >&6; }
60791  fi
60792
60793          fi
60794
60795          if test "x$OPENJDK_TARGET_OS" = xmacosx; then
60796            if test "x$FOUND_FREETYPE" != xyes; then
60797              # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
60798              FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
60799
60800  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60801  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60802  METHOD="well-known location"
60803
60804  # Let's start with an optimistic view of the world :-)
60805  FOUND_FREETYPE=yes
60806
60807  # First look for the canonical freetype main include file ft2build.h.
60808  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60809    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60810    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60811    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60812      # Fail.
60813      FOUND_FREETYPE=no
60814    fi
60815  fi
60816
60817  if test "x$FOUND_FREETYPE" = xyes; then
60818    # Include file found, let's continue the sanity check.
60819    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60820$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60821
60822    # Reset to default value
60823    FREETYPE_BASE_NAME=freetype
60824    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60825    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60826      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60827          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60828        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60829        # for the .6 version explicitly.
60830        FREETYPE_BASE_NAME=freetype.6
60831        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60832        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60833$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60834      else
60835        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60836$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60837        FOUND_FREETYPE=no
60838      fi
60839    else
60840      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60841        # On Windows, we will need both .lib and .dll file.
60842        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60843          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60844$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60845          FOUND_FREETYPE=no
60846        fi
60847      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60848          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60849        # Found lib in isa dir, use that instead.
60850        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60851        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60852$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60853      fi
60854    fi
60855  fi
60856
60857  if test "x$FOUND_FREETYPE" = xyes; then
60858
60859  # Only process if variable expands to non-empty
60860
60861  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60862    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60863
60864  # Input might be given as Windows format, start by converting to
60865  # unix format.
60866  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60867  new_path=`$CYGPATH -u "$path"`
60868
60869  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60870  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60871  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60872  # "foo.exe" is OK but "foo" is an error.
60873  #
60874  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60875  # It is also a way to make sure we got the proper file name for the real test later on.
60876  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60877  if test "x$test_shortpath" = x; then
60878    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60879$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60880    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60881  fi
60882
60883  # Call helper function which possibly converts this using DOS-style short mode.
60884  # If so, the updated path is stored in $new_path.
60885
60886  input_path="$new_path"
60887  # Check if we need to convert this using DOS-style short mode. If the path
60888  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60889  # take no chances and rewrite it.
60890  # Note: m4 eats our [], so we need to use [ and ] instead.
60891  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60892  if test "x$has_forbidden_chars" != x; then
60893    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60894    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60895    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60896    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60897      # Going to short mode and back again did indeed matter. Since short mode is
60898      # case insensitive, let's make it lowercase to improve readability.
60899      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60900      # Now convert it back to Unix-style (cygpath)
60901      input_path=`$CYGPATH -u "$shortmode_path"`
60902      new_path="$input_path"
60903    fi
60904  fi
60905
60906  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60907  if test "x$test_cygdrive_prefix" = x; then
60908    # As a simple fix, exclude /usr/bin since it's not a real path.
60909    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60910      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60911      # a path prefixed by /cygdrive for fixpath to work.
60912      new_path="$CYGWIN_ROOT_PATH$input_path"
60913    fi
60914  fi
60915
60916
60917  if test "x$path" != "x$new_path"; then
60918    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60919    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60920$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60921  fi
60922
60923    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60924
60925  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60926  has_colon=`$ECHO $path | $GREP ^.:`
60927  new_path="$path"
60928  if test "x$has_colon" = x; then
60929    # Not in mixed or Windows style, start by that.
60930    new_path=`cmd //c echo $path`
60931  fi
60932
60933
60934  input_path="$new_path"
60935  # Check if we need to convert this using DOS-style short mode. If the path
60936  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60937  # take no chances and rewrite it.
60938  # Note: m4 eats our [], so we need to use [ and ] instead.
60939  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60940  if test "x$has_forbidden_chars" != x; then
60941    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60942    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60943  fi
60944
60945
60946  windows_path="$new_path"
60947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60948    unix_path=`$CYGPATH -u "$windows_path"`
60949    new_path="$unix_path"
60950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60951    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60952    new_path="$unix_path"
60953  fi
60954
60955  if test "x$path" != "x$new_path"; then
60956    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60957    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60958$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60959  fi
60960
60961  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60962  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60963
60964    else
60965      # We're on a unix platform. Hooray! :)
60966      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60967      has_space=`$ECHO "$path" | $GREP " "`
60968      if test "x$has_space" != x; then
60969        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60970$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60971        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60972      fi
60973
60974      # Use eval to expand a potential ~
60975      eval path="$path"
60976      if test ! -f "$path" && test ! -d "$path"; then
60977        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60978      fi
60979
60980      if test -d "$path"; then
60981        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60982      else
60983        dir="`$DIRNAME "$path"`"
60984        base="`$BASENAME "$path"`"
60985        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60986      fi
60987    fi
60988  fi
60989
60990
60991  # Only process if variable expands to non-empty
60992
60993  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60994    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60995
60996  # Input might be given as Windows format, start by converting to
60997  # unix format.
60998  path="$POTENTIAL_FREETYPE_LIB_PATH"
60999  new_path=`$CYGPATH -u "$path"`
61000
61001  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61002  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61003  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61004  # "foo.exe" is OK but "foo" is an error.
61005  #
61006  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61007  # It is also a way to make sure we got the proper file name for the real test later on.
61008  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61009  if test "x$test_shortpath" = x; then
61010    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61011$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61012    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61013  fi
61014
61015  # Call helper function which possibly converts this using DOS-style short mode.
61016  # If so, the updated path is stored in $new_path.
61017
61018  input_path="$new_path"
61019  # Check if we need to convert this using DOS-style short mode. If the path
61020  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61021  # take no chances and rewrite it.
61022  # Note: m4 eats our [], so we need to use [ and ] instead.
61023  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61024  if test "x$has_forbidden_chars" != x; then
61025    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61026    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61027    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61028    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61029      # Going to short mode and back again did indeed matter. Since short mode is
61030      # case insensitive, let's make it lowercase to improve readability.
61031      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61032      # Now convert it back to Unix-style (cygpath)
61033      input_path=`$CYGPATH -u "$shortmode_path"`
61034      new_path="$input_path"
61035    fi
61036  fi
61037
61038  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61039  if test "x$test_cygdrive_prefix" = x; then
61040    # As a simple fix, exclude /usr/bin since it's not a real path.
61041    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61042      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61043      # a path prefixed by /cygdrive for fixpath to work.
61044      new_path="$CYGWIN_ROOT_PATH$input_path"
61045    fi
61046  fi
61047
61048
61049  if test "x$path" != "x$new_path"; then
61050    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61051    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61052$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61053  fi
61054
61055    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61056
61057  path="$POTENTIAL_FREETYPE_LIB_PATH"
61058  has_colon=`$ECHO $path | $GREP ^.:`
61059  new_path="$path"
61060  if test "x$has_colon" = x; then
61061    # Not in mixed or Windows style, start by that.
61062    new_path=`cmd //c echo $path`
61063  fi
61064
61065
61066  input_path="$new_path"
61067  # Check if we need to convert this using DOS-style short mode. If the path
61068  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61069  # take no chances and rewrite it.
61070  # Note: m4 eats our [], so we need to use [ and ] instead.
61071  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61072  if test "x$has_forbidden_chars" != x; then
61073    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61074    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61075  fi
61076
61077
61078  windows_path="$new_path"
61079  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61080    unix_path=`$CYGPATH -u "$windows_path"`
61081    new_path="$unix_path"
61082  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61083    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61084    new_path="$unix_path"
61085  fi
61086
61087  if test "x$path" != "x$new_path"; then
61088    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61089    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61090$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61091  fi
61092
61093  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61094  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61095
61096    else
61097      # We're on a unix platform. Hooray! :)
61098      path="$POTENTIAL_FREETYPE_LIB_PATH"
61099      has_space=`$ECHO "$path" | $GREP " "`
61100      if test "x$has_space" != x; then
61101        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61102$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61103        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61104      fi
61105
61106      # Use eval to expand a potential ~
61107      eval path="$path"
61108      if test ! -f "$path" && test ! -d "$path"; then
61109        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61110      fi
61111
61112      if test -d "$path"; then
61113        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61114      else
61115        dir="`$DIRNAME "$path"`"
61116        base="`$BASENAME "$path"`"
61117        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61118      fi
61119    fi
61120  fi
61121
61122
61123    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61124    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61125$as_echo_n "checking for freetype includes... " >&6; }
61126    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61127$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61128    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61129    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61130$as_echo_n "checking for freetype libraries... " >&6; }
61131    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61132$as_echo "$FREETYPE_LIB_PATH" >&6; }
61133  fi
61134
61135            fi
61136          fi
61137
61138          if test "x$FOUND_FREETYPE" != xyes; then
61139            FREETYPE_BASE_DIR="$SYSROOT/usr"
61140            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
61141
61142  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61143  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
61144  METHOD="well-known location"
61145
61146  # Let's start with an optimistic view of the world :-)
61147  FOUND_FREETYPE=yes
61148
61149  # First look for the canonical freetype main include file ft2build.h.
61150  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61151    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61152    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61153    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61154      # Fail.
61155      FOUND_FREETYPE=no
61156    fi
61157  fi
61158
61159  if test "x$FOUND_FREETYPE" = xyes; then
61160    # Include file found, let's continue the sanity check.
61161    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61162$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61163
61164    # Reset to default value
61165    FREETYPE_BASE_NAME=freetype
61166    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61167    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61168      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61169          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61170        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61171        # for the .6 version explicitly.
61172        FREETYPE_BASE_NAME=freetype.6
61173        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61174        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61175$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61176      else
61177        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61178$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61179        FOUND_FREETYPE=no
61180      fi
61181    else
61182      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61183        # On Windows, we will need both .lib and .dll file.
61184        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61185          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61186$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61187          FOUND_FREETYPE=no
61188        fi
61189      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61190          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61191        # Found lib in isa dir, use that instead.
61192        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61193        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61194$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61195      fi
61196    fi
61197  fi
61198
61199  if test "x$FOUND_FREETYPE" = xyes; then
61200
61201  # Only process if variable expands to non-empty
61202
61203  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61204    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61205
61206  # Input might be given as Windows format, start by converting to
61207  # unix format.
61208  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61209  new_path=`$CYGPATH -u "$path"`
61210
61211  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61212  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61213  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61214  # "foo.exe" is OK but "foo" is an error.
61215  #
61216  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61217  # It is also a way to make sure we got the proper file name for the real test later on.
61218  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61219  if test "x$test_shortpath" = x; then
61220    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61221$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61222    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61223  fi
61224
61225  # Call helper function which possibly converts this using DOS-style short mode.
61226  # If so, the updated path is stored in $new_path.
61227
61228  input_path="$new_path"
61229  # Check if we need to convert this using DOS-style short mode. If the path
61230  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61231  # take no chances and rewrite it.
61232  # Note: m4 eats our [], so we need to use [ and ] instead.
61233  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61234  if test "x$has_forbidden_chars" != x; then
61235    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61236    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61237    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61238    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61239      # Going to short mode and back again did indeed matter. Since short mode is
61240      # case insensitive, let's make it lowercase to improve readability.
61241      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61242      # Now convert it back to Unix-style (cygpath)
61243      input_path=`$CYGPATH -u "$shortmode_path"`
61244      new_path="$input_path"
61245    fi
61246  fi
61247
61248  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61249  if test "x$test_cygdrive_prefix" = x; then
61250    # As a simple fix, exclude /usr/bin since it's not a real path.
61251    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61252      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61253      # a path prefixed by /cygdrive for fixpath to work.
61254      new_path="$CYGWIN_ROOT_PATH$input_path"
61255    fi
61256  fi
61257
61258
61259  if test "x$path" != "x$new_path"; then
61260    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61261    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61262$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61263  fi
61264
61265    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61266
61267  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61268  has_colon=`$ECHO $path | $GREP ^.:`
61269  new_path="$path"
61270  if test "x$has_colon" = x; then
61271    # Not in mixed or Windows style, start by that.
61272    new_path=`cmd //c echo $path`
61273  fi
61274
61275
61276  input_path="$new_path"
61277  # Check if we need to convert this using DOS-style short mode. If the path
61278  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61279  # take no chances and rewrite it.
61280  # Note: m4 eats our [], so we need to use [ and ] instead.
61281  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61282  if test "x$has_forbidden_chars" != x; then
61283    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61284    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61285  fi
61286
61287
61288  windows_path="$new_path"
61289  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61290    unix_path=`$CYGPATH -u "$windows_path"`
61291    new_path="$unix_path"
61292  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61293    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61294    new_path="$unix_path"
61295  fi
61296
61297  if test "x$path" != "x$new_path"; then
61298    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61299    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61300$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61301  fi
61302
61303  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61304  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61305
61306    else
61307      # We're on a unix platform. Hooray! :)
61308      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61309      has_space=`$ECHO "$path" | $GREP " "`
61310      if test "x$has_space" != x; then
61311        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61312$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61313        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61314      fi
61315
61316      # Use eval to expand a potential ~
61317      eval path="$path"
61318      if test ! -f "$path" && test ! -d "$path"; then
61319        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61320      fi
61321
61322      if test -d "$path"; then
61323        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61324      else
61325        dir="`$DIRNAME "$path"`"
61326        base="`$BASENAME "$path"`"
61327        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61328      fi
61329    fi
61330  fi
61331
61332
61333  # Only process if variable expands to non-empty
61334
61335  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61336    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61337
61338  # Input might be given as Windows format, start by converting to
61339  # unix format.
61340  path="$POTENTIAL_FREETYPE_LIB_PATH"
61341  new_path=`$CYGPATH -u "$path"`
61342
61343  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61344  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61345  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61346  # "foo.exe" is OK but "foo" is an error.
61347  #
61348  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61349  # It is also a way to make sure we got the proper file name for the real test later on.
61350  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61351  if test "x$test_shortpath" = x; then
61352    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61353$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61354    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61355  fi
61356
61357  # Call helper function which possibly converts this using DOS-style short mode.
61358  # If so, the updated path is stored in $new_path.
61359
61360  input_path="$new_path"
61361  # Check if we need to convert this using DOS-style short mode. If the path
61362  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61363  # take no chances and rewrite it.
61364  # Note: m4 eats our [], so we need to use [ and ] instead.
61365  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61366  if test "x$has_forbidden_chars" != x; then
61367    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61368    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61369    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61370    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61371      # Going to short mode and back again did indeed matter. Since short mode is
61372      # case insensitive, let's make it lowercase to improve readability.
61373      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61374      # Now convert it back to Unix-style (cygpath)
61375      input_path=`$CYGPATH -u "$shortmode_path"`
61376      new_path="$input_path"
61377    fi
61378  fi
61379
61380  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61381  if test "x$test_cygdrive_prefix" = x; then
61382    # As a simple fix, exclude /usr/bin since it's not a real path.
61383    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61384      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61385      # a path prefixed by /cygdrive for fixpath to work.
61386      new_path="$CYGWIN_ROOT_PATH$input_path"
61387    fi
61388  fi
61389
61390
61391  if test "x$path" != "x$new_path"; then
61392    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61393    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61394$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61395  fi
61396
61397    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61398
61399  path="$POTENTIAL_FREETYPE_LIB_PATH"
61400  has_colon=`$ECHO $path | $GREP ^.:`
61401  new_path="$path"
61402  if test "x$has_colon" = x; then
61403    # Not in mixed or Windows style, start by that.
61404    new_path=`cmd //c echo $path`
61405  fi
61406
61407
61408  input_path="$new_path"
61409  # Check if we need to convert this using DOS-style short mode. If the path
61410  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61411  # take no chances and rewrite it.
61412  # Note: m4 eats our [], so we need to use [ and ] instead.
61413  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61414  if test "x$has_forbidden_chars" != x; then
61415    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61416    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61417  fi
61418
61419
61420  windows_path="$new_path"
61421  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61422    unix_path=`$CYGPATH -u "$windows_path"`
61423    new_path="$unix_path"
61424  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61425    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61426    new_path="$unix_path"
61427  fi
61428
61429  if test "x$path" != "x$new_path"; then
61430    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61431    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61432$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61433  fi
61434
61435  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61436  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61437
61438    else
61439      # We're on a unix platform. Hooray! :)
61440      path="$POTENTIAL_FREETYPE_LIB_PATH"
61441      has_space=`$ECHO "$path" | $GREP " "`
61442      if test "x$has_space" != x; then
61443        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61444$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61445        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61446      fi
61447
61448      # Use eval to expand a potential ~
61449      eval path="$path"
61450      if test ! -f "$path" && test ! -d "$path"; then
61451        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61452      fi
61453
61454      if test -d "$path"; then
61455        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61456      else
61457        dir="`$DIRNAME "$path"`"
61458        base="`$BASENAME "$path"`"
61459        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61460      fi
61461    fi
61462  fi
61463
61464
61465    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61466    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61467$as_echo_n "checking for freetype includes... " >&6; }
61468    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61469$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61470    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61471    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61472$as_echo_n "checking for freetype libraries... " >&6; }
61473    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61474$as_echo "$FREETYPE_LIB_PATH" >&6; }
61475  fi
61476
61477            else
61478
61479  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61480  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
61481  METHOD="well-known location"
61482
61483  # Let's start with an optimistic view of the world :-)
61484  FOUND_FREETYPE=yes
61485
61486  # First look for the canonical freetype main include file ft2build.h.
61487  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61488    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61489    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61490    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61491      # Fail.
61492      FOUND_FREETYPE=no
61493    fi
61494  fi
61495
61496  if test "x$FOUND_FREETYPE" = xyes; then
61497    # Include file found, let's continue the sanity check.
61498    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61499$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61500
61501    # Reset to default value
61502    FREETYPE_BASE_NAME=freetype
61503    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61504    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61505      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61506          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61507        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61508        # for the .6 version explicitly.
61509        FREETYPE_BASE_NAME=freetype.6
61510        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61511        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61512$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61513      else
61514        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61515$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61516        FOUND_FREETYPE=no
61517      fi
61518    else
61519      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61520        # On Windows, we will need both .lib and .dll file.
61521        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61522          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61523$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61524          FOUND_FREETYPE=no
61525        fi
61526      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61527          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61528        # Found lib in isa dir, use that instead.
61529        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61530        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61531$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61532      fi
61533    fi
61534  fi
61535
61536  if test "x$FOUND_FREETYPE" = xyes; then
61537
61538  # Only process if variable expands to non-empty
61539
61540  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61541    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61542
61543  # Input might be given as Windows format, start by converting to
61544  # unix format.
61545  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61546  new_path=`$CYGPATH -u "$path"`
61547
61548  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61549  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61550  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61551  # "foo.exe" is OK but "foo" is an error.
61552  #
61553  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61554  # It is also a way to make sure we got the proper file name for the real test later on.
61555  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61556  if test "x$test_shortpath" = x; then
61557    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61558$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61559    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61560  fi
61561
61562  # Call helper function which possibly converts this using DOS-style short mode.
61563  # If so, the updated path is stored in $new_path.
61564
61565  input_path="$new_path"
61566  # Check if we need to convert this using DOS-style short mode. If the path
61567  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61568  # take no chances and rewrite it.
61569  # Note: m4 eats our [], so we need to use [ and ] instead.
61570  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61571  if test "x$has_forbidden_chars" != x; then
61572    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61573    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61574    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61575    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61576      # Going to short mode and back again did indeed matter. Since short mode is
61577      # case insensitive, let's make it lowercase to improve readability.
61578      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61579      # Now convert it back to Unix-style (cygpath)
61580      input_path=`$CYGPATH -u "$shortmode_path"`
61581      new_path="$input_path"
61582    fi
61583  fi
61584
61585  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61586  if test "x$test_cygdrive_prefix" = x; then
61587    # As a simple fix, exclude /usr/bin since it's not a real path.
61588    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61589      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61590      # a path prefixed by /cygdrive for fixpath to work.
61591      new_path="$CYGWIN_ROOT_PATH$input_path"
61592    fi
61593  fi
61594
61595
61596  if test "x$path" != "x$new_path"; then
61597    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61598    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61599$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61600  fi
61601
61602    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61603
61604  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61605  has_colon=`$ECHO $path | $GREP ^.:`
61606  new_path="$path"
61607  if test "x$has_colon" = x; then
61608    # Not in mixed or Windows style, start by that.
61609    new_path=`cmd //c echo $path`
61610  fi
61611
61612
61613  input_path="$new_path"
61614  # Check if we need to convert this using DOS-style short mode. If the path
61615  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61616  # take no chances and rewrite it.
61617  # Note: m4 eats our [], so we need to use [ and ] instead.
61618  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61619  if test "x$has_forbidden_chars" != x; then
61620    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61621    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61622  fi
61623
61624
61625  windows_path="$new_path"
61626  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61627    unix_path=`$CYGPATH -u "$windows_path"`
61628    new_path="$unix_path"
61629  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61630    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61631    new_path="$unix_path"
61632  fi
61633
61634  if test "x$path" != "x$new_path"; then
61635    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61636    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61637$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61638  fi
61639
61640  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61641  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61642
61643    else
61644      # We're on a unix platform. Hooray! :)
61645      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61646      has_space=`$ECHO "$path" | $GREP " "`
61647      if test "x$has_space" != x; then
61648        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61649$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61650        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61651      fi
61652
61653      # Use eval to expand a potential ~
61654      eval path="$path"
61655      if test ! -f "$path" && test ! -d "$path"; then
61656        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61657      fi
61658
61659      if test -d "$path"; then
61660        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61661      else
61662        dir="`$DIRNAME "$path"`"
61663        base="`$BASENAME "$path"`"
61664        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61665      fi
61666    fi
61667  fi
61668
61669
61670  # Only process if variable expands to non-empty
61671
61672  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61673    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61674
61675  # Input might be given as Windows format, start by converting to
61676  # unix format.
61677  path="$POTENTIAL_FREETYPE_LIB_PATH"
61678  new_path=`$CYGPATH -u "$path"`
61679
61680  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61681  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61682  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61683  # "foo.exe" is OK but "foo" is an error.
61684  #
61685  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61686  # It is also a way to make sure we got the proper file name for the real test later on.
61687  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61688  if test "x$test_shortpath" = x; then
61689    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61690$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61691    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61692  fi
61693
61694  # Call helper function which possibly converts this using DOS-style short mode.
61695  # If so, the updated path is stored in $new_path.
61696
61697  input_path="$new_path"
61698  # Check if we need to convert this using DOS-style short mode. If the path
61699  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61700  # take no chances and rewrite it.
61701  # Note: m4 eats our [], so we need to use [ and ] instead.
61702  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61703  if test "x$has_forbidden_chars" != x; then
61704    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61705    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61706    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61707    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61708      # Going to short mode and back again did indeed matter. Since short mode is
61709      # case insensitive, let's make it lowercase to improve readability.
61710      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61711      # Now convert it back to Unix-style (cygpath)
61712      input_path=`$CYGPATH -u "$shortmode_path"`
61713      new_path="$input_path"
61714    fi
61715  fi
61716
61717  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61718  if test "x$test_cygdrive_prefix" = x; then
61719    # As a simple fix, exclude /usr/bin since it's not a real path.
61720    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61721      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61722      # a path prefixed by /cygdrive for fixpath to work.
61723      new_path="$CYGWIN_ROOT_PATH$input_path"
61724    fi
61725  fi
61726
61727
61728  if test "x$path" != "x$new_path"; then
61729    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61730    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61731$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61732  fi
61733
61734    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61735
61736  path="$POTENTIAL_FREETYPE_LIB_PATH"
61737  has_colon=`$ECHO $path | $GREP ^.:`
61738  new_path="$path"
61739  if test "x$has_colon" = x; then
61740    # Not in mixed or Windows style, start by that.
61741    new_path=`cmd //c echo $path`
61742  fi
61743
61744
61745  input_path="$new_path"
61746  # Check if we need to convert this using DOS-style short mode. If the path
61747  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61748  # take no chances and rewrite it.
61749  # Note: m4 eats our [], so we need to use [ and ] instead.
61750  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61751  if test "x$has_forbidden_chars" != x; then
61752    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61753    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61754  fi
61755
61756
61757  windows_path="$new_path"
61758  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61759    unix_path=`$CYGPATH -u "$windows_path"`
61760    new_path="$unix_path"
61761  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61762    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61763    new_path="$unix_path"
61764  fi
61765
61766  if test "x$path" != "x$new_path"; then
61767    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61768    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61769$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61770  fi
61771
61772  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61773  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61774
61775    else
61776      # We're on a unix platform. Hooray! :)
61777      path="$POTENTIAL_FREETYPE_LIB_PATH"
61778      has_space=`$ECHO "$path" | $GREP " "`
61779      if test "x$has_space" != x; then
61780        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61781$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61782        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61783      fi
61784
61785      # Use eval to expand a potential ~
61786      eval path="$path"
61787      if test ! -f "$path" && test ! -d "$path"; then
61788        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61789      fi
61790
61791      if test -d "$path"; then
61792        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61793      else
61794        dir="`$DIRNAME "$path"`"
61795        base="`$BASENAME "$path"`"
61796        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61797      fi
61798    fi
61799  fi
61800
61801
61802    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61803    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61804$as_echo_n "checking for freetype includes... " >&6; }
61805    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61806$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61807    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61808    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61809$as_echo_n "checking for freetype libraries... " >&6; }
61810    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61811$as_echo "$FREETYPE_LIB_PATH" >&6; }
61812  fi
61813
61814              if test "x$FOUND_FREETYPE" != xyes; then
61815
61816  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61817  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
61818  METHOD="well-known location"
61819
61820  # Let's start with an optimistic view of the world :-)
61821  FOUND_FREETYPE=yes
61822
61823  # First look for the canonical freetype main include file ft2build.h.
61824  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61825    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61826    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61827    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61828      # Fail.
61829      FOUND_FREETYPE=no
61830    fi
61831  fi
61832
61833  if test "x$FOUND_FREETYPE" = xyes; then
61834    # Include file found, let's continue the sanity check.
61835    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61836$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61837
61838    # Reset to default value
61839    FREETYPE_BASE_NAME=freetype
61840    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61841    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61842      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61843          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61844        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61845        # for the .6 version explicitly.
61846        FREETYPE_BASE_NAME=freetype.6
61847        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61848        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61849$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61850      else
61851        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61852$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61853        FOUND_FREETYPE=no
61854      fi
61855    else
61856      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61857        # On Windows, we will need both .lib and .dll file.
61858        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61859          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61860$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61861          FOUND_FREETYPE=no
61862        fi
61863      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61864          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61865        # Found lib in isa dir, use that instead.
61866        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61867        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61868$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61869      fi
61870    fi
61871  fi
61872
61873  if test "x$FOUND_FREETYPE" = xyes; then
61874
61875  # Only process if variable expands to non-empty
61876
61877  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61878    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61879
61880  # Input might be given as Windows format, start by converting to
61881  # unix format.
61882  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61883  new_path=`$CYGPATH -u "$path"`
61884
61885  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61886  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61887  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61888  # "foo.exe" is OK but "foo" is an error.
61889  #
61890  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61891  # It is also a way to make sure we got the proper file name for the real test later on.
61892  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61893  if test "x$test_shortpath" = x; then
61894    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61895$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61896    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61897  fi
61898
61899  # Call helper function which possibly converts this using DOS-style short mode.
61900  # If so, the updated path is stored in $new_path.
61901
61902  input_path="$new_path"
61903  # Check if we need to convert this using DOS-style short mode. If the path
61904  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61905  # take no chances and rewrite it.
61906  # Note: m4 eats our [], so we need to use [ and ] instead.
61907  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61908  if test "x$has_forbidden_chars" != x; then
61909    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61910    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61911    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61912    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61913      # Going to short mode and back again did indeed matter. Since short mode is
61914      # case insensitive, let's make it lowercase to improve readability.
61915      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61916      # Now convert it back to Unix-style (cygpath)
61917      input_path=`$CYGPATH -u "$shortmode_path"`
61918      new_path="$input_path"
61919    fi
61920  fi
61921
61922  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61923  if test "x$test_cygdrive_prefix" = x; then
61924    # As a simple fix, exclude /usr/bin since it's not a real path.
61925    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61926      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61927      # a path prefixed by /cygdrive for fixpath to work.
61928      new_path="$CYGWIN_ROOT_PATH$input_path"
61929    fi
61930  fi
61931
61932
61933  if test "x$path" != "x$new_path"; then
61934    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61935    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61936$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61937  fi
61938
61939    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61940
61941  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61942  has_colon=`$ECHO $path | $GREP ^.:`
61943  new_path="$path"
61944  if test "x$has_colon" = x; then
61945    # Not in mixed or Windows style, start by that.
61946    new_path=`cmd //c echo $path`
61947  fi
61948
61949
61950  input_path="$new_path"
61951  # Check if we need to convert this using DOS-style short mode. If the path
61952  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61953  # take no chances and rewrite it.
61954  # Note: m4 eats our [], so we need to use [ and ] instead.
61955  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61956  if test "x$has_forbidden_chars" != x; then
61957    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61958    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61959  fi
61960
61961
61962  windows_path="$new_path"
61963  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61964    unix_path=`$CYGPATH -u "$windows_path"`
61965    new_path="$unix_path"
61966  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61967    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61968    new_path="$unix_path"
61969  fi
61970
61971  if test "x$path" != "x$new_path"; then
61972    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61973    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61974$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61975  fi
61976
61977  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61978  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61979
61980    else
61981      # We're on a unix platform. Hooray! :)
61982      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61983      has_space=`$ECHO "$path" | $GREP " "`
61984      if test "x$has_space" != x; then
61985        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61986$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61987        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61988      fi
61989
61990      # Use eval to expand a potential ~
61991      eval path="$path"
61992      if test ! -f "$path" && test ! -d "$path"; then
61993        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61994      fi
61995
61996      if test -d "$path"; then
61997        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61998      else
61999        dir="`$DIRNAME "$path"`"
62000        base="`$BASENAME "$path"`"
62001        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62002      fi
62003    fi
62004  fi
62005
62006
62007  # Only process if variable expands to non-empty
62008
62009  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62010    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62011
62012  # Input might be given as Windows format, start by converting to
62013  # unix format.
62014  path="$POTENTIAL_FREETYPE_LIB_PATH"
62015  new_path=`$CYGPATH -u "$path"`
62016
62017  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62018  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62019  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62020  # "foo.exe" is OK but "foo" is an error.
62021  #
62022  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62023  # It is also a way to make sure we got the proper file name for the real test later on.
62024  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62025  if test "x$test_shortpath" = x; then
62026    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62027$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62028    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62029  fi
62030
62031  # Call helper function which possibly converts this using DOS-style short mode.
62032  # If so, the updated path is stored in $new_path.
62033
62034  input_path="$new_path"
62035  # Check if we need to convert this using DOS-style short mode. If the path
62036  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62037  # take no chances and rewrite it.
62038  # Note: m4 eats our [], so we need to use [ and ] instead.
62039  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62040  if test "x$has_forbidden_chars" != x; then
62041    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62042    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62043    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62044    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62045      # Going to short mode and back again did indeed matter. Since short mode is
62046      # case insensitive, let's make it lowercase to improve readability.
62047      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62048      # Now convert it back to Unix-style (cygpath)
62049      input_path=`$CYGPATH -u "$shortmode_path"`
62050      new_path="$input_path"
62051    fi
62052  fi
62053
62054  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62055  if test "x$test_cygdrive_prefix" = x; then
62056    # As a simple fix, exclude /usr/bin since it's not a real path.
62057    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62058      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62059      # a path prefixed by /cygdrive for fixpath to work.
62060      new_path="$CYGWIN_ROOT_PATH$input_path"
62061    fi
62062  fi
62063
62064
62065  if test "x$path" != "x$new_path"; then
62066    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62067    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62068$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62069  fi
62070
62071    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62072
62073  path="$POTENTIAL_FREETYPE_LIB_PATH"
62074  has_colon=`$ECHO $path | $GREP ^.:`
62075  new_path="$path"
62076  if test "x$has_colon" = x; then
62077    # Not in mixed or Windows style, start by that.
62078    new_path=`cmd //c echo $path`
62079  fi
62080
62081
62082  input_path="$new_path"
62083  # Check if we need to convert this using DOS-style short mode. If the path
62084  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62085  # take no chances and rewrite it.
62086  # Note: m4 eats our [], so we need to use [ and ] instead.
62087  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62088  if test "x$has_forbidden_chars" != x; then
62089    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62090    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62091  fi
62092
62093
62094  windows_path="$new_path"
62095  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62096    unix_path=`$CYGPATH -u "$windows_path"`
62097    new_path="$unix_path"
62098  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62099    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62100    new_path="$unix_path"
62101  fi
62102
62103  if test "x$path" != "x$new_path"; then
62104    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62105    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62106$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62107  fi
62108
62109  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62110  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62111
62112    else
62113      # We're on a unix platform. Hooray! :)
62114      path="$POTENTIAL_FREETYPE_LIB_PATH"
62115      has_space=`$ECHO "$path" | $GREP " "`
62116      if test "x$has_space" != x; then
62117        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62118$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62119        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62120      fi
62121
62122      # Use eval to expand a potential ~
62123      eval path="$path"
62124      if test ! -f "$path" && test ! -d "$path"; then
62125        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62126      fi
62127
62128      if test -d "$path"; then
62129        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62130      else
62131        dir="`$DIRNAME "$path"`"
62132        base="`$BASENAME "$path"`"
62133        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62134      fi
62135    fi
62136  fi
62137
62138
62139    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62140    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62141$as_echo_n "checking for freetype includes... " >&6; }
62142    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62143$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62144    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62145    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62146$as_echo_n "checking for freetype libraries... " >&6; }
62147    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62148$as_echo "$FREETYPE_LIB_PATH" >&6; }
62149  fi
62150
62151              fi
62152            fi
62153          fi
62154        fi
62155      fi # end check in well-known locations
62156
62157      if test "x$FOUND_FREETYPE" != xyes; then
62158
62159  # Print a helpful message on how to acquire the necessary build dependency.
62160  # freetype is the help tag: freetype, cups, alsa etc
62161  MISSING_DEPENDENCY=freetype
62162
62163  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62164    cygwin_help $MISSING_DEPENDENCY
62165  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62166    msys_help $MISSING_DEPENDENCY
62167  else
62168    PKGHANDLER_COMMAND=
62169
62170    case $PKGHANDLER in
62171      apt-get)
62172        apt_help     $MISSING_DEPENDENCY ;;
62173      yum)
62174        yum_help     $MISSING_DEPENDENCY ;;
62175      port)
62176        port_help    $MISSING_DEPENDENCY ;;
62177      pkgutil)
62178        pkgutil_help $MISSING_DEPENDENCY ;;
62179      pkgadd)
62180        pkgadd_help  $MISSING_DEPENDENCY ;;
62181    esac
62182
62183    if test "x$PKGHANDLER_COMMAND" != x; then
62184      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62185    fi
62186  fi
62187
62188        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
62189      fi
62190    fi # end user specified settings
62191
62192    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
62193    if test "x$FREETYPE_CFLAGS" = x; then
62194
62195  # Only process if variable expands to non-empty
62196
62197  if test "x$FREETYPE_INCLUDE_PATH" != x; then
62198    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62199
62200  # Input might be given as Windows format, start by converting to
62201  # unix format.
62202  path="$FREETYPE_INCLUDE_PATH"
62203  new_path=`$CYGPATH -u "$path"`
62204
62205  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62206  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62207  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62208  # "foo.exe" is OK but "foo" is an error.
62209  #
62210  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62211  # It is also a way to make sure we got the proper file name for the real test later on.
62212  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62213  if test "x$test_shortpath" = x; then
62214    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62215$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62216    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
62217  fi
62218
62219  # Call helper function which possibly converts this using DOS-style short mode.
62220  # If so, the updated path is stored in $new_path.
62221
62222  input_path="$new_path"
62223  # Check if we need to convert this using DOS-style short mode. If the path
62224  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62225  # take no chances and rewrite it.
62226  # Note: m4 eats our [], so we need to use [ and ] instead.
62227  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62228  if test "x$has_forbidden_chars" != x; then
62229    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62230    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62231    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62232    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62233      # Going to short mode and back again did indeed matter. Since short mode is
62234      # case insensitive, let's make it lowercase to improve readability.
62235      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62236      # Now convert it back to Unix-style (cygpath)
62237      input_path=`$CYGPATH -u "$shortmode_path"`
62238      new_path="$input_path"
62239    fi
62240  fi
62241
62242  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62243  if test "x$test_cygdrive_prefix" = x; then
62244    # As a simple fix, exclude /usr/bin since it's not a real path.
62245    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62246      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62247      # a path prefixed by /cygdrive for fixpath to work.
62248      new_path="$CYGWIN_ROOT_PATH$input_path"
62249    fi
62250  fi
62251
62252
62253  if test "x$path" != "x$new_path"; then
62254    FREETYPE_INCLUDE_PATH="$new_path"
62255    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62256$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62257  fi
62258
62259    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62260
62261  path="$FREETYPE_INCLUDE_PATH"
62262  has_colon=`$ECHO $path | $GREP ^.:`
62263  new_path="$path"
62264  if test "x$has_colon" = x; then
62265    # Not in mixed or Windows style, start by that.
62266    new_path=`cmd //c echo $path`
62267  fi
62268
62269
62270  input_path="$new_path"
62271  # Check if we need to convert this using DOS-style short mode. If the path
62272  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62273  # take no chances and rewrite it.
62274  # Note: m4 eats our [], so we need to use [ and ] instead.
62275  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62276  if test "x$has_forbidden_chars" != x; then
62277    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62278    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62279  fi
62280
62281
62282  windows_path="$new_path"
62283  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62284    unix_path=`$CYGPATH -u "$windows_path"`
62285    new_path="$unix_path"
62286  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62287    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62288    new_path="$unix_path"
62289  fi
62290
62291  if test "x$path" != "x$new_path"; then
62292    FREETYPE_INCLUDE_PATH="$new_path"
62293    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62294$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62295  fi
62296
62297  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62298  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62299
62300    else
62301      # We're on a unix platform. Hooray! :)
62302      path="$FREETYPE_INCLUDE_PATH"
62303      has_space=`$ECHO "$path" | $GREP " "`
62304      if test "x$has_space" != x; then
62305        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62306$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62307        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62308      fi
62309
62310      # Use eval to expand a potential ~
62311      eval path="$path"
62312      if test ! -f "$path" && test ! -d "$path"; then
62313        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62314      fi
62315
62316      if test -d "$path"; then
62317        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62318      else
62319        dir="`$DIRNAME "$path"`"
62320        base="`$BASENAME "$path"`"
62321        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62322      fi
62323    fi
62324  fi
62325
62326      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
62327        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
62328      else
62329        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
62330      fi
62331    fi
62332
62333    if test "x$FREETYPE_LIBS" = x; then
62334
62335  # Only process if variable expands to non-empty
62336
62337  if test "x$FREETYPE_LIB_PATH" != x; then
62338    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62339
62340  # Input might be given as Windows format, start by converting to
62341  # unix format.
62342  path="$FREETYPE_LIB_PATH"
62343  new_path=`$CYGPATH -u "$path"`
62344
62345  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62346  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62347  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62348  # "foo.exe" is OK but "foo" is an error.
62349  #
62350  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62351  # It is also a way to make sure we got the proper file name for the real test later on.
62352  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62353  if test "x$test_shortpath" = x; then
62354    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62355$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62356    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
62357  fi
62358
62359  # Call helper function which possibly converts this using DOS-style short mode.
62360  # If so, the updated path is stored in $new_path.
62361
62362  input_path="$new_path"
62363  # Check if we need to convert this using DOS-style short mode. If the path
62364  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62365  # take no chances and rewrite it.
62366  # Note: m4 eats our [], so we need to use [ and ] instead.
62367  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62368  if test "x$has_forbidden_chars" != x; then
62369    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62370    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62371    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62372    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62373      # Going to short mode and back again did indeed matter. Since short mode is
62374      # case insensitive, let's make it lowercase to improve readability.
62375      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62376      # Now convert it back to Unix-style (cygpath)
62377      input_path=`$CYGPATH -u "$shortmode_path"`
62378      new_path="$input_path"
62379    fi
62380  fi
62381
62382  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62383  if test "x$test_cygdrive_prefix" = x; then
62384    # As a simple fix, exclude /usr/bin since it's not a real path.
62385    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62386      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62387      # a path prefixed by /cygdrive for fixpath to work.
62388      new_path="$CYGWIN_ROOT_PATH$input_path"
62389    fi
62390  fi
62391
62392
62393  if test "x$path" != "x$new_path"; then
62394    FREETYPE_LIB_PATH="$new_path"
62395    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62396$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62397  fi
62398
62399    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62400
62401  path="$FREETYPE_LIB_PATH"
62402  has_colon=`$ECHO $path | $GREP ^.:`
62403  new_path="$path"
62404  if test "x$has_colon" = x; then
62405    # Not in mixed or Windows style, start by that.
62406    new_path=`cmd //c echo $path`
62407  fi
62408
62409
62410  input_path="$new_path"
62411  # Check if we need to convert this using DOS-style short mode. If the path
62412  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62413  # take no chances and rewrite it.
62414  # Note: m4 eats our [], so we need to use [ and ] instead.
62415  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62416  if test "x$has_forbidden_chars" != x; then
62417    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62418    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62419  fi
62420
62421
62422  windows_path="$new_path"
62423  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62424    unix_path=`$CYGPATH -u "$windows_path"`
62425    new_path="$unix_path"
62426  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62427    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62428    new_path="$unix_path"
62429  fi
62430
62431  if test "x$path" != "x$new_path"; then
62432    FREETYPE_LIB_PATH="$new_path"
62433    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62434$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62435  fi
62436
62437  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62438  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62439
62440    else
62441      # We're on a unix platform. Hooray! :)
62442      path="$FREETYPE_LIB_PATH"
62443      has_space=`$ECHO "$path" | $GREP " "`
62444      if test "x$has_space" != x; then
62445        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62446$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62447        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62448      fi
62449
62450      # Use eval to expand a potential ~
62451      eval path="$path"
62452      if test ! -f "$path" && test ! -d "$path"; then
62453        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62454      fi
62455
62456      if test -d "$path"; then
62457        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62458      else
62459        dir="`$DIRNAME "$path"`"
62460        base="`$BASENAME "$path"`"
62461        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62462      fi
62463    fi
62464  fi
62465
62466      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62467        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
62468      else
62469        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
62470      fi
62471    fi
62472
62473    # Try to compile it
62474    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
62475$as_echo_n "checking if we can compile and link with freetype... " >&6; }
62476    ac_ext=cpp
62477ac_cpp='$CXXCPP $CPPFLAGS'
62478ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62479ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62480ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62481
62482    PREV_CXXCFLAGS="$CXXFLAGS"
62483    PREV_LIBS="$LIBS"
62484    PREV_CXX="$CXX"
62485    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
62486    LIBS="$LIBS $FREETYPE_LIBS"
62487    CXX="$FIXPATH $CXX"
62488    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62489/* end confdefs.h.  */
62490
62491          #include<ft2build.h>
62492          #include FT_FREETYPE_H
62493          int main () {
62494            FT_Init_FreeType(NULL);
62495            return 0;
62496          }
62497
62498_ACEOF
62499if ac_fn_cxx_try_link "$LINENO"; then :
62500
62501          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62502$as_echo "yes" >&6; }
62503
62504else
62505
62506          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62507$as_echo "no" >&6; }
62508          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
62509$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
62510          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
62511$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
62512
62513
62514  # Print a helpful message on how to acquire the necessary build dependency.
62515  # freetype is the help tag: freetype, cups, alsa etc
62516  MISSING_DEPENDENCY=freetype
62517
62518  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62519    cygwin_help $MISSING_DEPENDENCY
62520  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62521    msys_help $MISSING_DEPENDENCY
62522  else
62523    PKGHANDLER_COMMAND=
62524
62525    case $PKGHANDLER in
62526      apt-get)
62527        apt_help     $MISSING_DEPENDENCY ;;
62528      yum)
62529        yum_help     $MISSING_DEPENDENCY ;;
62530      port)
62531        port_help    $MISSING_DEPENDENCY ;;
62532      pkgutil)
62533        pkgutil_help $MISSING_DEPENDENCY ;;
62534      pkgadd)
62535        pkgadd_help  $MISSING_DEPENDENCY ;;
62536    esac
62537
62538    if test "x$PKGHANDLER_COMMAND" != x; then
62539      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62540    fi
62541  fi
62542
62543
62544          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
62545
62546
62547fi
62548rm -f core conftest.err conftest.$ac_objext \
62549    conftest$ac_exeext conftest.$ac_ext
62550    CXXCFLAGS="$PREV_CXXFLAGS"
62551    LIBS="$PREV_LIBS"
62552    CXX="$PREV_CXX"
62553    ac_ext=cpp
62554ac_cpp='$CXXCPP $CPPFLAGS'
62555ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62556ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62557ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62558
62559
62560    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
62561$as_echo_n "checking if we should bundle freetype... " >&6; }
62562    if test "x$BUNDLE_FREETYPE" = xyes; then
62563      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
62564    fi
62565    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
62566$as_echo "$BUNDLE_FREETYPE" >&6; }
62567
62568  fi # end freetype needed
62569
62570
62571
62572
62573
62574
62575
62576# Check whether --with-alsa was given.
62577if test "${with_alsa+set}" = set; then :
62578  withval=$with_alsa;
62579fi
62580
62581
62582# Check whether --with-alsa-include was given.
62583if test "${with_alsa_include+set}" = set; then :
62584  withval=$with_alsa_include;
62585fi
62586
62587
62588# Check whether --with-alsa-lib was given.
62589if test "${with_alsa_lib+set}" = set; then :
62590  withval=$with_alsa_lib;
62591fi
62592
62593
62594  if test "x$NEEDS_LIB_ALSA" = xfalse; then
62595    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
62596        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
62597        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
62598      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
62599$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
62600    fi
62601    ALSA_CFLAGS=
62602    ALSA_LIBS=
62603  else
62604    ALSA_FOUND=no
62605
62606    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
62607      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
62608    fi
62609
62610    if test "x${with_alsa}" != x; then
62611      ALSA_LIBS="-L${with_alsa}/lib -lasound"
62612      ALSA_CFLAGS="-I${with_alsa}/include"
62613      ALSA_FOUND=yes
62614    fi
62615    if test "x${with_alsa_include}" != x; then
62616      ALSA_CFLAGS="-I${with_alsa_include}"
62617      ALSA_FOUND=yes
62618    fi
62619    if test "x${with_alsa_lib}" != x; then
62620      ALSA_LIBS="-L${with_alsa_lib} -lasound"
62621      ALSA_FOUND=yes
62622    fi
62623    # Do not try pkg-config if we have a sysroot set.
62624    if test "x$SYSROOT" = x; then
62625      if test "x$ALSA_FOUND" = xno; then
62626
62627pkg_failed=no
62628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
62629$as_echo_n "checking for ALSA... " >&6; }
62630
62631if test -n "$ALSA_CFLAGS"; then
62632    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
62633 elif test -n "$PKG_CONFIG"; then
62634    if test -n "$PKG_CONFIG" && \
62635    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62636  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62637  ac_status=$?
62638  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62639  test $ac_status = 0; }; then
62640  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
62641else
62642  pkg_failed=yes
62643fi
62644 else
62645    pkg_failed=untried
62646fi
62647if test -n "$ALSA_LIBS"; then
62648    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
62649 elif test -n "$PKG_CONFIG"; then
62650    if test -n "$PKG_CONFIG" && \
62651    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62652  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62653  ac_status=$?
62654  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62655  test $ac_status = 0; }; then
62656  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
62657else
62658  pkg_failed=yes
62659fi
62660 else
62661    pkg_failed=untried
62662fi
62663
62664
62665
62666if test $pkg_failed = yes; then
62667
62668if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62669        _pkg_short_errors_supported=yes
62670else
62671        _pkg_short_errors_supported=no
62672fi
62673        if test $_pkg_short_errors_supported = yes; then
62674	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
62675        else
62676	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
62677        fi
62678	# Put the nasty error message in config.log where it belongs
62679	echo "$ALSA_PKG_ERRORS" >&5
62680
62681	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62682$as_echo "no" >&6; }
62683                ALSA_FOUND=no
62684elif test $pkg_failed = untried; then
62685	ALSA_FOUND=no
62686else
62687	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
62688	ALSA_LIBS=$pkg_cv_ALSA_LIBS
62689        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62690$as_echo "yes" >&6; }
62691	ALSA_FOUND=yes
62692fi
62693      fi
62694    fi
62695    if test "x$ALSA_FOUND" = xno; then
62696      for ac_header in alsa/asoundlib.h
62697do :
62698  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
62699if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
62700  cat >>confdefs.h <<_ACEOF
62701#define HAVE_ALSA_ASOUNDLIB_H 1
62702_ACEOF
62703
62704            ALSA_FOUND=yes
62705            ALSA_CFLAGS=-Iignoreme
62706            ALSA_LIBS=-lasound
62707            DEFAULT_ALSA=yes
62708
62709else
62710  ALSA_FOUND=no
62711
62712fi
62713
62714done
62715
62716    fi
62717    if test "x$ALSA_FOUND" = xno; then
62718
62719  # Print a helpful message on how to acquire the necessary build dependency.
62720  # alsa is the help tag: freetype, cups, alsa etc
62721  MISSING_DEPENDENCY=alsa
62722
62723  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62724    cygwin_help $MISSING_DEPENDENCY
62725  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62726    msys_help $MISSING_DEPENDENCY
62727  else
62728    PKGHANDLER_COMMAND=
62729
62730    case $PKGHANDLER in
62731      apt-get)
62732        apt_help     $MISSING_DEPENDENCY ;;
62733      yum)
62734        yum_help     $MISSING_DEPENDENCY ;;
62735      port)
62736        port_help    $MISSING_DEPENDENCY ;;
62737      pkgutil)
62738        pkgutil_help $MISSING_DEPENDENCY ;;
62739      pkgadd)
62740        pkgadd_help  $MISSING_DEPENDENCY ;;
62741    esac
62742
62743    if test "x$PKGHANDLER_COMMAND" != x; then
62744      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62745    fi
62746  fi
62747
62748      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
62749    fi
62750  fi
62751
62752
62753
62754
62755
62756
62757# Check whether --with-libffi was given.
62758if test "${with_libffi+set}" = set; then :
62759  withval=$with_libffi;
62760fi
62761
62762
62763# Check whether --with-libffi-include was given.
62764if test "${with_libffi_include+set}" = set; then :
62765  withval=$with_libffi_include;
62766fi
62767
62768
62769# Check whether --with-libffi-lib was given.
62770if test "${with_libffi_lib+set}" = set; then :
62771  withval=$with_libffi_lib;
62772fi
62773
62774
62775  if test "x$NEEDS_LIB_FFI" = xfalse; then
62776    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
62777        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
62778        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
62779      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
62780$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
62781    fi
62782    LIBFFI_CFLAGS=
62783    LIBFFI_LIBS=
62784  else
62785    LIBFFI_FOUND=no
62786
62787    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
62788      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
62789    fi
62790
62791    if test "x${with_libffi}" != x; then
62792      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
62793      LIBFFI_CFLAGS="-I${with_libffi}/include"
62794      LIBFFI_FOUND=yes
62795    fi
62796    if test "x${with_libffi_include}" != x; then
62797      LIBFFI_CFLAGS="-I${with_libffi_include}"
62798      LIBFFI_FOUND=yes
62799    fi
62800    if test "x${with_libffi_lib}" != x; then
62801      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
62802      LIBFFI_FOUND=yes
62803    fi
62804    # Do not try pkg-config if we have a sysroot set.
62805    if test "x$SYSROOT" = x; then
62806      if test "x$LIBFFI_FOUND" = xno; then
62807        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
62808
62809pkg_failed=no
62810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
62811$as_echo_n "checking for LIBFFI... " >&6; }
62812
62813if test -n "$LIBFFI_CFLAGS"; then
62814    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
62815 elif test -n "$PKG_CONFIG"; then
62816    if test -n "$PKG_CONFIG" && \
62817    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
62818  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
62819  ac_status=$?
62820  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62821  test $ac_status = 0; }; then
62822  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
62823else
62824  pkg_failed=yes
62825fi
62826 else
62827    pkg_failed=untried
62828fi
62829if test -n "$LIBFFI_LIBS"; then
62830    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
62831 elif test -n "$PKG_CONFIG"; then
62832    if test -n "$PKG_CONFIG" && \
62833    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
62834  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
62835  ac_status=$?
62836  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62837  test $ac_status = 0; }; then
62838  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
62839else
62840  pkg_failed=yes
62841fi
62842 else
62843    pkg_failed=untried
62844fi
62845
62846
62847
62848if test $pkg_failed = yes; then
62849
62850if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62851        _pkg_short_errors_supported=yes
62852else
62853        _pkg_short_errors_supported=no
62854fi
62855        if test $_pkg_short_errors_supported = yes; then
62856	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
62857        else
62858	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
62859        fi
62860	# Put the nasty error message in config.log where it belongs
62861	echo "$LIBFFI_PKG_ERRORS" >&5
62862
62863	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62864$as_echo "no" >&6; }
62865                LIBFFI_FOUND=no
62866elif test $pkg_failed = untried; then
62867	LIBFFI_FOUND=no
62868else
62869	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
62870	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
62871        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62872$as_echo "yes" >&6; }
62873	LIBFFI_FOUND=yes
62874fi
62875      fi
62876    fi
62877    if test "x$LIBFFI_FOUND" = xno; then
62878      for ac_header in ffi.h
62879do :
62880  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
62881if test "x$ac_cv_header_ffi_h" = xyes; then :
62882  cat >>confdefs.h <<_ACEOF
62883#define HAVE_FFI_H 1
62884_ACEOF
62885
62886            LIBFFI_FOUND=yes
62887            LIBFFI_CFLAGS=
62888            LIBFFI_LIBS=-lffi
62889
62890else
62891  LIBFFI_FOUND=no
62892
62893fi
62894
62895done
62896
62897    fi
62898    if test "x$LIBFFI_FOUND" = xno; then
62899
62900  # Print a helpful message on how to acquire the necessary build dependency.
62901  # ffi is the help tag: freetype, cups, alsa etc
62902  MISSING_DEPENDENCY=ffi
62903
62904  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62905    cygwin_help $MISSING_DEPENDENCY
62906  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62907    msys_help $MISSING_DEPENDENCY
62908  else
62909    PKGHANDLER_COMMAND=
62910
62911    case $PKGHANDLER in
62912      apt-get)
62913        apt_help     $MISSING_DEPENDENCY ;;
62914      yum)
62915        yum_help     $MISSING_DEPENDENCY ;;
62916      port)
62917        port_help    $MISSING_DEPENDENCY ;;
62918      pkgutil)
62919        pkgutil_help $MISSING_DEPENDENCY ;;
62920      pkgadd)
62921        pkgadd_help  $MISSING_DEPENDENCY ;;
62922    esac
62923
62924    if test "x$PKGHANDLER_COMMAND" != x; then
62925      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62926    fi
62927  fi
62928
62929      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
62930    fi
62931
62932    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
62933$as_echo_n "checking if libffi works... " >&6; }
62934    ac_ext=c
62935ac_cpp='$CPP $CPPFLAGS'
62936ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62937ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62938ac_compiler_gnu=$ac_cv_c_compiler_gnu
62939
62940    OLD_CFLAGS="$CFLAGS"
62941    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
62942    OLD_LIBS="$LIBS"
62943    LIBS="$LIBS $LIBFFI_LIBS"
62944    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62945/* end confdefs.h.  */
62946#include <ffi.h>
62947int
62948main ()
62949{
62950
62951          ffi_call(NULL, NULL, NULL, NULL);
62952          return 0;
62953
62954  ;
62955  return 0;
62956}
62957_ACEOF
62958if ac_fn_c_try_link "$LINENO"; then :
62959  LIBFFI_WORKS=yes
62960else
62961  LIBFFI_WORKS=no
62962
62963fi
62964rm -f core conftest.err conftest.$ac_objext \
62965    conftest$ac_exeext conftest.$ac_ext
62966    CFLAGS="$OLD_CFLAGS"
62967    LIBS="$OLD_LIBS"
62968    ac_ext=cpp
62969ac_cpp='$CXXCPP $CPPFLAGS'
62970ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62971ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62972ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62973
62974    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
62975$as_echo "$LIBFFI_WORKS" >&6; }
62976
62977    if test "x$LIBFFI_WORKS" = xno; then
62978
62979  # Print a helpful message on how to acquire the necessary build dependency.
62980  # ffi is the help tag: freetype, cups, alsa etc
62981  MISSING_DEPENDENCY=ffi
62982
62983  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62984    cygwin_help $MISSING_DEPENDENCY
62985  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62986    msys_help $MISSING_DEPENDENCY
62987  else
62988    PKGHANDLER_COMMAND=
62989
62990    case $PKGHANDLER in
62991      apt-get)
62992        apt_help     $MISSING_DEPENDENCY ;;
62993      yum)
62994        yum_help     $MISSING_DEPENDENCY ;;
62995      port)
62996        port_help    $MISSING_DEPENDENCY ;;
62997      pkgutil)
62998        pkgutil_help $MISSING_DEPENDENCY ;;
62999      pkgadd)
63000        pkgadd_help  $MISSING_DEPENDENCY ;;
63001    esac
63002
63003    if test "x$PKGHANDLER_COMMAND" != x; then
63004      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63005    fi
63006  fi
63007
63008      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
63009    fi
63010  fi
63011
63012
63013
63014
63015
63016  if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
63017    # Extract the first word of "llvm-config", so it can be a program name with args.
63018set dummy llvm-config; ac_word=$2
63019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
63020$as_echo_n "checking for $ac_word... " >&6; }
63021if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
63022  $as_echo_n "(cached) " >&6
63023else
63024  if test -n "$LLVM_CONFIG"; then
63025  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
63026else
63027as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
63028for as_dir in $PATH
63029do
63030  IFS=$as_save_IFS
63031  test -z "$as_dir" && as_dir=.
63032    for ac_exec_ext in '' $ac_executable_extensions; do
63033  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
63034    ac_cv_prog_LLVM_CONFIG="llvm-config"
63035    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
63036    break 2
63037  fi
63038done
63039  done
63040IFS=$as_save_IFS
63041
63042fi
63043fi
63044LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
63045if test -n "$LLVM_CONFIG"; then
63046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
63047$as_echo "$LLVM_CONFIG" >&6; }
63048else
63049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63050$as_echo "no" >&6; }
63051fi
63052
63053
63054
63055    if test "x$LLVM_CONFIG" != xllvm-config; then
63056      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
63057    fi
63058
63059    llvm_components="jit mcjit engine nativecodegen native"
63060    unset LLVM_CFLAGS
63061    for flag in $("$LLVM_CONFIG" --cxxflags); do
63062      if echo "${flag}" | grep -q '^-[ID]'; then
63063        if test "${flag}" != "-D_DEBUG" ; then
63064          if test "${LLVM_CFLAGS}" != "" ; then
63065            LLVM_CFLAGS="${LLVM_CFLAGS} "
63066          fi
63067          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
63068        fi
63069      fi
63070    done
63071    llvm_version=$("${LLVM_CONFIG}" --version | $SED 's/\.//; s/svn.*//')
63072    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
63073
63074    unset LLVM_LDFLAGS
63075    for flag in $("${LLVM_CONFIG}" --ldflags); do
63076      if echo "${flag}" | grep -q '^-L'; then
63077        if test "${LLVM_LDFLAGS}" != ""; then
63078          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
63079        fi
63080        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
63081      fi
63082    done
63083
63084    unset LLVM_LIBS
63085    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
63086      if echo "${flag}" | grep -q '^-l'; then
63087        if test "${LLVM_LIBS}" != ""; then
63088          LLVM_LIBS="${LLVM_LIBS} "
63089        fi
63090        LLVM_LIBS="${LLVM_LIBS}${flag}"
63091      fi
63092    done
63093
63094    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
63095    # always properly detect -ltinfo
63096    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
63097
63098
63099
63100
63101  fi
63102
63103
63104
63105# Check whether --with-libjpeg was given.
63106if test "${with_libjpeg+set}" = set; then :
63107  withval=$with_libjpeg;
63108fi
63109
63110
63111  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
63112$as_echo_n "checking for which libjpeg to use... " >&6; }
63113  # default is bundled
63114  DEFAULT_LIBJPEG=bundled
63115  # if user didn't specify, use DEFAULT_LIBJPEG
63116  if test "x${with_libjpeg}" = "x"; then
63117    with_libjpeg=${DEFAULT_LIBJPEG}
63118  fi
63119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
63120$as_echo "${with_libjpeg}" >&6; }
63121
63122  if test "x${with_libjpeg}" = "xbundled"; then
63123    USE_EXTERNAL_LIBJPEG=false
63124  elif test "x${with_libjpeg}" = "xsystem"; then
63125    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
63126if test "x$ac_cv_header_jpeglib_h" = xyes; then :
63127
63128else
63129   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
63130fi
63131
63132
63133    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
63134$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
63135if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
63136  $as_echo_n "(cached) " >&6
63137else
63138  ac_check_lib_save_LIBS=$LIBS
63139LIBS="-ljpeg  $LIBS"
63140cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63141/* end confdefs.h.  */
63142
63143/* Override any GCC internal prototype to avoid an error.
63144   Use char because int might match the return type of a GCC
63145   builtin and then its argument prototype would still apply.  */
63146#ifdef __cplusplus
63147extern "C"
63148#endif
63149char jpeg_CreateDecompress ();
63150int
63151main ()
63152{
63153return jpeg_CreateDecompress ();
63154  ;
63155  return 0;
63156}
63157_ACEOF
63158if ac_fn_cxx_try_link "$LINENO"; then :
63159  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
63160else
63161  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
63162fi
63163rm -f core conftest.err conftest.$ac_objext \
63164    conftest$ac_exeext conftest.$ac_ext
63165LIBS=$ac_check_lib_save_LIBS
63166fi
63167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
63168$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
63169if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
63170  cat >>confdefs.h <<_ACEOF
63171#define HAVE_LIBJPEG 1
63172_ACEOF
63173
63174  LIBS="-ljpeg $LIBS"
63175
63176else
63177   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
63178fi
63179
63180
63181    USE_EXTERNAL_LIBJPEG=true
63182  else
63183    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
63184  fi
63185
63186
63187
63188
63189
63190# Check whether --with-giflib was given.
63191if test "${with_giflib+set}" = set; then :
63192  withval=$with_giflib;
63193fi
63194
63195
63196  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
63197$as_echo_n "checking for which giflib to use... " >&6; }
63198  # default is bundled
63199  DEFAULT_GIFLIB=bundled
63200  # if user didn't specify, use DEFAULT_GIFLIB
63201  if test "x${with_giflib}" = "x"; then
63202    with_giflib=${DEFAULT_GIFLIB}
63203  fi
63204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
63205$as_echo "${with_giflib}" >&6; }
63206
63207  if test "x${with_giflib}" = "xbundled"; then
63208    USE_EXTERNAL_LIBGIF=false
63209  elif test "x${with_giflib}" = "xsystem"; then
63210    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
63211if test "x$ac_cv_header_gif_lib_h" = xyes; then :
63212
63213else
63214   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
63215fi
63216
63217
63218    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
63219$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
63220if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
63221  $as_echo_n "(cached) " >&6
63222else
63223  ac_check_lib_save_LIBS=$LIBS
63224LIBS="-lgif  $LIBS"
63225cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63226/* end confdefs.h.  */
63227
63228/* Override any GCC internal prototype to avoid an error.
63229   Use char because int might match the return type of a GCC
63230   builtin and then its argument prototype would still apply.  */
63231#ifdef __cplusplus
63232extern "C"
63233#endif
63234char DGifGetCode ();
63235int
63236main ()
63237{
63238return DGifGetCode ();
63239  ;
63240  return 0;
63241}
63242_ACEOF
63243if ac_fn_cxx_try_link "$LINENO"; then :
63244  ac_cv_lib_gif_DGifGetCode=yes
63245else
63246  ac_cv_lib_gif_DGifGetCode=no
63247fi
63248rm -f core conftest.err conftest.$ac_objext \
63249    conftest$ac_exeext conftest.$ac_ext
63250LIBS=$ac_check_lib_save_LIBS
63251fi
63252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
63253$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
63254if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
63255  cat >>confdefs.h <<_ACEOF
63256#define HAVE_LIBGIF 1
63257_ACEOF
63258
63259  LIBS="-lgif $LIBS"
63260
63261else
63262   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
63263fi
63264
63265
63266    USE_EXTERNAL_LIBGIF=true
63267  else
63268    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
63269  fi
63270
63271
63272
63273
63274
63275# Check whether --with-libpng was given.
63276if test "${with_libpng+set}" = set; then :
63277  withval=$with_libpng;
63278fi
63279
63280
63281  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
63282$as_echo_n "checking for which libpng to use... " >&6; }
63283
63284  # default is bundled
63285  DEFAULT_LIBPNG=bundled
63286  # if user didn't specify, use DEFAULT_LIBPNG
63287  if test "x${with_libpng}" = "x"; then
63288      with_libpng=${DEFAULT_LIBPNG}
63289  fi
63290
63291  if test "x${with_libpng}" = "xbundled"; then
63292      USE_EXTERNAL_LIBPNG=false
63293      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63294$as_echo "bundled" >&6; }
63295  elif test "x${with_libpng}" = "xsystem"; then
63296
63297pkg_failed=no
63298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
63299$as_echo_n "checking for PNG... " >&6; }
63300
63301if test -n "$PNG_CFLAGS"; then
63302    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
63303 elif test -n "$PKG_CONFIG"; then
63304    if test -n "$PKG_CONFIG" && \
63305    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63306  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63307  ac_status=$?
63308  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63309  test $ac_status = 0; }; then
63310  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
63311else
63312  pkg_failed=yes
63313fi
63314 else
63315    pkg_failed=untried
63316fi
63317if test -n "$PNG_LIBS"; then
63318    pkg_cv_PNG_LIBS="$PNG_LIBS"
63319 elif test -n "$PKG_CONFIG"; then
63320    if test -n "$PKG_CONFIG" && \
63321    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63322  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63323  ac_status=$?
63324  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63325  test $ac_status = 0; }; then
63326  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
63327else
63328  pkg_failed=yes
63329fi
63330 else
63331    pkg_failed=untried
63332fi
63333
63334
63335
63336if test $pkg_failed = yes; then
63337
63338if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63339        _pkg_short_errors_supported=yes
63340else
63341        _pkg_short_errors_supported=no
63342fi
63343        if test $_pkg_short_errors_supported = yes; then
63344	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
63345        else
63346	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
63347        fi
63348	# Put the nasty error message in config.log where it belongs
63349	echo "$PNG_PKG_ERRORS" >&5
63350
63351	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63352$as_echo "no" >&6; }
63353                 LIBPNG_FOUND=no
63354elif test $pkg_failed = untried; then
63355	 LIBPNG_FOUND=no
63356else
63357	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
63358	PNG_LIBS=$pkg_cv_PNG_LIBS
63359        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63360$as_echo "yes" >&6; }
63361	 LIBPNG_FOUND=yes
63362fi
63363      if test "x${LIBPNG_FOUND}" = "xyes"; then
63364          USE_EXTERNAL_LIBPNG=true
63365          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63366$as_echo "system" >&6; }
63367      else
63368          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63369$as_echo "system not found" >&6; }
63370          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
63371      fi
63372  else
63373      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
63374  fi
63375
63376
63377
63378
63379
63380# Check whether --with-zlib was given.
63381if test "${with_zlib+set}" = set; then :
63382  withval=$with_zlib;
63383fi
63384
63385
63386  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
63387$as_echo_n "checking for compress in -lz... " >&6; }
63388if ${ac_cv_lib_z_compress+:} false; then :
63389  $as_echo_n "(cached) " >&6
63390else
63391  ac_check_lib_save_LIBS=$LIBS
63392LIBS="-lz  $LIBS"
63393cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63394/* end confdefs.h.  */
63395
63396/* Override any GCC internal prototype to avoid an error.
63397   Use char because int might match the return type of a GCC
63398   builtin and then its argument prototype would still apply.  */
63399#ifdef __cplusplus
63400extern "C"
63401#endif
63402char compress ();
63403int
63404main ()
63405{
63406return compress ();
63407  ;
63408  return 0;
63409}
63410_ACEOF
63411if ac_fn_cxx_try_link "$LINENO"; then :
63412  ac_cv_lib_z_compress=yes
63413else
63414  ac_cv_lib_z_compress=no
63415fi
63416rm -f core conftest.err conftest.$ac_objext \
63417    conftest$ac_exeext conftest.$ac_ext
63418LIBS=$ac_check_lib_save_LIBS
63419fi
63420{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
63421$as_echo "$ac_cv_lib_z_compress" >&6; }
63422if test "x$ac_cv_lib_z_compress" = xyes; then :
63423   ZLIB_FOUND=yes
63424else
63425   ZLIB_FOUND=no
63426fi
63427
63428
63429  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
63430$as_echo_n "checking for which zlib to use... " >&6; }
63431
63432  DEFAULT_ZLIB=system
63433  if test "x$OPENJDK_TARGET_OS" = xwindows; then
63434    # On windows default is bundled...on others default is system
63435    DEFAULT_ZLIB=bundled
63436  fi
63437
63438  if test "x${ZLIB_FOUND}" != "xyes"; then
63439    # If we don't find any system...set default to bundled
63440    DEFAULT_ZLIB=bundled
63441  fi
63442
63443  # If user didn't specify, use DEFAULT_ZLIB
63444  if test "x${with_zlib}" = "x"; then
63445    with_zlib=${DEFAULT_ZLIB}
63446  fi
63447
63448  if test "x${with_zlib}" = "xbundled"; then
63449    USE_EXTERNAL_LIBZ=false
63450    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63451$as_echo "bundled" >&6; }
63452  elif test "x${with_zlib}" = "xsystem"; then
63453    if test "x${ZLIB_FOUND}" = "xyes"; then
63454      USE_EXTERNAL_LIBZ=true
63455      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63456$as_echo "system" >&6; }
63457    else
63458      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63459$as_echo "system not found" >&6; }
63460      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
63461    fi
63462  else
63463    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
63464  fi
63465
63466
63467
63468
63469
63470# Check whether --with-lcms was given.
63471if test "${with_lcms+set}" = set; then :
63472  withval=$with_lcms;
63473fi
63474
63475
63476  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
63477$as_echo_n "checking for which lcms to use... " >&6; }
63478
63479  DEFAULT_LCMS=bundled
63480  # If user didn't specify, use DEFAULT_LCMS
63481  if test "x${with_lcms}" = "x"; then
63482      with_lcms=${DEFAULT_LCMS}
63483  fi
63484
63485  if test "x${with_lcms}" = "xbundled"; then
63486    USE_EXTERNAL_LCMS=false
63487    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63488$as_echo "bundled" >&6; }
63489  elif test "x${with_lcms}" = "xsystem"; then
63490    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63491$as_echo "system" >&6; }
63492
63493pkg_failed=no
63494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
63495$as_echo_n "checking for LCMS... " >&6; }
63496
63497if test -n "$LCMS_CFLAGS"; then
63498    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
63499 elif test -n "$PKG_CONFIG"; then
63500    if test -n "$PKG_CONFIG" && \
63501    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63502  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63503  ac_status=$?
63504  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63505  test $ac_status = 0; }; then
63506  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
63507else
63508  pkg_failed=yes
63509fi
63510 else
63511    pkg_failed=untried
63512fi
63513if test -n "$LCMS_LIBS"; then
63514    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
63515 elif test -n "$PKG_CONFIG"; then
63516    if test -n "$PKG_CONFIG" && \
63517    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63518  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63519  ac_status=$?
63520  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63521  test $ac_status = 0; }; then
63522  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
63523else
63524  pkg_failed=yes
63525fi
63526 else
63527    pkg_failed=untried
63528fi
63529
63530
63531
63532if test $pkg_failed = yes; then
63533
63534if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63535        _pkg_short_errors_supported=yes
63536else
63537        _pkg_short_errors_supported=no
63538fi
63539        if test $_pkg_short_errors_supported = yes; then
63540	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
63541        else
63542	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
63543        fi
63544	# Put the nasty error message in config.log where it belongs
63545	echo "$LCMS_PKG_ERRORS" >&5
63546
63547	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63548$as_echo "no" >&6; }
63549                LCMS_FOUND=no
63550elif test $pkg_failed = untried; then
63551	LCMS_FOUND=no
63552else
63553	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
63554	LCMS_LIBS=$pkg_cv_LCMS_LIBS
63555        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63556$as_echo "yes" >&6; }
63557	LCMS_FOUND=yes
63558fi
63559    if test "x${LCMS_FOUND}" = "xyes"; then
63560      USE_EXTERNAL_LCMS=true
63561    else
63562      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
63563    fi
63564  else
63565    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
63566  fi
63567
63568
63569
63570
63571
63572
63573
63574
63575
63576
63577
63578  # Setup libm (the maths library)
63579  if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
63580    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
63581$as_echo_n "checking for cos in -lm... " >&6; }
63582if ${ac_cv_lib_m_cos+:} false; then :
63583  $as_echo_n "(cached) " >&6
63584else
63585  ac_check_lib_save_LIBS=$LIBS
63586LIBS="-lm  $LIBS"
63587cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63588/* end confdefs.h.  */
63589
63590/* Override any GCC internal prototype to avoid an error.
63591   Use char because int might match the return type of a GCC
63592   builtin and then its argument prototype would still apply.  */
63593#ifdef __cplusplus
63594extern "C"
63595#endif
63596char cos ();
63597int
63598main ()
63599{
63600return cos ();
63601  ;
63602  return 0;
63603}
63604_ACEOF
63605if ac_fn_cxx_try_link "$LINENO"; then :
63606  ac_cv_lib_m_cos=yes
63607else
63608  ac_cv_lib_m_cos=no
63609fi
63610rm -f core conftest.err conftest.$ac_objext \
63611    conftest$ac_exeext conftest.$ac_ext
63612LIBS=$ac_check_lib_save_LIBS
63613fi
63614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
63615$as_echo "$ac_cv_lib_m_cos" >&6; }
63616if test "x$ac_cv_lib_m_cos" = xyes; then :
63617  cat >>confdefs.h <<_ACEOF
63618#define HAVE_LIBM 1
63619_ACEOF
63620
63621  LIBS="-lm $LIBS"
63622
63623else
63624
63625        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
63626$as_echo "$as_me: Maths library was not found" >&6;}
63627
63628fi
63629
63630    LIBM="-lm"
63631  else
63632    LIBM=""
63633  fi
63634
63635
63636  # Setup libdl (for dynamic library loading)
63637  save_LIBS="$LIBS"
63638  LIBS=""
63639  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
63640$as_echo_n "checking for dlopen in -ldl... " >&6; }
63641if ${ac_cv_lib_dl_dlopen+:} false; then :
63642  $as_echo_n "(cached) " >&6
63643else
63644  ac_check_lib_save_LIBS=$LIBS
63645LIBS="-ldl  $LIBS"
63646cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63647/* end confdefs.h.  */
63648
63649/* Override any GCC internal prototype to avoid an error.
63650   Use char because int might match the return type of a GCC
63651   builtin and then its argument prototype would still apply.  */
63652#ifdef __cplusplus
63653extern "C"
63654#endif
63655char dlopen ();
63656int
63657main ()
63658{
63659return dlopen ();
63660  ;
63661  return 0;
63662}
63663_ACEOF
63664if ac_fn_cxx_try_link "$LINENO"; then :
63665  ac_cv_lib_dl_dlopen=yes
63666else
63667  ac_cv_lib_dl_dlopen=no
63668fi
63669rm -f core conftest.err conftest.$ac_objext \
63670    conftest$ac_exeext conftest.$ac_ext
63671LIBS=$ac_check_lib_save_LIBS
63672fi
63673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
63674$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
63675if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
63676  cat >>confdefs.h <<_ACEOF
63677#define HAVE_LIBDL 1
63678_ACEOF
63679
63680  LIBS="-ldl $LIBS"
63681
63682fi
63683
63684  LIBDL="$LIBS"
63685
63686  LIBS="$save_LIBS"
63687
63688  # Deprecated libraries, keep the flags for backwards compatibility
63689  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
63690
63691
63692# Check whether --with-dxsdk was given.
63693if test "${with_dxsdk+set}" = set; then :
63694  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
63695$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
63696fi
63697
63698
63699
63700
63701# Check whether --with-dxsdk-lib was given.
63702if test "${with_dxsdk_lib+set}" = set; then :
63703  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
63704$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
63705fi
63706
63707
63708
63709
63710# Check whether --with-dxsdk-include was given.
63711if test "${with_dxsdk_include+set}" = set; then :
63712  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
63713$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
63714fi
63715
63716
63717  fi
63718
63719  # Control if libzip can use mmap. Available for purposes of overriding.
63720  LIBZIP_CAN_USE_MMAP=true
63721
63722
63723
63724  if test "$OPENJDK_TARGET_OS" = "solaris" && test "x$BUILD_GTEST" = "xtrue"; then
63725    # Find the root of the Solaris Studio installation from the compiler path
63726    SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
63727    STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
63728    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
63729$as_echo_n "checking for libstlport.so.1... " >&6; }
63730    if ! test -f "$STLPORT_LIB" && test "x$OPENJDK_TARGET_CPU_ISADIR" = "x/sparcv9"; then
63731      # SS12u3 has libstlport under 'stlport4/v9' instead of 'stlport4/sparcv9'
63732      STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4/v9/libstlport.so.1"
63733    fi
63734    if test -f "$STLPORT_LIB"; then
63735      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
63736$as_echo "yes, $STLPORT_LIB" >&6; }
63737
63738  # Only process if variable expands to non-empty
63739
63740  if test "x$STLPORT_LIB" != x; then
63741    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63742
63743  # Input might be given as Windows format, start by converting to
63744  # unix format.
63745  path="$STLPORT_LIB"
63746  new_path=`$CYGPATH -u "$path"`
63747
63748  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63749  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63750  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63751  # "foo.exe" is OK but "foo" is an error.
63752  #
63753  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63754  # It is also a way to make sure we got the proper file name for the real test later on.
63755  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63756  if test "x$test_shortpath" = x; then
63757    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
63758$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
63759    as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
63760  fi
63761
63762  # Call helper function which possibly converts this using DOS-style short mode.
63763  # If so, the updated path is stored in $new_path.
63764
63765  input_path="$new_path"
63766  # Check if we need to convert this using DOS-style short mode. If the path
63767  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63768  # take no chances and rewrite it.
63769  # Note: m4 eats our [], so we need to use [ and ] instead.
63770  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63771  if test "x$has_forbidden_chars" != x; then
63772    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63773    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63774    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63775    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63776      # Going to short mode and back again did indeed matter. Since short mode is
63777      # case insensitive, let's make it lowercase to improve readability.
63778      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63779      # Now convert it back to Unix-style (cygpath)
63780      input_path=`$CYGPATH -u "$shortmode_path"`
63781      new_path="$input_path"
63782    fi
63783  fi
63784
63785  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63786  if test "x$test_cygdrive_prefix" = x; then
63787    # As a simple fix, exclude /usr/bin since it's not a real path.
63788    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63789      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63790      # a path prefixed by /cygdrive for fixpath to work.
63791      new_path="$CYGWIN_ROOT_PATH$input_path"
63792    fi
63793  fi
63794
63795
63796  if test "x$path" != "x$new_path"; then
63797    STLPORT_LIB="$new_path"
63798    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
63799$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
63800  fi
63801
63802    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63803
63804  path="$STLPORT_LIB"
63805  has_colon=`$ECHO $path | $GREP ^.:`
63806  new_path="$path"
63807  if test "x$has_colon" = x; then
63808    # Not in mixed or Windows style, start by that.
63809    new_path=`cmd //c echo $path`
63810  fi
63811
63812
63813  input_path="$new_path"
63814  # Check if we need to convert this using DOS-style short mode. If the path
63815  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63816  # take no chances and rewrite it.
63817  # Note: m4 eats our [], so we need to use [ and ] instead.
63818  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63819  if test "x$has_forbidden_chars" != x; then
63820    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63821    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63822  fi
63823
63824
63825  windows_path="$new_path"
63826  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63827    unix_path=`$CYGPATH -u "$windows_path"`
63828    new_path="$unix_path"
63829  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63830    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63831    new_path="$unix_path"
63832  fi
63833
63834  if test "x$path" != "x$new_path"; then
63835    STLPORT_LIB="$new_path"
63836    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
63837$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
63838  fi
63839
63840  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63841  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63842
63843    else
63844      # We're on a unix platform. Hooray! :)
63845      path="$STLPORT_LIB"
63846      has_space=`$ECHO "$path" | $GREP " "`
63847      if test "x$has_space" != x; then
63848        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
63849$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
63850        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63851      fi
63852
63853      # Use eval to expand a potential ~
63854      eval path="$path"
63855      if test ! -f "$path" && test ! -d "$path"; then
63856        as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
63857      fi
63858
63859      if test -d "$path"; then
63860        STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
63861      else
63862        dir="`$DIRNAME "$path"`"
63863        base="`$BASENAME "$path"`"
63864        STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
63865      fi
63866    fi
63867  fi
63868
63869    else
63870      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
63871$as_echo "no, not found at $STLPORT_LIB" >&6; }
63872      as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
63873    fi
63874
63875  fi
63876
63877
63878
63879
63880
63881
63882
63883
63884
63885
63886
63887
63888
63889
63890###############################################################################
63891#
63892# We need to do some final tweaking, when everything else is done.
63893#
63894###############################################################################
63895
63896
63897  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
63898$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
63899
63900  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
63901    ENABLE_INTREE_EC=yes
63902    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63903$as_echo "yes" >&6; }
63904  else
63905    ENABLE_INTREE_EC=no
63906    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63907$as_echo "no" >&6; }
63908  fi
63909
63910
63911
63912
63913  # Check whether --enable-jtreg-failure-handler was given.
63914if test "${enable_jtreg_failure_handler+set}" = set; then :
63915  enableval=$enable_jtreg_failure_handler;
63916fi
63917
63918
63919  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
63920$as_echo_n "checking if jtreg failure handler should be built... " >&6; }
63921
63922  if test "x$enable_jtreg_failure_handler" = "xyes"; then
63923    if test "x$JT_HOME" = "x"; then
63924      as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
63925    else
63926      BUILD_FAILURE_HANDLER=true
63927      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
63928$as_echo "yes, forced" >&6; }
63929    fi
63930  elif test "x$enable_jtreg_failure_handler" = "xno"; then
63931    BUILD_FAILURE_HANDLER=false
63932    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
63933$as_echo "no, forced" >&6; }
63934  elif test "x$enable_jtreg_failure_handler" = "xauto" \
63935      || test "x$enable_jtreg_failure_handler" = "x"; then
63936    if test "x$JT_HOME" = "x"; then
63937      BUILD_FAILURE_HANDLER=false
63938      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
63939$as_echo "no, missing jtreg" >&6; }
63940    else
63941      BUILD_FAILURE_HANDLER=true
63942      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
63943$as_echo "yes, jtreg present" >&6; }
63944    fi
63945  else
63946    as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
63947  fi
63948
63949
63950
63951
63952  # Check whether --enable-generate-classlist was given.
63953if test "${enable_generate_classlist+set}" = set; then :
63954  enableval=$enable_generate_classlist;
63955fi
63956
63957
63958  # Check if it's likely that it's possible to generate the classlist. Depending
63959  # on exact jvm configuration it could be possible anyway.
63960  if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
63961    ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
63962  else
63963    ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
63964  fi
63965
63966  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the CDS classlist generation should be enabled" >&5
63967$as_echo_n "checking if the CDS classlist generation should be enabled... " >&6; }
63968  if test "x$enable_generate_classlist" = "xyes"; then
63969    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
63970$as_echo "yes, forced" >&6; }
63971    ENABLE_GENERATE_CLASSLIST="true"
63972    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
63973      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&5
63974$as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&2;}
63975    fi
63976  elif test "x$enable_generate_classlist" = "xno"; then
63977    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
63978$as_echo "no, forced" >&6; }
63979    ENABLE_GENERATE_CLASSLIST="false"
63980  elif test "x$enable_generate_classlist" = "x"; then
63981    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
63982      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63983$as_echo "yes" >&6; }
63984      ENABLE_GENERATE_CLASSLIST="true"
63985    else
63986      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63987$as_echo "no" >&6; }
63988      ENABLE_GENERATE_CLASSLIST="false"
63989    fi
63990  else
63991    as_fn_error $? "Invalid value for --enable-generate-classlist: $enable_generate_classlist" "$LINENO" 5
63992  fi
63993
63994
63995
63996
63997###############################################################################
63998#
63999# Configure parts of the build that only affect the build performance,
64000# not the result.
64001#
64002###############################################################################
64003
64004
64005  # How many cores do we have on this build system?
64006
64007# Check whether --with-num-cores was given.
64008if test "${with_num_cores+set}" = set; then :
64009  withval=$with_num_cores;
64010fi
64011
64012  if test "x$with_num_cores" = x; then
64013    # The number of cores were not specified, try to probe them.
64014
64015  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
64016$as_echo_n "checking for number of cores... " >&6; }
64017  NUM_CORES=1
64018  FOUND_CORES=no
64019
64020  if test -f /proc/cpuinfo; then
64021    # Looks like a Linux (or cygwin) system
64022    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
64023    FOUND_CORES=yes
64024  elif test -x /usr/sbin/psrinfo; then
64025    # Looks like a Solaris system
64026    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
64027    FOUND_CORES=yes
64028  elif test -x /usr/sbin/sysctl; then
64029    # Looks like a MacOSX system
64030    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
64031    FOUND_CORES=yes
64032  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
64033    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
64034    FOUND_CORES=yes
64035  elif test -n "$NUMBER_OF_PROCESSORS"; then
64036    # On windows, look in the env
64037    NUM_CORES=$NUMBER_OF_PROCESSORS
64038    FOUND_CORES=yes
64039  fi
64040
64041  if test "x$FOUND_CORES" = xyes; then
64042    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
64043$as_echo "$NUM_CORES" >&6; }
64044  else
64045    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
64046$as_echo "could not detect number of cores, defaulting to 1" >&6; }
64047    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
64048$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
64049  fi
64050
64051  else
64052    NUM_CORES=$with_num_cores
64053  fi
64054
64055
64056
64057  # How much memory do we have on this build system?
64058
64059# Check whether --with-memory-size was given.
64060if test "${with_memory_size+set}" = set; then :
64061  withval=$with_memory_size;
64062fi
64063
64064  if test "x$with_memory_size" = x; then
64065    # The memory size was not specified, try to probe it.
64066
64067  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
64068$as_echo_n "checking for memory size... " >&6; }
64069  # Default to 1024 MB
64070  MEMORY_SIZE=1024
64071  FOUND_MEM=no
64072
64073  if test -f /proc/meminfo; then
64074    # Looks like a Linux (or cygwin) system
64075    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
64076    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
64077    FOUND_MEM=yes
64078  elif test -x /usr/sbin/prtconf; then
64079    # Looks like a Solaris or AIX system
64080    MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
64081    FOUND_MEM=yes
64082  elif test -x /usr/sbin/sysctl; then
64083    # Looks like a MacOSX system
64084    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
64085    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64086    FOUND_MEM=yes
64087  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
64088    # Windows, but without cygwin
64089    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
64090    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64091    FOUND_MEM=yes
64092  fi
64093
64094  if test "x$FOUND_MEM" = xyes; then
64095    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
64096$as_echo "$MEMORY_SIZE MB" >&6; }
64097  else
64098    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
64099$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
64100    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
64101$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
64102  fi
64103
64104  else
64105    MEMORY_SIZE=$with_memory_size
64106  fi
64107
64108
64109
64110  # Provide a decent default number of parallel jobs for make depending on
64111  # number of cores, amount of memory and machine architecture.
64112
64113# Check whether --with-jobs was given.
64114if test "${with_jobs+set}" = set; then :
64115  withval=$with_jobs;
64116fi
64117
64118  if test "x$with_jobs" = x; then
64119    # Number of jobs was not specified, calculate.
64120    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
64121$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
64122    # Approximate memory in GB.
64123    memory_gb=`expr $MEMORY_SIZE / 1024`
64124    # Pick the lowest of memory in gb and number of cores.
64125    if test "$memory_gb" -lt "$NUM_CORES"; then
64126      JOBS="$memory_gb"
64127    else
64128      JOBS="$NUM_CORES"
64129    fi
64130    if test "$JOBS" -eq "0"; then
64131      JOBS=1
64132    fi
64133    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
64134$as_echo "$JOBS" >&6; }
64135  else
64136    JOBS=$with_jobs
64137  fi
64138
64139
64140
64141  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
64142
64143# Check whether --with-test-jobs was given.
64144if test "${with_test_jobs+set}" = set; then :
64145  withval=$with_test_jobs;
64146fi
64147
64148  if test "x$with_test_jobs" = x; then
64149      TEST_JOBS=0
64150  else
64151      TEST_JOBS=$with_test_jobs
64152  fi
64153
64154
64155
64156# Setup arguments for the boot jdk (after cores and memory have been setup)
64157
64158  ##############################################################################
64159  #
64160  # Specify jvm options for anything that is run with the Boot JDK.
64161  # Not all JVM:s accept the same arguments on the command line.
64162  #
64163
64164# Check whether --with-boot-jdk-jvmargs was given.
64165if test "${with_boot_jdk_jvmargs+set}" = set; then :
64166  withval=$with_boot_jdk_jvmargs;
64167fi
64168
64169
64170  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
64171$as_echo_n "checking flags for boot jdk java command ... " >&6; }
64172
64173  # Disable special log output when a debug build is used as Boot JDK...
64174
64175  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
64176  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
64177  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
64178  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64179  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64180  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64181    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
64182    JVM_ARG_OK=true
64183  else
64184    $ECHO "Arg failed:" >&5
64185    $ECHO "$OUTPUT" >&5
64186    JVM_ARG_OK=false
64187  fi
64188
64189
64190  # Force en-US environment
64191
64192  $ECHO "Check if jvm arg is ok: -Duser.language=en -Duser.country=US" >&5
64193  $ECHO "Command: $JAVA -Duser.language=en -Duser.country=US -version" >&5
64194  OUTPUT=`$JAVA -Duser.language=en -Duser.country=US -version 2>&1`
64195  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64196  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64197  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64198    boot_jdk_jvmargs="$boot_jdk_jvmargs -Duser.language=en -Duser.country=US"
64199    JVM_ARG_OK=true
64200  else
64201    $ECHO "Arg failed:" >&5
64202    $ECHO "$OUTPUT" >&5
64203    JVM_ARG_OK=false
64204  fi
64205
64206
64207  # Apply user provided options.
64208
64209  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
64210  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
64211  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
64212  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64213  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64214  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64215    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
64216    JVM_ARG_OK=true
64217  else
64218    $ECHO "Arg failed:" >&5
64219    $ECHO "$OUTPUT" >&5
64220    JVM_ARG_OK=false
64221  fi
64222
64223
64224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
64225$as_echo "$boot_jdk_jvmargs" >&6; }
64226
64227  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
64228  JAVA_FLAGS=$boot_jdk_jvmargs
64229
64230
64231
64232  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
64233$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
64234
64235  # Starting amount of heap memory.
64236
64237  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
64238  $ECHO "Command: $JAVA -Xms64M -version" >&5
64239  OUTPUT=`$JAVA -Xms64M -version 2>&1`
64240  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64241  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64242  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64243    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
64244    JVM_ARG_OK=true
64245  else
64246    $ECHO "Arg failed:" >&5
64247    $ECHO "$OUTPUT" >&5
64248    JVM_ARG_OK=false
64249  fi
64250
64251  BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
64252
64253  # Maximum amount of heap memory and stack size.
64254  JVM_HEAP_LIMIT_32="1024"
64255  # Running a 64 bit JVM allows for and requires a bigger heap
64256  JVM_HEAP_LIMIT_64="1600"
64257  STACK_SIZE_32=768
64258  STACK_SIZE_64=1536
64259  JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
64260  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
64261    JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
64262  fi
64263  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_64"; then
64264    JVM_HEAP_LIMIT_64=$JVM_HEAP_LIMIT_GLOBAL
64265  fi
64266  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "512"; then
64267    JVM_HEAP_LIMIT_32=512
64268    JVM_HEAP_LIMIT_64=512
64269  fi
64270
64271  if test "x$BOOT_JDK_BITS" = "x32"; then
64272    STACK_SIZE=$STACK_SIZE_32
64273    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_32
64274  else
64275    STACK_SIZE=$STACK_SIZE_64
64276    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
64277  fi
64278
64279  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
64280  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
64281  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
64282  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64283  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64284  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64285    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
64286    JVM_ARG_OK=true
64287  else
64288    $ECHO "Arg failed:" >&5
64289    $ECHO "$OUTPUT" >&5
64290    JVM_ARG_OK=false
64291  fi
64292
64293
64294  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
64295  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
64296  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
64297  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64298  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64299  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64300    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
64301    JVM_ARG_OK=true
64302  else
64303    $ECHO "Arg failed:" >&5
64304    $ECHO "$OUTPUT" >&5
64305    JVM_ARG_OK=false
64306  fi
64307
64308
64309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
64310$as_echo "$boot_jdk_jvmargs_big" >&6; }
64311
64312  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
64313
64314
64315  if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
64316    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_32
64317    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_32
64318  else
64319    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_64
64320    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_64
64321  fi
64322  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -Xmx${BOOTCYCLE_MAX_HEAP}M"
64323  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -XX:ThreadStackSize=$BOOTCYCLE_STACK_SIZE"
64324  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for bootcycle boot jdk java command for big workloads" >&5
64325$as_echo_n "checking flags for bootcycle boot jdk java command for big workloads... " >&6; }
64326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOTCYCLE_JVM_ARGS_BIG" >&5
64327$as_echo "$BOOTCYCLE_JVM_ARGS_BIG" >&6; }
64328
64329
64330  # By default, the main javac compilations use big
64331  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
64332
64333
64334  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
64335$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
64336
64337  # Use serial gc for small short lived tools if possible
64338
64339  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
64340  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
64341  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
64342  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64343  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64344  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64345    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
64346    JVM_ARG_OK=true
64347  else
64348    $ECHO "Arg failed:" >&5
64349    $ECHO "$OUTPUT" >&5
64350    JVM_ARG_OK=false
64351  fi
64352
64353
64354  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
64355  $ECHO "Command: $JAVA -Xms32M -version" >&5
64356  OUTPUT=`$JAVA -Xms32M -version 2>&1`
64357  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64358  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64359  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64360    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
64361    JVM_ARG_OK=true
64362  else
64363    $ECHO "Arg failed:" >&5
64364    $ECHO "$OUTPUT" >&5
64365    JVM_ARG_OK=false
64366  fi
64367
64368
64369  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
64370  $ECHO "Command: $JAVA -Xmx512M -version" >&5
64371  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
64372  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64373  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64374  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64375    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
64376    JVM_ARG_OK=true
64377  else
64378    $ECHO "Arg failed:" >&5
64379    $ECHO "$OUTPUT" >&5
64380    JVM_ARG_OK=false
64381  fi
64382
64383
64384  $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
64385  $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
64386  OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
64387  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64388  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64389  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64390    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
64391    JVM_ARG_OK=true
64392  else
64393    $ECHO "Arg failed:" >&5
64394    $ECHO "$OUTPUT" >&5
64395    JVM_ARG_OK=false
64396  fi
64397
64398
64399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
64400$as_echo "$boot_jdk_jvmargs_small" >&6; }
64401
64402  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
64403
64404
64405  JAVA_TOOL_FLAGS_SMALL=""
64406  for f in $JAVA_FLAGS_SMALL; do
64407    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
64408  done
64409
64410
64411
64412# Setup smart javac (after cores and memory have been setup)
64413
64414
64415# Check whether --with-sjavac-server-java was given.
64416if test "${with_sjavac_server_java+set}" = set; then :
64417  withval=$with_sjavac_server_java;
64418fi
64419
64420
64421  if test "x$with_sjavac_server_java" != x; then
64422    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
64423    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
64424    if test "x$FOUND_VERSION" = x; then
64425      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
64426    fi
64427  else
64428    SJAVAC_SERVER_JAVA="$JAVA"
64429  fi
64430
64431
64432  if test "$MEMORY_SIZE" -gt "3000"; then
64433
64434  $ECHO "Check if jvm arg is ok: -d64" >&5
64435  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
64436  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
64437  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64438  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64439  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64440    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
64441    JVM_ARG_OK=true
64442  else
64443    $ECHO "Arg failed:" >&5
64444    $ECHO "$OUTPUT" >&5
64445    JVM_ARG_OK=false
64446  fi
64447
64448    if test "$JVM_ARG_OK" = true; then
64449      JVM_64BIT=true
64450      JVM_ARG_OK=false
64451    fi
64452  fi
64453
64454  MX_VALUE=`expr $MEMORY_SIZE / 2`
64455  if test "$JVM_64BIT" = true; then
64456    # Set ms lower than mx since more than one instance of the server might
64457    # get launched at the same time before they figure out which instance won.
64458    MS_VALUE=512
64459    if test "$MX_VALUE" -gt "2048"; then
64460      MX_VALUE=2048
64461    fi
64462  else
64463    MS_VALUE=256
64464    if test "$MX_VALUE" -gt "1500"; then
64465      MX_VALUE=1500
64466    fi
64467  fi
64468  if test "$MX_VALUE" -lt "512"; then
64469    MX_VALUE=512
64470  fi
64471
64472  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
64473  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
64474  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
64475  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64476  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64477  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64478    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
64479    JVM_ARG_OK=true
64480  else
64481    $ECHO "Arg failed:" >&5
64482    $ECHO "$OUTPUT" >&5
64483    JVM_ARG_OK=false
64484  fi
64485
64486
64487
64488  # Check whether --enable-sjavac was given.
64489if test "${enable_sjavac+set}" = set; then :
64490  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
64491else
64492  ENABLE_SJAVAC="no"
64493fi
64494
64495  if test "x$JVM_ARG_OK" = "xfalse"; then
64496    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
64497$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
64498    ENABLE_SJAVAC="no"
64499  fi
64500  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
64501$as_echo_n "checking whether to use sjavac... " >&6; }
64502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
64503$as_echo "$ENABLE_SJAVAC" >&6; }
64504
64505
64506  # Check whether --enable-javac-server was given.
64507if test "${enable_javac_server+set}" = set; then :
64508  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
64509else
64510  ENABLE_JAVAC_SERVER="yes"
64511fi
64512
64513  if test "x$JVM_ARG_OK" = "xfalse"; then
64514    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
64515$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
64516    ENABLE_JAVAC_SERVER="no"
64517  fi
64518  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
64519$as_echo_n "checking whether to use javac server... " >&6; }
64520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
64521$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
64522
64523
64524  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
64525    # When using a server javac, the small client instances do not need much
64526    # resources.
64527    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
64528  fi
64529
64530
64531# Setup use of icecc if requested
64532
64533  # Check whether --enable-icecc was given.
64534if test "${enable_icecc+set}" = set; then :
64535  enableval=$enable_icecc;
64536fi
64537
64538
64539  if test "x${enable_icecc}" = "xyes"; then
64540
64541
64542
64543  # Publish this variable in the help.
64544
64545
64546  if [ -z "${ICECC_CMD+x}" ]; then
64547    # The variable is not set by user, try to locate tool using the code snippet
64548    for ac_prog in icecc
64549do
64550  # Extract the first word of "$ac_prog", so it can be a program name with args.
64551set dummy $ac_prog; ac_word=$2
64552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64553$as_echo_n "checking for $ac_word... " >&6; }
64554if ${ac_cv_path_ICECC_CMD+:} false; then :
64555  $as_echo_n "(cached) " >&6
64556else
64557  case $ICECC_CMD in
64558  [\\/]* | ?:[\\/]*)
64559  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64560  ;;
64561  *)
64562  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64563for as_dir in $PATH
64564do
64565  IFS=$as_save_IFS
64566  test -z "$as_dir" && as_dir=.
64567    for ac_exec_ext in '' $ac_executable_extensions; do
64568  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64569    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64570    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64571    break 2
64572  fi
64573done
64574  done
64575IFS=$as_save_IFS
64576
64577  ;;
64578esac
64579fi
64580ICECC_CMD=$ac_cv_path_ICECC_CMD
64581if test -n "$ICECC_CMD"; then
64582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64583$as_echo "$ICECC_CMD" >&6; }
64584else
64585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64586$as_echo "no" >&6; }
64587fi
64588
64589
64590  test -n "$ICECC_CMD" && break
64591done
64592
64593  else
64594    # The variable is set, but is it from the command line or the environment?
64595
64596    # Try to remove the string !ICECC_CMD! from our list.
64597    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
64598    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64599      # If it failed, the variable was not from the command line. Ignore it,
64600      # but warn the user (except for BASH, which is always set by the calling BASH).
64601      if test "xICECC_CMD" != xBASH; then
64602        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
64603$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
64604      fi
64605      # Try to locate tool using the code snippet
64606      for ac_prog in icecc
64607do
64608  # Extract the first word of "$ac_prog", so it can be a program name with args.
64609set dummy $ac_prog; ac_word=$2
64610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64611$as_echo_n "checking for $ac_word... " >&6; }
64612if ${ac_cv_path_ICECC_CMD+:} false; then :
64613  $as_echo_n "(cached) " >&6
64614else
64615  case $ICECC_CMD in
64616  [\\/]* | ?:[\\/]*)
64617  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64618  ;;
64619  *)
64620  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64621for as_dir in $PATH
64622do
64623  IFS=$as_save_IFS
64624  test -z "$as_dir" && as_dir=.
64625    for ac_exec_ext in '' $ac_executable_extensions; do
64626  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64627    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64628    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64629    break 2
64630  fi
64631done
64632  done
64633IFS=$as_save_IFS
64634
64635  ;;
64636esac
64637fi
64638ICECC_CMD=$ac_cv_path_ICECC_CMD
64639if test -n "$ICECC_CMD"; then
64640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64641$as_echo "$ICECC_CMD" >&6; }
64642else
64643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64644$as_echo "no" >&6; }
64645fi
64646
64647
64648  test -n "$ICECC_CMD" && break
64649done
64650
64651    else
64652      # If it succeeded, then it was overridden by the user. We will use it
64653      # for the tool.
64654
64655      # First remove it from the list of overridden variables, so we can test
64656      # for unknown variables in the end.
64657      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64658
64659      # Check if we try to supply an empty value
64660      if test "x$ICECC_CMD" = x; then
64661        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
64662$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
64663        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
64664$as_echo_n "checking for ICECC_CMD... " >&6; }
64665        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64666$as_echo "disabled" >&6; }
64667      else
64668        # Check if the provided tool contains a complete path.
64669        tool_specified="$ICECC_CMD"
64670        tool_basename="${tool_specified##*/}"
64671        if test "x$tool_basename" = "x$tool_specified"; then
64672          # A command without a complete path is provided, search $PATH.
64673          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
64674$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
64675          # Extract the first word of "$tool_basename", so it can be a program name with args.
64676set dummy $tool_basename; ac_word=$2
64677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64678$as_echo_n "checking for $ac_word... " >&6; }
64679if ${ac_cv_path_ICECC_CMD+:} false; then :
64680  $as_echo_n "(cached) " >&6
64681else
64682  case $ICECC_CMD in
64683  [\\/]* | ?:[\\/]*)
64684  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64685  ;;
64686  *)
64687  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64688for as_dir in $PATH
64689do
64690  IFS=$as_save_IFS
64691  test -z "$as_dir" && as_dir=.
64692    for ac_exec_ext in '' $ac_executable_extensions; do
64693  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64694    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64695    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64696    break 2
64697  fi
64698done
64699  done
64700IFS=$as_save_IFS
64701
64702  ;;
64703esac
64704fi
64705ICECC_CMD=$ac_cv_path_ICECC_CMD
64706if test -n "$ICECC_CMD"; then
64707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64708$as_echo "$ICECC_CMD" >&6; }
64709else
64710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64711$as_echo "no" >&6; }
64712fi
64713
64714
64715          if test "x$ICECC_CMD" = x; then
64716            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
64717          fi
64718        else
64719          # Otherwise we believe it is a complete path. Use it as it is.
64720          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
64721$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
64722          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
64723$as_echo_n "checking for ICECC_CMD... " >&6; }
64724          if test ! -x "$tool_specified"; then
64725            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
64726$as_echo "not found" >&6; }
64727            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
64728          fi
64729          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
64730$as_echo "$tool_specified" >&6; }
64731        fi
64732      fi
64733    fi
64734
64735  fi
64736
64737
64738
64739  if test "x$ICECC_CMD" = x; then
64740    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
64741  fi
64742
64743
64744    old_path="$PATH"
64745
64746    # Look for icecc-create-env in some known places
64747    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
64748
64749
64750
64751  # Publish this variable in the help.
64752
64753
64754  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
64755    # The variable is not set by user, try to locate tool using the code snippet
64756    for ac_prog in icecc-create-env
64757do
64758  # Extract the first word of "$ac_prog", so it can be a program name with args.
64759set dummy $ac_prog; ac_word=$2
64760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64761$as_echo_n "checking for $ac_word... " >&6; }
64762if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64763  $as_echo_n "(cached) " >&6
64764else
64765  case $ICECC_CREATE_ENV in
64766  [\\/]* | ?:[\\/]*)
64767  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64768  ;;
64769  *)
64770  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64771for as_dir in $PATH
64772do
64773  IFS=$as_save_IFS
64774  test -z "$as_dir" && as_dir=.
64775    for ac_exec_ext in '' $ac_executable_extensions; do
64776  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64777    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64778    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64779    break 2
64780  fi
64781done
64782  done
64783IFS=$as_save_IFS
64784
64785  ;;
64786esac
64787fi
64788ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64789if test -n "$ICECC_CREATE_ENV"; then
64790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64791$as_echo "$ICECC_CREATE_ENV" >&6; }
64792else
64793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64794$as_echo "no" >&6; }
64795fi
64796
64797
64798  test -n "$ICECC_CREATE_ENV" && break
64799done
64800
64801  else
64802    # The variable is set, but is it from the command line or the environment?
64803
64804    # Try to remove the string !ICECC_CREATE_ENV! from our list.
64805    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
64806    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64807      # If it failed, the variable was not from the command line. Ignore it,
64808      # but warn the user (except for BASH, which is always set by the calling BASH).
64809      if test "xICECC_CREATE_ENV" != xBASH; then
64810        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
64811$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
64812      fi
64813      # Try to locate tool using the code snippet
64814      for ac_prog in icecc-create-env
64815do
64816  # Extract the first word of "$ac_prog", so it can be a program name with args.
64817set dummy $ac_prog; ac_word=$2
64818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64819$as_echo_n "checking for $ac_word... " >&6; }
64820if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64821  $as_echo_n "(cached) " >&6
64822else
64823  case $ICECC_CREATE_ENV in
64824  [\\/]* | ?:[\\/]*)
64825  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64826  ;;
64827  *)
64828  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64829for as_dir in $PATH
64830do
64831  IFS=$as_save_IFS
64832  test -z "$as_dir" && as_dir=.
64833    for ac_exec_ext in '' $ac_executable_extensions; do
64834  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64835    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64836    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64837    break 2
64838  fi
64839done
64840  done
64841IFS=$as_save_IFS
64842
64843  ;;
64844esac
64845fi
64846ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64847if test -n "$ICECC_CREATE_ENV"; then
64848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64849$as_echo "$ICECC_CREATE_ENV" >&6; }
64850else
64851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64852$as_echo "no" >&6; }
64853fi
64854
64855
64856  test -n "$ICECC_CREATE_ENV" && break
64857done
64858
64859    else
64860      # If it succeeded, then it was overridden by the user. We will use it
64861      # for the tool.
64862
64863      # First remove it from the list of overridden variables, so we can test
64864      # for unknown variables in the end.
64865      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64866
64867      # Check if we try to supply an empty value
64868      if test "x$ICECC_CREATE_ENV" = x; then
64869        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
64870$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
64871        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
64872$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
64873        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64874$as_echo "disabled" >&6; }
64875      else
64876        # Check if the provided tool contains a complete path.
64877        tool_specified="$ICECC_CREATE_ENV"
64878        tool_basename="${tool_specified##*/}"
64879        if test "x$tool_basename" = "x$tool_specified"; then
64880          # A command without a complete path is provided, search $PATH.
64881          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
64882$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
64883          # Extract the first word of "$tool_basename", so it can be a program name with args.
64884set dummy $tool_basename; ac_word=$2
64885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64886$as_echo_n "checking for $ac_word... " >&6; }
64887if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64888  $as_echo_n "(cached) " >&6
64889else
64890  case $ICECC_CREATE_ENV in
64891  [\\/]* | ?:[\\/]*)
64892  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64893  ;;
64894  *)
64895  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64896for as_dir in $PATH
64897do
64898  IFS=$as_save_IFS
64899  test -z "$as_dir" && as_dir=.
64900    for ac_exec_ext in '' $ac_executable_extensions; do
64901  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64902    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64903    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64904    break 2
64905  fi
64906done
64907  done
64908IFS=$as_save_IFS
64909
64910  ;;
64911esac
64912fi
64913ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64914if test -n "$ICECC_CREATE_ENV"; then
64915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64916$as_echo "$ICECC_CREATE_ENV" >&6; }
64917else
64918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64919$as_echo "no" >&6; }
64920fi
64921
64922
64923          if test "x$ICECC_CREATE_ENV" = x; then
64924            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
64925          fi
64926        else
64927          # Otherwise we believe it is a complete path. Use it as it is.
64928          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
64929$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
64930          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
64931$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
64932          if test ! -x "$tool_specified"; then
64933            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
64934$as_echo "not found" >&6; }
64935            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
64936          fi
64937          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
64938$as_echo "$tool_specified" >&6; }
64939        fi
64940      fi
64941    fi
64942
64943  fi
64944
64945
64946
64947  if test "x$ICECC_CREATE_ENV" = x; then
64948    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
64949  fi
64950
64951
64952    # Use icecc-create-env to create a minimal compilation environment that can
64953    # be sent to the other hosts in the icecream cluster.
64954    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
64955    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
64956    # Older versions of icecc does not have the --gcc parameter
64957    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
64958      icecc_gcc_arg="--gcc"
64959    fi
64960    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
64961
64962  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
64963      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
64964          ${icecc_create_env_log} 2>&1 )
64965  if test "$?" != "0"; then
64966    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
64967$as_echo "$as_me: icecc-create-env output:" >&6;}
64968    cat \
64969          ${icecc_create_env_log}
64970    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
64971  fi
64972
64973    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
64974      # For clang, the icecc compilerwrapper is needed. It usually resides next
64975      # to icecc-create-env.
64976
64977
64978
64979  # Publish this variable in the help.
64980
64981
64982  if [ -z "${ICECC_WRAPPER+x}" ]; then
64983    # The variable is not set by user, try to locate tool using the code snippet
64984    for ac_prog in compilerwrapper
64985do
64986  # Extract the first word of "$ac_prog", so it can be a program name with args.
64987set dummy $ac_prog; ac_word=$2
64988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64989$as_echo_n "checking for $ac_word... " >&6; }
64990if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
64991  $as_echo_n "(cached) " >&6
64992else
64993  case $ICECC_WRAPPER in
64994  [\\/]* | ?:[\\/]*)
64995  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
64996  ;;
64997  *)
64998  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64999for as_dir in $PATH
65000do
65001  IFS=$as_save_IFS
65002  test -z "$as_dir" && as_dir=.
65003    for ac_exec_ext in '' $ac_executable_extensions; do
65004  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65005    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65006    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65007    break 2
65008  fi
65009done
65010  done
65011IFS=$as_save_IFS
65012
65013  ;;
65014esac
65015fi
65016ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65017if test -n "$ICECC_WRAPPER"; then
65018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65019$as_echo "$ICECC_WRAPPER" >&6; }
65020else
65021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65022$as_echo "no" >&6; }
65023fi
65024
65025
65026  test -n "$ICECC_WRAPPER" && break
65027done
65028
65029  else
65030    # The variable is set, but is it from the command line or the environment?
65031
65032    # Try to remove the string !ICECC_WRAPPER! from our list.
65033    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
65034    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65035      # If it failed, the variable was not from the command line. Ignore it,
65036      # but warn the user (except for BASH, which is always set by the calling BASH).
65037      if test "xICECC_WRAPPER" != xBASH; then
65038        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
65039$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
65040      fi
65041      # Try to locate tool using the code snippet
65042      for ac_prog in compilerwrapper
65043do
65044  # Extract the first word of "$ac_prog", so it can be a program name with args.
65045set dummy $ac_prog; ac_word=$2
65046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65047$as_echo_n "checking for $ac_word... " >&6; }
65048if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65049  $as_echo_n "(cached) " >&6
65050else
65051  case $ICECC_WRAPPER in
65052  [\\/]* | ?:[\\/]*)
65053  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65054  ;;
65055  *)
65056  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65057for as_dir in $PATH
65058do
65059  IFS=$as_save_IFS
65060  test -z "$as_dir" && as_dir=.
65061    for ac_exec_ext in '' $ac_executable_extensions; do
65062  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65063    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65064    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65065    break 2
65066  fi
65067done
65068  done
65069IFS=$as_save_IFS
65070
65071  ;;
65072esac
65073fi
65074ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65075if test -n "$ICECC_WRAPPER"; then
65076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65077$as_echo "$ICECC_WRAPPER" >&6; }
65078else
65079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65080$as_echo "no" >&6; }
65081fi
65082
65083
65084  test -n "$ICECC_WRAPPER" && break
65085done
65086
65087    else
65088      # If it succeeded, then it was overridden by the user. We will use it
65089      # for the tool.
65090
65091      # First remove it from the list of overridden variables, so we can test
65092      # for unknown variables in the end.
65093      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65094
65095      # Check if we try to supply an empty value
65096      if test "x$ICECC_WRAPPER" = x; then
65097        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
65098$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
65099        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65100$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65101        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65102$as_echo "disabled" >&6; }
65103      else
65104        # Check if the provided tool contains a complete path.
65105        tool_specified="$ICECC_WRAPPER"
65106        tool_basename="${tool_specified##*/}"
65107        if test "x$tool_basename" = "x$tool_specified"; then
65108          # A command without a complete path is provided, search $PATH.
65109          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
65110$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
65111          # Extract the first word of "$tool_basename", so it can be a program name with args.
65112set dummy $tool_basename; ac_word=$2
65113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65114$as_echo_n "checking for $ac_word... " >&6; }
65115if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65116  $as_echo_n "(cached) " >&6
65117else
65118  case $ICECC_WRAPPER in
65119  [\\/]* | ?:[\\/]*)
65120  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65121  ;;
65122  *)
65123  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65124for as_dir in $PATH
65125do
65126  IFS=$as_save_IFS
65127  test -z "$as_dir" && as_dir=.
65128    for ac_exec_ext in '' $ac_executable_extensions; do
65129  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65130    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65131    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65132    break 2
65133  fi
65134done
65135  done
65136IFS=$as_save_IFS
65137
65138  ;;
65139esac
65140fi
65141ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65142if test -n "$ICECC_WRAPPER"; then
65143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65144$as_echo "$ICECC_WRAPPER" >&6; }
65145else
65146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65147$as_echo "no" >&6; }
65148fi
65149
65150
65151          if test "x$ICECC_WRAPPER" = x; then
65152            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65153          fi
65154        else
65155          # Otherwise we believe it is a complete path. Use it as it is.
65156          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
65157$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
65158          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65159$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65160          if test ! -x "$tool_specified"; then
65161            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65162$as_echo "not found" >&6; }
65163            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
65164          fi
65165          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65166$as_echo "$tool_specified" >&6; }
65167        fi
65168      fi
65169    fi
65170
65171  fi
65172
65173
65174
65175  if test "x$ICECC_WRAPPER" = x; then
65176    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
65177  fi
65178
65179
65180
65181  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65182      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
65183  if test "$?" != "0"; then
65184    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65185$as_echo "$as_me: icecc-create-env output:" >&6;}
65186    cat ${icecc_create_env_log}
65187    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65188  fi
65189
65190    else
65191      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
65192    fi
65193    PATH="$old_path"
65194    # The bundle with the compiler gets a name based on checksums. Parse log file
65195    # to find it.
65196    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
65197    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65198    if test ! -f ${ICECC_ENV_BUNDLE}; then
65199      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65200    fi
65201    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
65202$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
65203    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65204$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65205    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
65206
65207    if test "x${COMPILE_TYPE}" = "xcross"; then
65208      # If cross compiling, create a separate env package for the build compiler
65209      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
65210      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
65211      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
65212
65213  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65214      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
65215            ${icecc_create_env_log_build} 2>&1 )
65216  if test "$?" != "0"; then
65217    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65218$as_echo "$as_me: icecc-create-env output:" >&6;}
65219    cat \
65220            ${icecc_create_env_log_build}
65221    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65222  fi
65223
65224      elif test "x${BUILD_CC##*/}" = "xclang"; then
65225
65226  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65227      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
65228  if test "$?" != "0"; then
65229    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65230$as_echo "$as_me: icecc-create-env output:" >&6;}
65231    cat ${icecc_create_env_log_build}
65232    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65233  fi
65234
65235      else
65236        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
65237      fi
65238      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
65239      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65240      if test ! -f ${ICECC_ENV_BUNDLE}; then
65241        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65242      fi
65243      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
65244$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
65245      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65246$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65247      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
65248          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
65249    else
65250      BUILD_ICECC="${ICECC}"
65251    fi
65252
65253
65254  fi
65255
65256
65257# Can the C/C++ compiler use precompiled headers?
65258
65259
65260  ###############################################################################
65261  #
65262  # Can the C/C++ compiler use precompiled headers?
65263  #
65264  # Check whether --enable-precompiled-headers was given.
65265if test "${enable_precompiled_headers+set}" = set; then :
65266  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
65267else
65268  ENABLE_PRECOMPH=yes
65269fi
65270
65271
65272  USE_PRECOMPILED_HEADER=1
65273  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
65274$as_echo_n "checking If precompiled header is enabled... " >&6; }
65275  if test "x$ENABLE_PRECOMPH" = xno; then
65276    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65277$as_echo "no, forced" >&6; }
65278    USE_PRECOMPILED_HEADER=0
65279  elif test "x$ICECC" != "x"; then
65280    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
65281$as_echo "no, does not work effectively with icecc" >&6; }
65282    USE_PRECOMPILED_HEADER=0
65283  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
65284    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
65285$as_echo "no, does not work with Solaris Studio" >&6; }
65286    USE_PRECOMPILED_HEADER=0
65287  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
65288    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with xlc" >&5
65289$as_echo "no, does not work with xlc" >&6; }
65290    USE_PRECOMPILED_HEADER=0
65291  else
65292    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65293$as_echo "yes" >&6; }
65294  fi
65295
65296  if test "x$ENABLE_PRECOMPH" = xyes; then
65297    # Check that the compiler actually supports precomp headers.
65298    if test "x$TOOLCHAIN_TYPE" = xgcc; then
65299      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
65300$as_echo_n "checking that precompiled headers work... " >&6; }
65301      echo "int alfa();" > conftest.h
65302      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
65303      if test ! -f conftest.hpp.gch; then
65304        USE_PRECOMPILED_HEADER=0
65305        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65306$as_echo "no" >&6; }
65307      else
65308        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65309$as_echo "yes" >&6; }
65310      fi
65311      $RM conftest.h conftest.hpp.gch
65312    fi
65313  fi
65314
65315
65316
65317
65318# Setup use of ccache, if available
65319
65320  # Check whether --enable-ccache was given.
65321if test "${enable_ccache+set}" = set; then :
65322  enableval=$enable_ccache;
65323fi
65324
65325
65326  CCACHE=
65327  CCACHE_STATUS=
65328  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
65329$as_echo_n "checking is ccache enabled... " >&6; }
65330  if test "x$enable_ccache" = xyes; then
65331    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
65332      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65333$as_echo "yes" >&6; }
65334      OLD_PATH="$PATH"
65335      if test "x$TOOLCHAIN_PATH" != x; then
65336        PATH=$TOOLCHAIN_PATH:$PATH
65337      fi
65338
65339
65340
65341  # Publish this variable in the help.
65342
65343
65344  if [ -z "${CCACHE+x}" ]; then
65345    # The variable is not set by user, try to locate tool using the code snippet
65346    for ac_prog in ccache
65347do
65348  # Extract the first word of "$ac_prog", so it can be a program name with args.
65349set dummy $ac_prog; ac_word=$2
65350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65351$as_echo_n "checking for $ac_word... " >&6; }
65352if ${ac_cv_path_CCACHE+:} false; then :
65353  $as_echo_n "(cached) " >&6
65354else
65355  case $CCACHE in
65356  [\\/]* | ?:[\\/]*)
65357  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65358  ;;
65359  *)
65360  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65361for as_dir in $PATH
65362do
65363  IFS=$as_save_IFS
65364  test -z "$as_dir" && as_dir=.
65365    for ac_exec_ext in '' $ac_executable_extensions; do
65366  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65367    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65368    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65369    break 2
65370  fi
65371done
65372  done
65373IFS=$as_save_IFS
65374
65375  ;;
65376esac
65377fi
65378CCACHE=$ac_cv_path_CCACHE
65379if test -n "$CCACHE"; then
65380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65381$as_echo "$CCACHE" >&6; }
65382else
65383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65384$as_echo "no" >&6; }
65385fi
65386
65387
65388  test -n "$CCACHE" && break
65389done
65390
65391  else
65392    # The variable is set, but is it from the command line or the environment?
65393
65394    # Try to remove the string !CCACHE! from our list.
65395    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
65396    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65397      # If it failed, the variable was not from the command line. Ignore it,
65398      # but warn the user (except for BASH, which is always set by the calling BASH).
65399      if test "xCCACHE" != xBASH; then
65400        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
65401$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
65402      fi
65403      # Try to locate tool using the code snippet
65404      for ac_prog in ccache
65405do
65406  # Extract the first word of "$ac_prog", so it can be a program name with args.
65407set dummy $ac_prog; ac_word=$2
65408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65409$as_echo_n "checking for $ac_word... " >&6; }
65410if ${ac_cv_path_CCACHE+:} false; then :
65411  $as_echo_n "(cached) " >&6
65412else
65413  case $CCACHE in
65414  [\\/]* | ?:[\\/]*)
65415  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65416  ;;
65417  *)
65418  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65419for as_dir in $PATH
65420do
65421  IFS=$as_save_IFS
65422  test -z "$as_dir" && as_dir=.
65423    for ac_exec_ext in '' $ac_executable_extensions; do
65424  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65425    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65426    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65427    break 2
65428  fi
65429done
65430  done
65431IFS=$as_save_IFS
65432
65433  ;;
65434esac
65435fi
65436CCACHE=$ac_cv_path_CCACHE
65437if test -n "$CCACHE"; then
65438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65439$as_echo "$CCACHE" >&6; }
65440else
65441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65442$as_echo "no" >&6; }
65443fi
65444
65445
65446  test -n "$CCACHE" && break
65447done
65448
65449    else
65450      # If it succeeded, then it was overridden by the user. We will use it
65451      # for the tool.
65452
65453      # First remove it from the list of overridden variables, so we can test
65454      # for unknown variables in the end.
65455      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65456
65457      # Check if we try to supply an empty value
65458      if test "x$CCACHE" = x; then
65459        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
65460$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
65461        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65462$as_echo_n "checking for CCACHE... " >&6; }
65463        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65464$as_echo "disabled" >&6; }
65465      else
65466        # Check if the provided tool contains a complete path.
65467        tool_specified="$CCACHE"
65468        tool_basename="${tool_specified##*/}"
65469        if test "x$tool_basename" = "x$tool_specified"; then
65470          # A command without a complete path is provided, search $PATH.
65471          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
65472$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
65473          # Extract the first word of "$tool_basename", so it can be a program name with args.
65474set dummy $tool_basename; ac_word=$2
65475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65476$as_echo_n "checking for $ac_word... " >&6; }
65477if ${ac_cv_path_CCACHE+:} false; then :
65478  $as_echo_n "(cached) " >&6
65479else
65480  case $CCACHE in
65481  [\\/]* | ?:[\\/]*)
65482  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65483  ;;
65484  *)
65485  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65486for as_dir in $PATH
65487do
65488  IFS=$as_save_IFS
65489  test -z "$as_dir" && as_dir=.
65490    for ac_exec_ext in '' $ac_executable_extensions; do
65491  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65492    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65493    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65494    break 2
65495  fi
65496done
65497  done
65498IFS=$as_save_IFS
65499
65500  ;;
65501esac
65502fi
65503CCACHE=$ac_cv_path_CCACHE
65504if test -n "$CCACHE"; then
65505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65506$as_echo "$CCACHE" >&6; }
65507else
65508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65509$as_echo "no" >&6; }
65510fi
65511
65512
65513          if test "x$CCACHE" = x; then
65514            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65515          fi
65516        else
65517          # Otherwise we believe it is a complete path. Use it as it is.
65518          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
65519$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
65520          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65521$as_echo_n "checking for CCACHE... " >&6; }
65522          if test ! -x "$tool_specified"; then
65523            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65524$as_echo "not found" >&6; }
65525            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
65526          fi
65527          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65528$as_echo "$tool_specified" >&6; }
65529        fi
65530      fi
65531    fi
65532
65533  fi
65534
65535
65536
65537  if test "x$CCACHE" = x; then
65538    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
65539  fi
65540
65541
65542      PATH="$OLD_PATH"
65543      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
65544      CCACHE_STATUS="Active ($CCACHE_VERSION)"
65545    else
65546      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65547$as_echo "no" >&6; }
65548      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
65549$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
65550    fi
65551  elif test "x$enable_ccache" = xno; then
65552    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
65553$as_echo "no, explicitly disabled" >&6; }
65554    CCACHE_STATUS="Disabled"
65555  elif test "x$enable_ccache" = x; then
65556    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65557$as_echo "no" >&6; }
65558  else
65559    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
65560$as_echo "unknown" >&6; }
65561    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
65562  fi
65563
65564
65565
65566# Check whether --with-ccache-dir was given.
65567if test "${with_ccache_dir+set}" = set; then :
65568  withval=$with_ccache_dir;
65569fi
65570
65571
65572  if test "x$with_ccache_dir" != x; then
65573    # When using a non home ccache directory, assume the use is to share ccache files
65574    # with other users. Thus change the umask.
65575    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
65576    if test "x$CCACHE" = x; then
65577      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
65578$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
65579    fi
65580  fi
65581
65582  if test "x$CCACHE" != x; then
65583
65584  if test "x$CCACHE" != x; then
65585    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
65586      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
65587          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
65588      if test "x$HAS_BAD_CCACHE" != "x"; then
65589        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
65590      fi
65591      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
65592$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
65593      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
65594      PUSHED_FLAGS="$CXXFLAGS"
65595      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
65596      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65597/* end confdefs.h.  */
65598
65599int
65600main ()
65601{
65602
65603  ;
65604  return 0;
65605}
65606_ACEOF
65607if ac_fn_cxx_try_compile "$LINENO"; then :
65608  CC_KNOWS_CCACHE_TRICK=yes
65609else
65610  CC_KNOWS_CCACHE_TRICK=no
65611fi
65612rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
65613      CXXFLAGS="$PUSHED_FLAGS"
65614      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
65615        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65616$as_echo "yes" >&6; }
65617        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
65618
65619        CCACHE_SLOPPINESS=pch_defines,time_macros
65620      else
65621        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65622$as_echo "no" >&6; }
65623        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
65624      fi
65625    fi
65626
65627    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
65628        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
65629
65630    if test "x$SET_CCACHE_DIR" != x; then
65631      mkdir -p $CCACHE_DIR > /dev/null 2>&1
65632      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
65633    fi
65634  fi
65635
65636  fi
65637
65638
65639###############################################################################
65640#
65641# And now the finish...
65642#
65643###############################################################################
65644
65645# Check for some common pitfalls
65646
65647  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65648    file_to_test="$SRC_ROOT/LICENSE"
65649    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
65650      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
65651    fi
65652  fi
65653
65654
65655  # Did user specify any unknown variables?
65656
65657  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
65658    # Replace the separating ! with spaces before presenting for end user.
65659    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
65660    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
65661$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
65662  fi
65663
65664
65665  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
65666$as_echo_n "checking if build directory is on local disk... " >&6; }
65667
65668  # df -l lists only local disks; if the given directory is not found then
65669  # a non-zero exit code is given
65670  if test "x$DF" = x; then
65671    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65672      # msys does not have df; use Windows "net use" instead.
65673      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
65674      if test "x$IS_NETWORK_DISK" = x; then
65675        OUTPUT_DIR_IS_LOCAL="yes"
65676      else
65677        OUTPUT_DIR_IS_LOCAL="no"
65678      fi
65679    else
65680      # No df here, say it's local
65681      OUTPUT_DIR_IS_LOCAL="yes"
65682    fi
65683  else
65684    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
65685      OUTPUT_DIR_IS_LOCAL="yes"
65686    else
65687      OUTPUT_DIR_IS_LOCAL="no"
65688    fi
65689  fi
65690
65691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
65692$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
65693
65694
65695
65696  # Check if the user has any old-style ALT_ variables set.
65697  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
65698
65699  # Before generating output files, test if they exist. If they do, this is a reconfigure.
65700  # Since we can't properly handle the dependencies for this, warn the user about the situation
65701  if test -e $OUTPUT_ROOT/spec.gmk; then
65702    IS_RECONFIGURE=yes
65703  else
65704    IS_RECONFIGURE=no
65705  fi
65706
65707
65708# At the end, call the custom hook. (Dummy macro if no custom sources available)
65709
65710
65711# This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
65712
65713  # Keep feature lists sorted and free of duplicates
65714  JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
65715  JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
65716  JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
65717  JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
65718  JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
65719  JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
65720  JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
65721
65722  # Validate features
65723  for variant in $JVM_VARIANTS; do
65724    { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
65725$as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
65726    features_var_name=JVM_FEATURES_$variant
65727    JVM_FEATURES_TO_TEST=${!features_var_name}
65728    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
65729$as_echo "$JVM_FEATURES_TO_TEST" >&6; }
65730    NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
65731    STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
65732    INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
65733    if test "x$INVALID_FEATURES" != x; then
65734      as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
65735    fi
65736  done
65737
65738
65739# We're messing a bit with internal autoconf variables to put the config.status
65740# in the output directory instead of the current directory.
65741CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
65742
65743# Create the actual output files. Now the main work of configure is done.
65744cat >confcache <<\_ACEOF
65745# This file is a shell script that caches the results of configure
65746# tests run on this system so they can be shared between configure
65747# scripts and configure runs, see configure's option --config-cache.
65748# It is not useful on other systems.  If it contains results you don't
65749# want to keep, you may remove or edit it.
65750#
65751# config.status only pays attention to the cache file if you give it
65752# the --recheck option to rerun configure.
65753#
65754# `ac_cv_env_foo' variables (set or unset) will be overridden when
65755# loading this file, other *unset* `ac_cv_foo' will be assigned the
65756# following values.
65757
65758_ACEOF
65759
65760# The following way of writing the cache mishandles newlines in values,
65761# but we know of no workaround that is simple, portable, and efficient.
65762# So, we kill variables containing newlines.
65763# Ultrix sh set writes to stderr and can't be redirected directly,
65764# and sets the high bit in the cache file unless we assign to the vars.
65765(
65766  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
65767    eval ac_val=\$$ac_var
65768    case $ac_val in #(
65769    *${as_nl}*)
65770      case $ac_var in #(
65771      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
65772$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
65773      esac
65774      case $ac_var in #(
65775      _ | IFS | as_nl) ;; #(
65776      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
65777      *) { eval $ac_var=; unset $ac_var;} ;;
65778      esac ;;
65779    esac
65780  done
65781
65782  (set) 2>&1 |
65783    case $as_nl`(ac_space=' '; set) 2>&1` in #(
65784    *${as_nl}ac_space=\ *)
65785      # `set' does not quote correctly, so add quotes: double-quote
65786      # substitution turns \\\\ into \\, and sed turns \\ into \.
65787      sed -n \
65788	"s/'/'\\\\''/g;
65789	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
65790      ;; #(
65791    *)
65792      # `set' quotes correctly as required by POSIX, so do not add quotes.
65793      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
65794      ;;
65795    esac |
65796    sort
65797) |
65798  sed '
65799     /^ac_cv_env_/b end
65800     t clear
65801     :clear
65802     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
65803     t end
65804     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
65805     :end' >>confcache
65806if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
65807  if test -w "$cache_file"; then
65808    if test "x$cache_file" != "x/dev/null"; then
65809      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
65810$as_echo "$as_me: updating cache $cache_file" >&6;}
65811      if test ! -f "$cache_file" || test -h "$cache_file"; then
65812	cat confcache >"$cache_file"
65813      else
65814        case $cache_file in #(
65815        */* | ?:*)
65816	  mv -f confcache "$cache_file"$$ &&
65817	  mv -f "$cache_file"$$ "$cache_file" ;; #(
65818        *)
65819	  mv -f confcache "$cache_file" ;;
65820	esac
65821      fi
65822    fi
65823  else
65824    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
65825$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
65826  fi
65827fi
65828rm -f confcache
65829
65830test "x$prefix" = xNONE && prefix=$ac_default_prefix
65831# Let make expand exec_prefix.
65832test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
65833
65834# Transform confdefs.h into DEFS.
65835# Protect against shell expansion while executing Makefile rules.
65836# Protect against Makefile macro expansion.
65837#
65838# If the first sed substitution is executed (which looks for macros that
65839# take arguments), then branch to the quote section.  Otherwise,
65840# look for a macro that doesn't take arguments.
65841ac_script='
65842:mline
65843/\\$/{
65844 N
65845 s,\\\n,,
65846 b mline
65847}
65848t clear
65849:clear
65850s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
65851t quote
65852s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
65853t quote
65854b any
65855:quote
65856s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
65857s/\[/\\&/g
65858s/\]/\\&/g
65859s/\$/$$/g
65860H
65861:any
65862${
65863	g
65864	s/^\n//
65865	s/\n/ /g
65866	p
65867}
65868'
65869DEFS=`sed -n "$ac_script" confdefs.h`
65870
65871
65872ac_libobjs=
65873ac_ltlibobjs=
65874U=
65875for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
65876  # 1. Remove the extension, and $U if already installed.
65877  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
65878  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
65879  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
65880  #    will be set to the directory where LIBOBJS objects are built.
65881  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
65882  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
65883done
65884LIBOBJS=$ac_libobjs
65885
65886LTLIBOBJS=$ac_ltlibobjs
65887
65888
65889
65890: "${CONFIG_STATUS=./config.status}"
65891ac_write_fail=0
65892ac_clean_files_save=$ac_clean_files
65893ac_clean_files="$ac_clean_files $CONFIG_STATUS"
65894{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
65895$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
65896as_write_fail=0
65897cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
65898#! $SHELL
65899# Generated by $as_me.
65900# Run this file to recreate the current configuration.
65901# Compiler output produced by configure, useful for debugging
65902# configure, is in config.log if it exists.
65903
65904debug=false
65905ac_cs_recheck=false
65906ac_cs_silent=false
65907
65908SHELL=\${CONFIG_SHELL-$SHELL}
65909export SHELL
65910_ASEOF
65911cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
65912## -------------------- ##
65913## M4sh Initialization. ##
65914## -------------------- ##
65915
65916# Be more Bourne compatible
65917DUALCASE=1; export DUALCASE # for MKS sh
65918if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
65919  emulate sh
65920  NULLCMD=:
65921  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
65922  # is contrary to our usage.  Disable this feature.
65923  alias -g '${1+"$@"}'='"$@"'
65924  setopt NO_GLOB_SUBST
65925else
65926  case `(set -o) 2>/dev/null` in #(
65927  *posix*) :
65928    set -o posix ;; #(
65929  *) :
65930     ;;
65931esac
65932fi
65933
65934
65935as_nl='
65936'
65937export as_nl
65938# Printing a long string crashes Solaris 7 /usr/bin/printf.
65939as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
65940as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
65941as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
65942# Prefer a ksh shell builtin over an external printf program on Solaris,
65943# but without wasting forks for bash or zsh.
65944if test -z "$BASH_VERSION$ZSH_VERSION" \
65945    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
65946  as_echo='print -r --'
65947  as_echo_n='print -rn --'
65948elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
65949  as_echo='printf %s\n'
65950  as_echo_n='printf %s'
65951else
65952  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
65953    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
65954    as_echo_n='/usr/ucb/echo -n'
65955  else
65956    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
65957    as_echo_n_body='eval
65958      arg=$1;
65959      case $arg in #(
65960      *"$as_nl"*)
65961	expr "X$arg" : "X\\(.*\\)$as_nl";
65962	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
65963      esac;
65964      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
65965    '
65966    export as_echo_n_body
65967    as_echo_n='sh -c $as_echo_n_body as_echo'
65968  fi
65969  export as_echo_body
65970  as_echo='sh -c $as_echo_body as_echo'
65971fi
65972
65973# The user is always right.
65974if test "${PATH_SEPARATOR+set}" != set; then
65975  PATH_SEPARATOR=:
65976  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
65977    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
65978      PATH_SEPARATOR=';'
65979  }
65980fi
65981
65982
65983# IFS
65984# We need space, tab and new line, in precisely that order.  Quoting is
65985# there to prevent editors from complaining about space-tab.
65986# (If _AS_PATH_WALK were called with IFS unset, it would disable word
65987# splitting by setting IFS to empty value.)
65988IFS=" ""	$as_nl"
65989
65990# Find who we are.  Look in the path if we contain no directory separator.
65991as_myself=
65992case $0 in #((
65993  *[\\/]* ) as_myself=$0 ;;
65994  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65995for as_dir in $PATH
65996do
65997  IFS=$as_save_IFS
65998  test -z "$as_dir" && as_dir=.
65999    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
66000  done
66001IFS=$as_save_IFS
66002
66003     ;;
66004esac
66005# We did not find ourselves, most probably we were run as `sh COMMAND'
66006# in which case we are not to be found in the path.
66007if test "x$as_myself" = x; then
66008  as_myself=$0
66009fi
66010if test ! -f "$as_myself"; then
66011  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
66012  exit 1
66013fi
66014
66015# Unset variables that we do not need and which cause bugs (e.g. in
66016# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
66017# suppresses any "Segmentation fault" message there.  '((' could
66018# trigger a bug in pdksh 5.2.14.
66019for as_var in BASH_ENV ENV MAIL MAILPATH
66020do eval test x\${$as_var+set} = xset \
66021  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
66022done
66023PS1='$ '
66024PS2='> '
66025PS4='+ '
66026
66027# NLS nuisances.
66028LC_ALL=C
66029export LC_ALL
66030LANGUAGE=C
66031export LANGUAGE
66032
66033# CDPATH.
66034(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
66035
66036
66037# as_fn_error STATUS ERROR [LINENO LOG_FD]
66038# ----------------------------------------
66039# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
66040# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
66041# script with STATUS, using 1 if that was 0.
66042as_fn_error ()
66043{
66044  as_status=$1; test $as_status -eq 0 && as_status=1
66045  if test "$4"; then
66046    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
66047    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
66048  fi
66049  $as_echo "$as_me: error: $2" >&2
66050  as_fn_exit $as_status
66051} # as_fn_error
66052
66053
66054# as_fn_set_status STATUS
66055# -----------------------
66056# Set $? to STATUS, without forking.
66057as_fn_set_status ()
66058{
66059  return $1
66060} # as_fn_set_status
66061
66062# as_fn_exit STATUS
66063# -----------------
66064# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
66065as_fn_exit ()
66066{
66067  set +e
66068  as_fn_set_status $1
66069  exit $1
66070} # as_fn_exit
66071
66072# as_fn_unset VAR
66073# ---------------
66074# Portably unset VAR.
66075as_fn_unset ()
66076{
66077  { eval $1=; unset $1;}
66078}
66079as_unset=as_fn_unset
66080# as_fn_append VAR VALUE
66081# ----------------------
66082# Append the text in VALUE to the end of the definition contained in VAR. Take
66083# advantage of any shell optimizations that allow amortized linear growth over
66084# repeated appends, instead of the typical quadratic growth present in naive
66085# implementations.
66086if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
66087  eval 'as_fn_append ()
66088  {
66089    eval $1+=\$2
66090  }'
66091else
66092  as_fn_append ()
66093  {
66094    eval $1=\$$1\$2
66095  }
66096fi # as_fn_append
66097
66098# as_fn_arith ARG...
66099# ------------------
66100# Perform arithmetic evaluation on the ARGs, and store the result in the
66101# global $as_val. Take advantage of shells that can avoid forks. The arguments
66102# must be portable across $(()) and expr.
66103if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
66104  eval 'as_fn_arith ()
66105  {
66106    as_val=$(( $* ))
66107  }'
66108else
66109  as_fn_arith ()
66110  {
66111    as_val=`expr "$@" || test $? -eq 1`
66112  }
66113fi # as_fn_arith
66114
66115
66116if expr a : '\(a\)' >/dev/null 2>&1 &&
66117   test "X`expr 00001 : '.*\(...\)'`" = X001; then
66118  as_expr=expr
66119else
66120  as_expr=false
66121fi
66122
66123if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
66124  as_basename=basename
66125else
66126  as_basename=false
66127fi
66128
66129if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
66130  as_dirname=dirname
66131else
66132  as_dirname=false
66133fi
66134
66135as_me=`$as_basename -- "$0" ||
66136$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
66137	 X"$0" : 'X\(//\)$' \| \
66138	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
66139$as_echo X/"$0" |
66140    sed '/^.*\/\([^/][^/]*\)\/*$/{
66141	    s//\1/
66142	    q
66143	  }
66144	  /^X\/\(\/\/\)$/{
66145	    s//\1/
66146	    q
66147	  }
66148	  /^X\/\(\/\).*/{
66149	    s//\1/
66150	    q
66151	  }
66152	  s/.*/./; q'`
66153
66154# Avoid depending upon Character Ranges.
66155as_cr_letters='abcdefghijklmnopqrstuvwxyz'
66156as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
66157as_cr_Letters=$as_cr_letters$as_cr_LETTERS
66158as_cr_digits='0123456789'
66159as_cr_alnum=$as_cr_Letters$as_cr_digits
66160
66161ECHO_C= ECHO_N= ECHO_T=
66162case `echo -n x` in #(((((
66163-n*)
66164  case `echo 'xy\c'` in
66165  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
66166  xy)  ECHO_C='\c';;
66167  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
66168       ECHO_T='	';;
66169  esac;;
66170*)
66171  ECHO_N='-n';;
66172esac
66173
66174rm -f conf$$ conf$$.exe conf$$.file
66175if test -d conf$$.dir; then
66176  rm -f conf$$.dir/conf$$.file
66177else
66178  rm -f conf$$.dir
66179  mkdir conf$$.dir 2>/dev/null
66180fi
66181if (echo >conf$$.file) 2>/dev/null; then
66182  if ln -s conf$$.file conf$$ 2>/dev/null; then
66183    as_ln_s='ln -s'
66184    # ... but there are two gotchas:
66185    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
66186    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
66187    # In both cases, we have to default to `cp -pR'.
66188    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
66189      as_ln_s='cp -pR'
66190  elif ln conf$$.file conf$$ 2>/dev/null; then
66191    as_ln_s=ln
66192  else
66193    as_ln_s='cp -pR'
66194  fi
66195else
66196  as_ln_s='cp -pR'
66197fi
66198rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
66199rmdir conf$$.dir 2>/dev/null
66200
66201
66202# as_fn_mkdir_p
66203# -------------
66204# Create "$as_dir" as a directory, including parents if necessary.
66205as_fn_mkdir_p ()
66206{
66207
66208  case $as_dir in #(
66209  -*) as_dir=./$as_dir;;
66210  esac
66211  test -d "$as_dir" || eval $as_mkdir_p || {
66212    as_dirs=
66213    while :; do
66214      case $as_dir in #(
66215      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
66216      *) as_qdir=$as_dir;;
66217      esac
66218      as_dirs="'$as_qdir' $as_dirs"
66219      as_dir=`$as_dirname -- "$as_dir" ||
66220$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66221	 X"$as_dir" : 'X\(//\)[^/]' \| \
66222	 X"$as_dir" : 'X\(//\)$' \| \
66223	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
66224$as_echo X"$as_dir" |
66225    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66226	    s//\1/
66227	    q
66228	  }
66229	  /^X\(\/\/\)[^/].*/{
66230	    s//\1/
66231	    q
66232	  }
66233	  /^X\(\/\/\)$/{
66234	    s//\1/
66235	    q
66236	  }
66237	  /^X\(\/\).*/{
66238	    s//\1/
66239	    q
66240	  }
66241	  s/.*/./; q'`
66242      test -d "$as_dir" && break
66243    done
66244    test -z "$as_dirs" || eval "mkdir $as_dirs"
66245  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
66246
66247
66248} # as_fn_mkdir_p
66249if mkdir -p . 2>/dev/null; then
66250  as_mkdir_p='mkdir -p "$as_dir"'
66251else
66252  test -d ./-p && rmdir ./-p
66253  as_mkdir_p=false
66254fi
66255
66256
66257# as_fn_executable_p FILE
66258# -----------------------
66259# Test if FILE is an executable regular file.
66260as_fn_executable_p ()
66261{
66262  test -f "$1" && test -x "$1"
66263} # as_fn_executable_p
66264as_test_x='test -x'
66265as_executable_p=as_fn_executable_p
66266
66267# Sed expression to map a string onto a valid CPP name.
66268as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
66269
66270# Sed expression to map a string onto a valid variable name.
66271as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
66272
66273
66274exec 6>&1
66275## ----------------------------------- ##
66276## Main body of $CONFIG_STATUS script. ##
66277## ----------------------------------- ##
66278_ASEOF
66279test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
66280
66281cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66282# Save the log message, to keep $0 and so on meaningful, and to
66283# report actual input values of CONFIG_FILES etc. instead of their
66284# values after options handling.
66285ac_log="
66286This file was extended by OpenJDK $as_me jdk9, which was
66287generated by GNU Autoconf 2.69.  Invocation command line was
66288
66289  CONFIG_FILES    = $CONFIG_FILES
66290  CONFIG_HEADERS  = $CONFIG_HEADERS
66291  CONFIG_LINKS    = $CONFIG_LINKS
66292  CONFIG_COMMANDS = $CONFIG_COMMANDS
66293  $ $0 $@
66294
66295on `(hostname || uname -n) 2>/dev/null | sed 1q`
66296"
66297
66298_ACEOF
66299
66300case $ac_config_files in *"
66301"*) set x $ac_config_files; shift; ac_config_files=$*;;
66302esac
66303
66304
66305
66306cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66307# Files that config.status was made for.
66308config_files="$ac_config_files"
66309
66310_ACEOF
66311
66312cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66313ac_cs_usage="\
66314\`$as_me' instantiates files and other configuration actions
66315from templates according to the current configuration.  Unless the files
66316and actions are specified as TAGs, all are instantiated by default.
66317
66318Usage: $0 [OPTION]... [TAG]...
66319
66320  -h, --help       print this help, then exit
66321  -V, --version    print version number and configuration settings, then exit
66322      --config     print configuration, then exit
66323  -q, --quiet, --silent
66324                   do not print progress messages
66325  -d, --debug      don't remove temporary files
66326      --recheck    update $as_me by reconfiguring in the same conditions
66327      --file=FILE[:TEMPLATE]
66328                   instantiate the configuration file FILE
66329
66330Configuration files:
66331$config_files
66332
66333Report bugs to <build-dev@openjdk.java.net>.
66334OpenJDK home page: <http://openjdk.java.net>."
66335
66336_ACEOF
66337cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66338ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
66339ac_cs_version="\\
66340OpenJDK config.status jdk9
66341configured by $0, generated by GNU Autoconf 2.69,
66342  with options \\"\$ac_cs_config\\"
66343
66344Copyright (C) 2012 Free Software Foundation, Inc.
66345This config.status script is free software; the Free Software Foundation
66346gives unlimited permission to copy, distribute and modify it."
66347
66348ac_pwd='$ac_pwd'
66349srcdir='$srcdir'
66350AWK='$AWK'
66351test -n "\$AWK" || AWK=awk
66352_ACEOF
66353
66354cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66355# The default lists apply if the user does not specify any file.
66356ac_need_defaults=:
66357while test $# != 0
66358do
66359  case $1 in
66360  --*=?*)
66361    ac_option=`expr "X$1" : 'X\([^=]*\)='`
66362    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
66363    ac_shift=:
66364    ;;
66365  --*=)
66366    ac_option=`expr "X$1" : 'X\([^=]*\)='`
66367    ac_optarg=
66368    ac_shift=:
66369    ;;
66370  *)
66371    ac_option=$1
66372    ac_optarg=$2
66373    ac_shift=shift
66374    ;;
66375  esac
66376
66377  case $ac_option in
66378  # Handling of the options.
66379  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
66380    ac_cs_recheck=: ;;
66381  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
66382    $as_echo "$ac_cs_version"; exit ;;
66383  --config | --confi | --conf | --con | --co | --c )
66384    $as_echo "$ac_cs_config"; exit ;;
66385  --debug | --debu | --deb | --de | --d | -d )
66386    debug=: ;;
66387  --file | --fil | --fi | --f )
66388    $ac_shift
66389    case $ac_optarg in
66390    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
66391    '') as_fn_error $? "missing file argument" ;;
66392    esac
66393    as_fn_append CONFIG_FILES " '$ac_optarg'"
66394    ac_need_defaults=false;;
66395  --he | --h |  --help | --hel | -h )
66396    $as_echo "$ac_cs_usage"; exit ;;
66397  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
66398  | -silent | --silent | --silen | --sile | --sil | --si | --s)
66399    ac_cs_silent=: ;;
66400
66401  # This is an error.
66402  -*) as_fn_error $? "unrecognized option: \`$1'
66403Try \`$0 --help' for more information." ;;
66404
66405  *) as_fn_append ac_config_targets " $1"
66406     ac_need_defaults=false ;;
66407
66408  esac
66409  shift
66410done
66411
66412ac_configure_extra_args=
66413
66414if $ac_cs_silent; then
66415  exec 6>/dev/null
66416  ac_configure_extra_args="$ac_configure_extra_args --silent"
66417fi
66418
66419_ACEOF
66420cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66421if \$ac_cs_recheck; then
66422  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
66423  shift
66424  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
66425  CONFIG_SHELL='$SHELL'
66426  export CONFIG_SHELL
66427  exec "\$@"
66428fi
66429
66430_ACEOF
66431cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66432exec 5>>config.log
66433{
66434  echo
66435  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
66436## Running $as_me. ##
66437_ASBOX
66438  $as_echo "$ac_log"
66439} >&5
66440
66441_ACEOF
66442cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66443_ACEOF
66444
66445cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66446
66447# Handling of arguments.
66448for ac_config_target in $ac_config_targets
66449do
66450  case $ac_config_target in
66451    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
66452    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
66453    "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
66454    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
66455    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
66456
66457  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
66458  esac
66459done
66460
66461
66462# If the user did not use the arguments to specify the items to instantiate,
66463# then the envvar interface is used.  Set only those that are not.
66464# We use the long form for the default assignment because of an extremely
66465# bizarre bug on SunOS 4.1.3.
66466if $ac_need_defaults; then
66467  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
66468fi
66469
66470# Have a temporary directory for convenience.  Make it in the build tree
66471# simply because there is no reason against having it here, and in addition,
66472# creating and moving files from /tmp can sometimes cause problems.
66473# Hook for its removal unless debugging.
66474# Note that there is a small window in which the directory will not be cleaned:
66475# after its creation but before its name has been assigned to `$tmp'.
66476$debug ||
66477{
66478  tmp= ac_tmp=
66479  trap 'exit_status=$?
66480  : "${ac_tmp:=$tmp}"
66481  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
66482' 0
66483  trap 'as_fn_exit 1' 1 2 13 15
66484}
66485# Create a (secure) tmp directory for tmp files.
66486
66487{
66488  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
66489  test -d "$tmp"
66490}  ||
66491{
66492  tmp=./conf$$-$RANDOM
66493  (umask 077 && mkdir "$tmp")
66494} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
66495ac_tmp=$tmp
66496
66497# Set up the scripts for CONFIG_FILES section.
66498# No need to generate them if there are no CONFIG_FILES.
66499# This happens for instance with `./config.status config.h'.
66500if test -n "$CONFIG_FILES"; then
66501
66502
66503ac_cr=`echo X | tr X '\015'`
66504# On cygwin, bash can eat \r inside `` if the user requested igncr.
66505# But we know of no other shell where ac_cr would be empty at this
66506# point, so we can use a bashism as a fallback.
66507if test "x$ac_cr" = x; then
66508  eval ac_cr=\$\'\\r\'
66509fi
66510ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
66511if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
66512  ac_cs_awk_cr='\\r'
66513else
66514  ac_cs_awk_cr=$ac_cr
66515fi
66516
66517echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
66518_ACEOF
66519
66520
66521{
66522  echo "cat >conf$$subs.awk <<_ACEOF" &&
66523  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
66524  echo "_ACEOF"
66525} >conf$$subs.sh ||
66526  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66527ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
66528ac_delim='%!_!# '
66529for ac_last_try in false false false false false :; do
66530  . ./conf$$subs.sh ||
66531    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66532
66533  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
66534  if test $ac_delim_n = $ac_delim_num; then
66535    break
66536  elif $ac_last_try; then
66537    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66538  else
66539    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
66540  fi
66541done
66542rm -f conf$$subs.sh
66543
66544cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66545cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
66546_ACEOF
66547sed -n '
66548h
66549s/^/S["/; s/!.*/"]=/
66550p
66551g
66552s/^[^!]*!//
66553:repl
66554t repl
66555s/'"$ac_delim"'$//
66556t delim
66557:nl
66558h
66559s/\(.\{148\}\)..*/\1/
66560t more1
66561s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
66562p
66563n
66564b repl
66565:more1
66566s/["\\]/\\&/g; s/^/"/; s/$/"\\/
66567p
66568g
66569s/.\{148\}//
66570t nl
66571:delim
66572h
66573s/\(.\{148\}\)..*/\1/
66574t more2
66575s/["\\]/\\&/g; s/^/"/; s/$/"/
66576p
66577b
66578:more2
66579s/["\\]/\\&/g; s/^/"/; s/$/"\\/
66580p
66581g
66582s/.\{148\}//
66583t delim
66584' <conf$$subs.awk | sed '
66585/^[^""]/{
66586  N
66587  s/\n//
66588}
66589' >>$CONFIG_STATUS || ac_write_fail=1
66590rm -f conf$$subs.awk
66591cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66592_ACAWK
66593cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
66594  for (key in S) S_is_set[key] = 1
66595  FS = ""
66596
66597}
66598{
66599  line = $ 0
66600  nfields = split(line, field, "@")
66601  substed = 0
66602  len = length(field[1])
66603  for (i = 2; i < nfields; i++) {
66604    key = field[i]
66605    keylen = length(key)
66606    if (S_is_set[key]) {
66607      value = S[key]
66608      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
66609      len += length(value) + length(field[++i])
66610      substed = 1
66611    } else
66612      len += 1 + keylen
66613  }
66614
66615  print line
66616}
66617
66618_ACAWK
66619_ACEOF
66620cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66621if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
66622  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
66623else
66624  cat
66625fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
66626  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
66627_ACEOF
66628
66629# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
66630# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
66631# trailing colons and then remove the whole line if VPATH becomes empty
66632# (actually we leave an empty line to preserve line numbers).
66633if test "x$srcdir" = x.; then
66634  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
66635h
66636s///
66637s/^/:/
66638s/[	 ]*$/:/
66639s/:\$(srcdir):/:/g
66640s/:\${srcdir}:/:/g
66641s/:@srcdir@:/:/g
66642s/^:*//
66643s/:*$//
66644x
66645s/\(=[	 ]*\).*/\1/
66646G
66647s/\n//
66648s/^[^=]*=[	 ]*$//
66649}'
66650fi
66651
66652cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66653fi # test -n "$CONFIG_FILES"
66654
66655
66656eval set X "  :F $CONFIG_FILES      "
66657shift
66658for ac_tag
66659do
66660  case $ac_tag in
66661  :[FHLC]) ac_mode=$ac_tag; continue;;
66662  esac
66663  case $ac_mode$ac_tag in
66664  :[FHL]*:*);;
66665  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
66666  :[FH]-) ac_tag=-:-;;
66667  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
66668  esac
66669  ac_save_IFS=$IFS
66670  IFS=:
66671  set x $ac_tag
66672  IFS=$ac_save_IFS
66673  shift
66674  ac_file=$1
66675  shift
66676
66677  case $ac_mode in
66678  :L) ac_source=$1;;
66679  :[FH])
66680    ac_file_inputs=
66681    for ac_f
66682    do
66683      case $ac_f in
66684      -) ac_f="$ac_tmp/stdin";;
66685      *) # Look for the file first in the build tree, then in the source tree
66686	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
66687	 # because $ac_f cannot contain `:'.
66688	 test -f "$ac_f" ||
66689	   case $ac_f in
66690	   [\\/$]*) false;;
66691	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
66692	   esac ||
66693	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
66694      esac
66695      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
66696      as_fn_append ac_file_inputs " '$ac_f'"
66697    done
66698
66699    # Let's still pretend it is `configure' which instantiates (i.e., don't
66700    # use $as_me), people would be surprised to read:
66701    #    /* config.h.  Generated by config.status.  */
66702    configure_input='Generated from '`
66703	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
66704	`' by configure.'
66705    if test x"$ac_file" != x-; then
66706      configure_input="$ac_file.  $configure_input"
66707      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
66708$as_echo "$as_me: creating $ac_file" >&6;}
66709    fi
66710    # Neutralize special characters interpreted by sed in replacement strings.
66711    case $configure_input in #(
66712    *\&* | *\|* | *\\* )
66713       ac_sed_conf_input=`$as_echo "$configure_input" |
66714       sed 's/[\\\\&|]/\\\\&/g'`;; #(
66715    *) ac_sed_conf_input=$configure_input;;
66716    esac
66717
66718    case $ac_tag in
66719    *:-:* | *:-) cat >"$ac_tmp/stdin" \
66720      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
66721    esac
66722    ;;
66723  esac
66724
66725  ac_dir=`$as_dirname -- "$ac_file" ||
66726$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66727	 X"$ac_file" : 'X\(//\)[^/]' \| \
66728	 X"$ac_file" : 'X\(//\)$' \| \
66729	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
66730$as_echo X"$ac_file" |
66731    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66732	    s//\1/
66733	    q
66734	  }
66735	  /^X\(\/\/\)[^/].*/{
66736	    s//\1/
66737	    q
66738	  }
66739	  /^X\(\/\/\)$/{
66740	    s//\1/
66741	    q
66742	  }
66743	  /^X\(\/\).*/{
66744	    s//\1/
66745	    q
66746	  }
66747	  s/.*/./; q'`
66748  as_dir="$ac_dir"; as_fn_mkdir_p
66749  ac_builddir=.
66750
66751case "$ac_dir" in
66752.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
66753*)
66754  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
66755  # A ".." for each directory in $ac_dir_suffix.
66756  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
66757  case $ac_top_builddir_sub in
66758  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
66759  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
66760  esac ;;
66761esac
66762ac_abs_top_builddir=$ac_pwd
66763ac_abs_builddir=$ac_pwd$ac_dir_suffix
66764# for backward compatibility:
66765ac_top_builddir=$ac_top_build_prefix
66766
66767case $srcdir in
66768  .)  # We are building in place.
66769    ac_srcdir=.
66770    ac_top_srcdir=$ac_top_builddir_sub
66771    ac_abs_top_srcdir=$ac_pwd ;;
66772  [\\/]* | ?:[\\/]* )  # Absolute name.
66773    ac_srcdir=$srcdir$ac_dir_suffix;
66774    ac_top_srcdir=$srcdir
66775    ac_abs_top_srcdir=$srcdir ;;
66776  *) # Relative name.
66777    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
66778    ac_top_srcdir=$ac_top_build_prefix$srcdir
66779    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
66780esac
66781ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
66782
66783
66784  case $ac_mode in
66785  :F)
66786  #
66787  # CONFIG_FILE
66788  #
66789
66790_ACEOF
66791
66792cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66793# If the template does not know about datarootdir, expand it.
66794# FIXME: This hack should be removed a few years after 2.60.
66795ac_datarootdir_hack=; ac_datarootdir_seen=
66796ac_sed_dataroot='
66797/datarootdir/ {
66798  p
66799  q
66800}
66801/@datadir@/p
66802/@docdir@/p
66803/@infodir@/p
66804/@localedir@/p
66805/@mandir@/p'
66806case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
66807*datarootdir*) ac_datarootdir_seen=yes;;
66808*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
66809  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
66810$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
66811_ACEOF
66812cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66813  ac_datarootdir_hack='
66814  s&@datadir@&$datadir&g
66815  s&@docdir@&$docdir&g
66816  s&@infodir@&$infodir&g
66817  s&@localedir@&$localedir&g
66818  s&@mandir@&$mandir&g
66819  s&\\\${datarootdir}&$datarootdir&g' ;;
66820esac
66821_ACEOF
66822
66823# Neutralize VPATH when `$srcdir' = `.'.
66824# Shell code in configure.ac might set extrasub.
66825# FIXME: do we really want to maintain this feature?
66826cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66827ac_sed_extra="$ac_vpsub
66828$extrasub
66829_ACEOF
66830cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66831:t
66832/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
66833s|@configure_input@|$ac_sed_conf_input|;t t
66834s&@top_builddir@&$ac_top_builddir_sub&;t t
66835s&@top_build_prefix@&$ac_top_build_prefix&;t t
66836s&@srcdir@&$ac_srcdir&;t t
66837s&@abs_srcdir@&$ac_abs_srcdir&;t t
66838s&@top_srcdir@&$ac_top_srcdir&;t t
66839s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
66840s&@builddir@&$ac_builddir&;t t
66841s&@abs_builddir@&$ac_abs_builddir&;t t
66842s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
66843$ac_datarootdir_hack
66844"
66845eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
66846  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
66847
66848test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
66849  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
66850  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
66851      "$ac_tmp/out"`; test -z "$ac_out"; } &&
66852  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
66853which seems to be undefined.  Please make sure it is defined" >&5
66854$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
66855which seems to be undefined.  Please make sure it is defined" >&2;}
66856
66857  rm -f "$ac_tmp/stdin"
66858  case $ac_file in
66859  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
66860  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
66861  esac \
66862  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
66863 ;;
66864
66865
66866
66867  esac
66868
66869done # for ac_tag
66870
66871
66872as_fn_exit 0
66873_ACEOF
66874ac_clean_files=$ac_clean_files_save
66875
66876test $ac_write_fail = 0 ||
66877  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
66878
66879
66880# configure is writing to config.log, and then calls config.status.
66881# config.status does its own redirection, appending to config.log.
66882# Unfortunately, on DOS this fails, as config.log is still kept open
66883# by configure, so config.status won't be able to write to it; its
66884# output is simply discarded.  So we exec the FD to /dev/null,
66885# effectively closing config.log, so it can be properly (re)opened and
66886# appended to by config.status.  When coming back to configure, we
66887# need to make the FD available again.
66888if test "$no_create" != yes; then
66889  ac_cs_success=:
66890  ac_config_status_args=
66891  test "$silent" = yes &&
66892    ac_config_status_args="$ac_config_status_args --quiet"
66893  exec 5>/dev/null
66894  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
66895  exec 5>>config.log
66896  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
66897  # would make configure fail if this is the last instruction.
66898  $ac_cs_success || as_fn_exit 1
66899fi
66900if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
66901  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
66902$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
66903fi
66904
66905
66906# After AC_OUTPUT, we need to do final work
66907
66908
66909  # Try to move config.log (generated by autoconf) to the configure-support directory.
66910  if test -e ./config.log; then
66911    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
66912  fi
66913
66914  # Rotate our log file (configure.log)
66915  if test -e "$OUTPUT_ROOT/configure.log.old"; then
66916    $RM -f "$OUTPUT_ROOT/configure.log.old"
66917  fi
66918  if test -e "$OUTPUT_ROOT/configure.log"; then
66919    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
66920  fi
66921
66922  # Move configure.log from current directory to the build output root
66923  if test -e ./configure.log; then
66924    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
66925  fi
66926
66927  # Make the compare script executable
66928  $CHMOD +x $OUTPUT_ROOT/compare.sh
66929
66930
66931# Finally output some useful information to the user
66932
66933  # Finally output some useful information to the user
66934
66935  printf "\n"
66936  printf "====================================================\n"
66937  if test "x$no_create" != "xyes"; then
66938    if test "x$IS_RECONFIGURE" != "xyes"; then
66939      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
66940    else
66941      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
66942    fi
66943  else
66944    if test "x$IS_RECONFIGURE" != "xyes"; then
66945      printf "A configuration has been successfully checked but not created\n"
66946    else
66947      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
66948    fi
66949  fi
66950  if test "x$CONFIGURE_COMMAND_LINE" != x; then
66951    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
66952  else
66953    printf "using default settings.\n"
66954  fi
66955
66956  printf "\n"
66957  printf "Configuration summary:\n"
66958  printf "* Debug level:    $DEBUG_LEVEL\n"
66959  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
66960  printf "* JDK variant:    $JDK_VARIANT\n"
66961  printf "* JVM variants:   $JVM_VARIANTS\n"
66962  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
66963  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
66964
66965  printf "\n"
66966  printf "Tools summary:\n"
66967  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
66968    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
66969  fi
66970  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
66971  if test "x$TOOLCHAIN_VERSION" != "x"; then
66972    print_version=" $TOOLCHAIN_VERSION"
66973  fi
66974  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
66975  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
66976  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
66977
66978  printf "\n"
66979  printf "Build performance summary:\n"
66980  printf "* Cores to use:   $JOBS\n"
66981  printf "* Memory limit:   $MEMORY_SIZE MB\n"
66982  if test "x$CCACHE_STATUS" != "x"; then
66983    printf "* ccache status:  $CCACHE_STATUS\n"
66984  fi
66985  printf "\n"
66986
66987  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
66988    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
66989    printf "will result in longer build times.\n"
66990    printf "\n"
66991  fi
66992
66993  if test "x$FOUND_ALT_VARIABLES" != "x"; then
66994    printf "WARNING: You have old-style ALT_ environment variables set.\n"
66995    printf "These are not respected, and will be ignored. It is recommended\n"
66996    printf "that you clean your environment. The following variables are set:\n"
66997    printf "$FOUND_ALT_VARIABLES\n"
66998    printf "\n"
66999  fi
67000
67001  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
67002    printf "WARNING: Your build output directory is not on a local disk.\n"
67003    printf "This will severely degrade build performance!\n"
67004    printf "It is recommended that you create an output directory on a local disk,\n"
67005    printf "and run the configure script again from that directory.\n"
67006    printf "\n"
67007  fi
67008
67009  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
67010    printf "WARNING: The result of this configuration has overridden an older\n"
67011    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
67012    printf "proper build. Failure to do so might result in strange build problems.\n"
67013    printf "\n"
67014  fi
67015
67016  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
67017    printf "WARNING: The result of this configuration was not saved.\n"
67018    printf "You should run without '--no-create | -n' to create the configuration.\n"
67019    printf "\n"
67020  fi
67021
67022
67023
67024  # Locate config.log.
67025  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
67026    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
67027  elif test -e "./config.log"; then
67028    CONFIG_LOG_PATH="."
67029  fi
67030
67031  if test -e "$CONFIG_LOG_PATH/config.log"; then
67032    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
67033    if test $? -eq 0; then
67034      printf "The following warnings were produced. Repeated here for convenience:\n"
67035      # We must quote sed expression (using []) to stop m4 from eating the [].
67036      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
67037      printf "\n"
67038    fi
67039  fi
67040
67041