generated-configure.sh revision 2072:8c014913a48d
1238104Sdes#!/bin/bash
2238104Sdes#
3238104Sdes# ##########################################################
4238104Sdes# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
5238104Sdes# ##########################################################
6238104Sdes#
7238104Sdes#! /bin/sh
8238104Sdes# Guess values for system-dependent variables and create Makefiles.
9238104Sdes# Generated by GNU Autoconf 2.69 for OpenJDK jdk9.
10238104Sdes#
11238104Sdes# Report bugs to <build-dev@openjdk.java.net>.
12238104Sdes#
13238104Sdes#
14238104Sdes# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
15246854Sdes#
16238104Sdes#
17246854Sdes# This configure script is free software; the Free Software Foundation
18246854Sdes# gives unlimited permission to copy, distribute and modify it.
19246854Sdes## -------------------- ##
20246854Sdes## M4sh Initialization. ##
21246854Sdes## -------------------- ##
22246854Sdes
23238104Sdes# Be more Bourne compatible
24238104SdesDUALCASE=1; export DUALCASE # for MKS sh
25238104Sdesif test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
26238104Sdes  emulate sh
27238104Sdes  NULLCMD=:
28238104Sdes  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
29238104Sdes  # is contrary to our usage.  Disable this feature.
30238104Sdes  alias -g '${1+"$@"}'='"$@"'
31238104Sdes  setopt NO_GLOB_SUBST
32238104Sdeselse
33238104Sdes  case `(set -o) 2>/dev/null` in #(
34238104Sdes  *posix*) :
35238104Sdes    set -o posix ;; #(
36238104Sdes  *) :
37238104Sdes     ;;
38238104Sdesesac
39238104Sdesfi
40238104Sdes
41238104Sdes
42238104Sdesas_nl='
43238104Sdes'
44238104Sdesexport as_nl
45238104Sdes# Printing a long string crashes Solaris 7 /usr/bin/printf.
46238104Sdesas_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
47238104Sdesas_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
48238104Sdesas_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
49238104Sdes# Prefer a ksh shell builtin over an external printf program on Solaris,
50238104Sdes# but without wasting forks for bash or zsh.
51238104Sdesif test -z "$BASH_VERSION$ZSH_VERSION" \
52238104Sdes    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
53238104Sdes  as_echo='print -r --'
54238104Sdes  as_echo_n='print -rn --'
55238104Sdeselif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
56238104Sdes  as_echo='printf %s\n'
57238104Sdes  as_echo_n='printf %s'
58238104Sdeselse
59238104Sdes  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
60238104Sdes    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
61238104Sdes    as_echo_n='/usr/ucb/echo -n'
62238104Sdes  else
63238104Sdes    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
64238104Sdes    as_echo_n_body='eval
65238104Sdes      arg=$1;
66      case $arg in #(
67      *"$as_nl"*)
68	expr "X$arg" : "X\\(.*\\)$as_nl";
69	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
70      esac;
71      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
72    '
73    export as_echo_n_body
74    as_echo_n='sh -c $as_echo_n_body as_echo'
75  fi
76  export as_echo_body
77  as_echo='sh -c $as_echo_body as_echo'
78fi
79
80# The user is always right.
81if test "${PATH_SEPARATOR+set}" != set; then
82  PATH_SEPARATOR=:
83  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
84    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
85      PATH_SEPARATOR=';'
86  }
87fi
88
89
90# IFS
91# We need space, tab and new line, in precisely that order.  Quoting is
92# there to prevent editors from complaining about space-tab.
93# (If _AS_PATH_WALK were called with IFS unset, it would disable word
94# splitting by setting IFS to empty value.)
95IFS=" ""	$as_nl"
96
97# Find who we are.  Look in the path if we contain no directory separator.
98as_myself=
99case $0 in #((
100  *[\\/]* ) as_myself=$0 ;;
101  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
102for as_dir in $PATH
103do
104  IFS=$as_save_IFS
105  test -z "$as_dir" && as_dir=.
106    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
107  done
108IFS=$as_save_IFS
109
110     ;;
111esac
112# We did not find ourselves, most probably we were run as `sh COMMAND'
113# in which case we are not to be found in the path.
114if test "x$as_myself" = x; then
115  as_myself=$0
116fi
117if test ! -f "$as_myself"; then
118  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
119  exit 1
120fi
121
122# Unset variables that we do not need and which cause bugs (e.g. in
123# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
124# suppresses any "Segmentation fault" message there.  '((' could
125# trigger a bug in pdksh 5.2.14.
126for as_var in BASH_ENV ENV MAIL MAILPATH
127do eval test x\${$as_var+set} = xset \
128  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
129done
130PS1='$ '
131PS2='> '
132PS4='+ '
133
134# NLS nuisances.
135LC_ALL=C
136export LC_ALL
137LANGUAGE=C
138export LANGUAGE
139
140# CDPATH.
141(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
142
143# Use a proper internal environment variable to ensure we don't fall
144  # into an infinite loop, continuously re-executing ourselves.
145  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
146    _as_can_reexec=no; export _as_can_reexec;
147    # We cannot yet assume a decent shell, so we have to provide a
148# neutralization value for shells without unset; and this also
149# works around shells that cannot unset nonexistent variables.
150# Preserve -v and -x to the replacement shell.
151BASH_ENV=/dev/null
152ENV=/dev/null
153(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
154case $- in # ((((
155  *v*x* | *x*v* ) as_opts=-vx ;;
156  *v* ) as_opts=-v ;;
157  *x* ) as_opts=-x ;;
158  * ) as_opts= ;;
159esac
160exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
161# Admittedly, this is quite paranoid, since all the known shells bail
162# out after a failed `exec'.
163$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
164as_fn_exit 255
165  fi
166  # We don't want this to propagate to other subprocesses.
167          { _as_can_reexec=; unset _as_can_reexec;}
168if test "x$CONFIG_SHELL" = x; then
169  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
170  emulate sh
171  NULLCMD=:
172  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
173  # is contrary to our usage.  Disable this feature.
174  alias -g '\${1+\"\$@\"}'='\"\$@\"'
175  setopt NO_GLOB_SUBST
176else
177  case \`(set -o) 2>/dev/null\` in #(
178  *posix*) :
179    set -o posix ;; #(
180  *) :
181     ;;
182esac
183fi
184"
185  as_required="as_fn_return () { (exit \$1); }
186as_fn_success () { as_fn_return 0; }
187as_fn_failure () { as_fn_return 1; }
188as_fn_ret_success () { return 0; }
189as_fn_ret_failure () { return 1; }
190
191exitcode=0
192as_fn_success || { exitcode=1; echo as_fn_success failed.; }
193as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
194as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
195as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
196if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
197
198else
199  exitcode=1; echo positional parameters were not saved.
200fi
201test x\$exitcode = x0 || exit 1
202test -x / || exit 1"
203  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
204  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
205  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
206  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
207test \$(( 1 + 1 )) = 2 || exit 1"
208  if (eval "$as_required") 2>/dev/null; then :
209  as_have_required=yes
210else
211  as_have_required=no
212fi
213  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
214
215else
216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
217as_found=false
218for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
219do
220  IFS=$as_save_IFS
221  test -z "$as_dir" && as_dir=.
222  as_found=:
223  case $as_dir in #(
224	 /*)
225	   for as_base in sh bash ksh sh5; do
226	     # Try only shells that exist, to save several forks.
227	     as_shell=$as_dir/$as_base
228	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
229		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
230  CONFIG_SHELL=$as_shell as_have_required=yes
231		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
232  break 2
233fi
234fi
235	   done;;
236       esac
237  as_found=false
238done
239$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
240	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
241  CONFIG_SHELL=$SHELL as_have_required=yes
242fi; }
243IFS=$as_save_IFS
244
245
246      if test "x$CONFIG_SHELL" != x; then :
247  export CONFIG_SHELL
248             # We cannot yet assume a decent shell, so we have to provide a
249# neutralization value for shells without unset; and this also
250# works around shells that cannot unset nonexistent variables.
251# Preserve -v and -x to the replacement shell.
252BASH_ENV=/dev/null
253ENV=/dev/null
254(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
255case $- in # ((((
256  *v*x* | *x*v* ) as_opts=-vx ;;
257  *v* ) as_opts=-v ;;
258  *x* ) as_opts=-x ;;
259  * ) as_opts= ;;
260esac
261exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
262# Admittedly, this is quite paranoid, since all the known shells bail
263# out after a failed `exec'.
264$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
265exit 255
266fi
267
268    if test x$as_have_required = xno; then :
269  $as_echo "$0: This script requires a shell more modern than all"
270  $as_echo "$0: the shells that I found on your system."
271  if test x${ZSH_VERSION+set} = xset ; then
272    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
273    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
274  else
275    $as_echo "$0: Please tell bug-autoconf@gnu.org and
276$0: build-dev@openjdk.java.net about your system, including
277$0: any error possibly output before this message. Then
278$0: install a modern shell, or manually run the script
279$0: under such a shell if you do have one."
280  fi
281  exit 1
282fi
283fi
284fi
285SHELL=${CONFIG_SHELL-/bin/sh}
286export SHELL
287# Unset more variables known to interfere with behavior of common tools.
288CLICOLOR_FORCE= GREP_OPTIONS=
289unset CLICOLOR_FORCE GREP_OPTIONS
290
291## --------------------- ##
292## M4sh Shell Functions. ##
293## --------------------- ##
294# as_fn_unset VAR
295# ---------------
296# Portably unset VAR.
297as_fn_unset ()
298{
299  { eval $1=; unset $1;}
300}
301as_unset=as_fn_unset
302
303# as_fn_set_status STATUS
304# -----------------------
305# Set $? to STATUS, without forking.
306as_fn_set_status ()
307{
308  return $1
309} # as_fn_set_status
310
311# as_fn_exit STATUS
312# -----------------
313# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
314as_fn_exit ()
315{
316  set +e
317  as_fn_set_status $1
318  exit $1
319} # as_fn_exit
320
321# as_fn_mkdir_p
322# -------------
323# Create "$as_dir" as a directory, including parents if necessary.
324as_fn_mkdir_p ()
325{
326
327  case $as_dir in #(
328  -*) as_dir=./$as_dir;;
329  esac
330  test -d "$as_dir" || eval $as_mkdir_p || {
331    as_dirs=
332    while :; do
333      case $as_dir in #(
334      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
335      *) as_qdir=$as_dir;;
336      esac
337      as_dirs="'$as_qdir' $as_dirs"
338      as_dir=`$as_dirname -- "$as_dir" ||
339$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
340	 X"$as_dir" : 'X\(//\)[^/]' \| \
341	 X"$as_dir" : 'X\(//\)$' \| \
342	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
343$as_echo X"$as_dir" |
344    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
345	    s//\1/
346	    q
347	  }
348	  /^X\(\/\/\)[^/].*/{
349	    s//\1/
350	    q
351	  }
352	  /^X\(\/\/\)$/{
353	    s//\1/
354	    q
355	  }
356	  /^X\(\/\).*/{
357	    s//\1/
358	    q
359	  }
360	  s/.*/./; q'`
361      test -d "$as_dir" && break
362    done
363    test -z "$as_dirs" || eval "mkdir $as_dirs"
364  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
365
366
367} # as_fn_mkdir_p
368
369# as_fn_executable_p FILE
370# -----------------------
371# Test if FILE is an executable regular file.
372as_fn_executable_p ()
373{
374  test -f "$1" && test -x "$1"
375} # as_fn_executable_p
376# as_fn_append VAR VALUE
377# ----------------------
378# Append the text in VALUE to the end of the definition contained in VAR. Take
379# advantage of any shell optimizations that allow amortized linear growth over
380# repeated appends, instead of the typical quadratic growth present in naive
381# implementations.
382if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
383  eval 'as_fn_append ()
384  {
385    eval $1+=\$2
386  }'
387else
388  as_fn_append ()
389  {
390    eval $1=\$$1\$2
391  }
392fi # as_fn_append
393
394# as_fn_arith ARG...
395# ------------------
396# Perform arithmetic evaluation on the ARGs, and store the result in the
397# global $as_val. Take advantage of shells that can avoid forks. The arguments
398# must be portable across $(()) and expr.
399if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
400  eval 'as_fn_arith ()
401  {
402    as_val=$(( $* ))
403  }'
404else
405  as_fn_arith ()
406  {
407    as_val=`expr "$@" || test $? -eq 1`
408  }
409fi # as_fn_arith
410
411
412# as_fn_error STATUS ERROR [LINENO LOG_FD]
413# ----------------------------------------
414# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
415# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
416# script with STATUS, using 1 if that was 0.
417as_fn_error ()
418{
419  as_status=$1; test $as_status -eq 0 && as_status=1
420  if test "$4"; then
421    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
422    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
423  fi
424  $as_echo "$as_me: error: $2" >&2
425  as_fn_exit $as_status
426} # as_fn_error
427
428if expr a : '\(a\)' >/dev/null 2>&1 &&
429   test "X`expr 00001 : '.*\(...\)'`" = X001; then
430  as_expr=expr
431else
432  as_expr=false
433fi
434
435if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
436  as_basename=basename
437else
438  as_basename=false
439fi
440
441if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
442  as_dirname=dirname
443else
444  as_dirname=false
445fi
446
447as_me=`$as_basename -- "$0" ||
448$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
449	 X"$0" : 'X\(//\)$' \| \
450	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
451$as_echo X/"$0" |
452    sed '/^.*\/\([^/][^/]*\)\/*$/{
453	    s//\1/
454	    q
455	  }
456	  /^X\/\(\/\/\)$/{
457	    s//\1/
458	    q
459	  }
460	  /^X\/\(\/\).*/{
461	    s//\1/
462	    q
463	  }
464	  s/.*/./; q'`
465
466# Avoid depending upon Character Ranges.
467as_cr_letters='abcdefghijklmnopqrstuvwxyz'
468as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
469as_cr_Letters=$as_cr_letters$as_cr_LETTERS
470as_cr_digits='0123456789'
471as_cr_alnum=$as_cr_Letters$as_cr_digits
472
473
474  as_lineno_1=$LINENO as_lineno_1a=$LINENO
475  as_lineno_2=$LINENO as_lineno_2a=$LINENO
476  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
477  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
478  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
479  sed -n '
480    p
481    /[$]LINENO/=
482  ' <$as_myself |
483    sed '
484      s/[$]LINENO.*/&-/
485      t lineno
486      b
487      :lineno
488      N
489      :loop
490      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
491      t loop
492      s/-\n.*//
493    ' >$as_me.lineno &&
494  chmod +x "$as_me.lineno" ||
495    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
496
497  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
498  # already done that, so ensure we don't try to do so again and fall
499  # in an infinite loop.  This has already happened in practice.
500  _as_can_reexec=no; export _as_can_reexec
501  # Don't try to exec as it changes $[0], causing all sort of problems
502  # (the dirname of $[0] is not the place where we might find the
503  # original and so on.  Autoconf is especially sensitive to this).
504  . "./$as_me.lineno"
505  # Exit status is that of the last command.
506  exit
507}
508
509ECHO_C= ECHO_N= ECHO_T=
510case `echo -n x` in #(((((
511-n*)
512  case `echo 'xy\c'` in
513  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
514  xy)  ECHO_C='\c';;
515  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
516       ECHO_T='	';;
517  esac;;
518*)
519  ECHO_N='-n';;
520esac
521
522rm -f conf$$ conf$$.exe conf$$.file
523if test -d conf$$.dir; then
524  rm -f conf$$.dir/conf$$.file
525else
526  rm -f conf$$.dir
527  mkdir conf$$.dir 2>/dev/null
528fi
529if (echo >conf$$.file) 2>/dev/null; then
530  if ln -s conf$$.file conf$$ 2>/dev/null; then
531    as_ln_s='ln -s'
532    # ... but there are two gotchas:
533    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
534    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
535    # In both cases, we have to default to `cp -pR'.
536    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
537      as_ln_s='cp -pR'
538  elif ln conf$$.file conf$$ 2>/dev/null; then
539    as_ln_s=ln
540  else
541    as_ln_s='cp -pR'
542  fi
543else
544  as_ln_s='cp -pR'
545fi
546rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
547rmdir conf$$.dir 2>/dev/null
548
549if mkdir -p . 2>/dev/null; then
550  as_mkdir_p='mkdir -p "$as_dir"'
551else
552  test -d ./-p && rmdir ./-p
553  as_mkdir_p=false
554fi
555
556as_test_x='test -x'
557as_executable_p=as_fn_executable_p
558
559# Sed expression to map a string onto a valid CPP name.
560as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
561
562# Sed expression to map a string onto a valid variable name.
563as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
564
565
566test -n "$DJDIR" || exec 7<&0 </dev/null
567exec 6>&1
568
569# Name of the host.
570# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
571# so uname gets run too.
572ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
573
574#
575# Initializations.
576#
577ac_default_prefix=/usr/local
578ac_clean_files=
579ac_config_libobj_dir=.
580LIBOBJS=
581cross_compiling=no
582subdirs=
583MFLAGS=
584MAKEFLAGS=
585
586# Identity of this package.
587PACKAGE_NAME='OpenJDK'
588PACKAGE_TARNAME='openjdk'
589PACKAGE_VERSION='jdk9'
590PACKAGE_STRING='OpenJDK jdk9'
591PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
592PACKAGE_URL='http://openjdk.java.net'
593
594# Factoring default headers for most tests.
595ac_includes_default="\
596#include <stdio.h>
597#ifdef HAVE_SYS_TYPES_H
598# include <sys/types.h>
599#endif
600#ifdef HAVE_SYS_STAT_H
601# include <sys/stat.h>
602#endif
603#ifdef STDC_HEADERS
604# include <stdlib.h>
605# include <stddef.h>
606#else
607# ifdef HAVE_STDLIB_H
608#  include <stdlib.h>
609# endif
610#endif
611#ifdef HAVE_STRING_H
612# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
613#  include <memory.h>
614# endif
615# include <string.h>
616#endif
617#ifdef HAVE_STRINGS_H
618# include <strings.h>
619#endif
620#ifdef HAVE_INTTYPES_H
621# include <inttypes.h>
622#endif
623#ifdef HAVE_STDINT_H
624# include <stdint.h>
625#endif
626#ifdef HAVE_UNISTD_H
627# include <unistd.h>
628#endif"
629
630ac_subst_vars='LTLIBOBJS
631LIBOBJS
632CFLAGS_CCACHE
633CCACHE
634USE_PRECOMPILED_HEADER
635BUILD_ICECC
636ICECC
637ICECC_WRAPPER
638ICECC_CREATE_ENV
639ICECC_CMD
640ENABLE_JAVAC_SERVER
641ENABLE_SJAVAC
642SJAVAC_SERVER_JAVA_FLAGS
643SJAVAC_SERVER_JAVA
644JAVA_TOOL_FLAGS_SMALL
645JAVA_FLAGS_SMALL
646JAVA_FLAGS_JAVAC
647JAVA_FLAGS_BIG
648JAVA_FLAGS
649TEST_JOBS
650JOBS
651MEMORY_SIZE
652NUM_CORES
653BUILD_FAILURE_HANDLER
654ENABLE_INTREE_EC
655LIBZIP_CAN_USE_MMAP
656LIBDL
657LIBM
658USE_EXTERNAL_LCMS
659LCMS_LIBS
660LCMS_CFLAGS
661USE_EXTERNAL_LIBZ
662USE_EXTERNAL_LIBPNG
663PNG_LIBS
664PNG_CFLAGS
665USE_EXTERNAL_LIBGIF
666USE_EXTERNAL_LIBJPEG
667LLVM_LIBS
668LLVM_LDFLAGS
669LLVM_CFLAGS
670LLVM_CONFIG
671LIBFFI_LIBS
672LIBFFI_CFLAGS
673ALSA_LIBS
674ALSA_CFLAGS
675FREETYPE_BUNDLE_LIB_PATH
676FREETYPE_LIBS
677FREETYPE_CFLAGS
678CUPS_CFLAGS
679X_EXTRA_LIBS
680X_LIBS
681X_PRE_LIBS
682X_CFLAGS
683XMKMF
684MSVCP_DLL
685MSVCR_DLL
686LIBCXX
687STATIC_CXX_SETTING
688FIXPATH_DETACH_FLAG
689FIXPATH
690VALID_JVM_FEATURES
691JVM_FEATURES_custom
692JVM_FEATURES_zeroshark
693JVM_FEATURES_zero
694JVM_FEATURES_minimal
695JVM_FEATURES_core
696JVM_FEATURES_client
697JVM_FEATURES_server
698INCLUDE_DTRACE
699GCOV_ENABLED
700STRIP_POLICY
701DEBUG_BINARIES
702ZIP_EXTERNAL_DEBUG_SYMBOLS
703COPY_DEBUG_SYMBOLS
704COMPILE_WITH_DEBUG_SYMBOLS
705CFLAGS_WARNINGS_ARE_ERRORS
706BUILD_CC_DISABLE_WARNING_PREFIX
707DISABLE_WARNING_PREFIX
708HOTSPOT_SET_WARNINGS_AS_ERRORS
709WARNINGS_AS_ERRORS
710COMPILER_SUPPORTS_TARGET_BITS_FLAG
711ZERO_ARCHFLAG
712LDFLAGS_TESTEXE
713LDFLAGS_TESTLIB
714CXXFLAGS_TESTEXE
715CXXFLAGS_TESTLIB
716CFLAGS_TESTEXE
717CFLAGS_TESTLIB
718OPENJDK_BUILD_JVM_LIBS
719OPENJDK_BUILD_JVM_ASFLAGS
720OPENJDK_BUILD_JVM_LDFLAGS
721OPENJDK_BUILD_JVM_CFLAGS
722OPENJDK_BUILD_LDFLAGS_HASH_STYLE
723OPENJDK_BUILD_LDFLAGS_CXX_JDK
724OPENJDK_BUILD_JDKEXE_LIBS
725OPENJDK_BUILD_JDKLIB_LIBS
726OPENJDK_BUILD_LDFLAGS_JDKEXE
727OPENJDK_BUILD_LDFLAGS_JDKLIB
728OPENJDK_BUILD_CXXFLAGS_JDKEXE
729OPENJDK_BUILD_CXXFLAGS_JDKLIB
730OPENJDK_BUILD_CFLAGS_JDKEXE
731OPENJDK_BUILD_CFLAGS_JDKLIB
732OPENJDK_BUILD_CXXSTD_CXXFLAG
733JVM_LIBS
734JVM_ASFLAGS
735JVM_LDFLAGS
736JVM_CFLAGS
737LDFLAGS_HASH_STYLE
738LDFLAGS_CXX_JDK
739JDKEXE_LIBS
740JDKLIB_LIBS
741LDFLAGS_JDKEXE
742LDFLAGS_JDKLIB
743CXXFLAGS_JDKEXE
744CXXFLAGS_JDKLIB
745CFLAGS_JDKEXE
746CFLAGS_JDKLIB
747MACOSX_VERSION_MIN
748NO_LIFETIME_DSE_CFLAG
749NO_NULL_POINTER_CHECK_CFLAG
750CXXSTD_CXXFLAG
751CXX_O_FLAG_SIZE
752CXX_O_FLAG_NONE
753CXX_O_FLAG_DEBUG
754CXX_O_FLAG_NORM
755CXX_O_FLAG_HI
756CXX_O_FLAG_HIGHEST
757CXX_O_FLAG_HIGHEST_JVM
758C_O_FLAG_SIZE
759C_O_FLAG_NONE
760C_O_FLAG_DEBUG
761C_O_FLAG_NORM
762C_O_FLAG_HI
763C_O_FLAG_HIGHEST
764C_O_FLAG_HIGHEST_JVM
765JVM_CFLAGS_SYMBOLS
766CXXFLAGS_DEBUG_SYMBOLS
767CFLAGS_DEBUG_SYMBOLS
768CXX_FLAG_DEPS
769C_FLAG_DEPS
770SHARED_LIBRARY_FLAGS
771SET_SHARED_LIBRARY_MAPFILE
772SET_SHARED_LIBRARY_NAME
773SET_SHARED_LIBRARY_ORIGIN
774SET_EXECUTABLE_ORIGIN
775CXX_FLAG_REORDER
776C_FLAG_REORDER
777JVM_RCFLAGS
778RC_FLAGS
779AR_OUT_OPTION
780LD_OUT_OPTION
781EXE_OUT_OPTION
782CC_OUT_OPTION
783STRIPFLAGS
784ARFLAGS
785COMPILER_BINDCMD_FILE_FLAG
786COMPILER_COMMAND_FILE_FLAG
787COMPILER_TARGET_BITS_FLAG
788JT_HOME
789JTREGEXE
790HOTSPOT_TOOLCHAIN_TYPE
791USING_BROKEN_SUSE_LD
792PACKAGE_PATH
793USE_CLANG
794HOTSPOT_LD
795HOTSPOT_CXX
796HOTSPOT_RC
797HOTSPOT_MT
798BUILD_AS
799BUILD_LDCXX
800BUILD_LD
801BUILD_STRIP
802BUILD_OBJCOPY
803BUILD_AR
804BUILD_NM
805BUILD_CXX
806BUILD_CC
807BUILD_SYSROOT_LDFLAGS
808BUILD_SYSROOT_CFLAGS
809ac_ct_OBJDUMP
810OBJDUMP
811ac_ct_OBJCOPY
812OBJCOPY
813ac_ct_NM
814ac_ct_STRIP
815GNM
816NM
817STRIP
818MSBUILD
819DUMPBIN
820RC
821MT
822LIPO
823ac_ct_AR
824AR
825AS
826LDCXX
827LD
828CXXCPP
829CPP
830CXX_VERSION_NUMBER
831CC_VERSION_NUMBER
832ac_ct_CXX
833CXXFLAGS
834CXX
835TOOLCHAIN_PATH_CXX
836POTENTIAL_CXX
837OBJEXT
838EXEEXT
839ac_ct_CC
840CPPFLAGS
841LDFLAGS
842CFLAGS
843CC
844TOOLCHAIN_PATH_CC
845POTENTIAL_CC
846TOOLCHAIN_VERSION
847VS_LIB
848VS_INCLUDE
849VS_PATH
850CYGWIN_LINK
851SYSROOT_LDFLAGS
852SYSROOT_CFLAGS
853EXTRA_LDFLAGS
854EXTRA_CXXFLAGS
855EXTRA_CFLAGS
856LEGACY_EXTRA_LDFLAGS
857LEGACY_EXTRA_CXXFLAGS
858LEGACY_EXTRA_CFLAGS
859EXE_SUFFIX
860OBJ_SUFFIX
861STATIC_LIBRARY
862SHARED_LIBRARY
863STATIC_LIBRARY_SUFFIX
864SHARED_LIBRARY_SUFFIX
865LIBRARY_PREFIX
866TOOLCHAIN_TYPE
867STATIC_BUILD
868IMPORT_MODULES_MAKE
869IMPORT_MODULES_SRC
870IMPORT_MODULES_CONF
871IMPORT_MODULES_LIBS
872IMPORT_MODULES_CMDS
873IMPORT_MODULES_CLASSES
874BUILD_HOTSPOT
875HOTSPOT_DIST
876BUILD_OUTPUT
877JDK_TOPDIR
878NASHORN_TOPDIR
879HOTSPOT_TOPDIR
880JAXWS_TOPDIR
881JAXP_TOPDIR
882CORBA_TOPDIR
883LANGTOOLS_TOPDIR
884BUILD_JDK
885CREATE_BUILDJDK
886BOOT_JDK_BITS
887JAVAC_FLAGS
888BOOT_JDK_MODULAR
889BOOT_JDK_SOURCETARGET
890JARSIGNER
891JAR
892JAVAH
893JAVAC
894JAVA
895BOOT_JDK
896JAVA_CHECK
897JAVAC_CHECK
898VERSION_IS_GA
899VERSION_SHORT
900VERSION_STRING
901VERSION_NUMBER_FOUR_POSITIONS
902VERSION_NUMBER
903VERSION_OPT
904VERSION_BUILD
905VERSION_PRE
906VERSION_PATCH
907VERSION_SECURITY
908VERSION_MINOR
909VERSION_MAJOR
910MACOSX_BUNDLE_ID_BASE
911MACOSX_BUNDLE_NAME_BASE
912HOTSPOT_VM_DISTRO
913COMPANY_NAME
914JDK_RC_PLATFORM_NAME
915PRODUCT_SUFFIX
916PRODUCT_NAME
917LAUNCHER_NAME
918JLINK_KEEP_PACKAGED_MODULES
919COPYRIGHT_YEAR
920COMPRESS_JARS
921INCLUDE_SA
922UNLIMITED_CRYPTO
923CACERTS_FILE
924BUILD_HEADLESS
925SUPPORT_HEADFUL
926SUPPORT_HEADLESS
927DEFAULT_MAKE_TARGET
928OS_VERSION_MICRO
929OS_VERSION_MINOR
930OS_VERSION_MAJOR
931PKG_CONFIG
932BASH_ARGS
933SETFILE
934CODESIGN
935XATTR
936DSYMUTIL
937IS_GNU_TIME
938PATCH
939DTRACE
940TIME
941STAT
942HG
943READELF
944OTOOL
945LDD
946ZIP
947UNZIP
948FIND_DELETE
949OUTPUT_SYNC
950OUTPUT_SYNC_SUPPORTED
951CHECK_TOOLSDIR_MAKE
952CHECK_TOOLSDIR_GMAKE
953CHECK_MAKE
954CHECK_GMAKE
955MAKE
956PKGHANDLER
957CONFIGURESUPPORT_OUTPUTDIR
958OUTPUT_ROOT
959CONF_NAME
960SPEC
961SDKROOT
962XCODEBUILD
963VALID_JVM_VARIANTS
964JVM_VARIANTS
965DEBUG_LEVEL
966HOTSPOT_DEBUG_LEVEL
967JDK_VARIANT
968SET_OPENJDK
969USERNAME
970CANONICAL_TOPDIR
971ORIGINAL_TOPDIR
972TOPDIR
973PATH_SEP
974ZERO_ARCHDEF
975HOTSPOT_BUILD_CPU_DEFINE
976HOTSPOT_BUILD_CPU_ARCH
977HOTSPOT_BUILD_CPU
978HOTSPOT_BUILD_OS_TYPE
979HOTSPOT_BUILD_OS
980OPENJDK_BUILD_OS_EXPORT_DIR
981OPENJDK_BUILD_CPU_JLI_CFLAGS
982OPENJDK_BUILD_CPU_OSARCH
983OPENJDK_BUILD_CPU_ISADIR
984OPENJDK_BUILD_CPU_LIBDIR
985OPENJDK_BUILD_CPU_LEGACY_LIB
986OPENJDK_BUILD_CPU_LEGACY
987HOTSPOT_TARGET_CPU_DEFINE
988HOTSPOT_TARGET_CPU_ARCH
989HOTSPOT_TARGET_CPU
990HOTSPOT_TARGET_OS_TYPE
991HOTSPOT_TARGET_OS
992DEFINE_CROSS_COMPILE_ARCH
993LP64
994OPENJDK_TARGET_OS_EXPORT_DIR
995OPENJDK_TARGET_CPU_JLI_CFLAGS
996OPENJDK_TARGET_CPU_OSARCH
997OPENJDK_TARGET_CPU_ISADIR
998OPENJDK_TARGET_CPU_LIBDIR
999OPENJDK_TARGET_CPU_LEGACY_LIB
1000OPENJDK_TARGET_CPU_LEGACY
1001REQUIRED_OS_VERSION
1002REQUIRED_OS_NAME
1003COMPILE_TYPE
1004OPENJDK_TARGET_CPU_ENDIAN
1005OPENJDK_TARGET_CPU_BITS
1006OPENJDK_TARGET_CPU_ARCH
1007OPENJDK_TARGET_CPU
1008OPENJDK_TARGET_OS_ENV
1009OPENJDK_TARGET_OS_TYPE
1010OPENJDK_TARGET_OS
1011OPENJDK_BUILD_CPU_ENDIAN
1012OPENJDK_BUILD_CPU_BITS
1013OPENJDK_BUILD_CPU_ARCH
1014OPENJDK_BUILD_CPU
1015OPENJDK_BUILD_OS_ENV
1016OPENJDK_BUILD_OS_TYPE
1017OPENJDK_BUILD_OS
1018OPENJDK_BUILD_AUTOCONF_NAME
1019OPENJDK_TARGET_AUTOCONF_NAME
1020target_os
1021target_vendor
1022target_cpu
1023target
1024host_os
1025host_vendor
1026host_cpu
1027host
1028build_os
1029build_vendor
1030build_cpu
1031build
1032NICE
1033CPIO
1034DF
1035READLINK
1036CYGPATH
1037SED
1038FGREP
1039EGREP
1040GREP
1041AWK
1042XARGS
1043WHICH
1044WC
1045UNIQ
1046UNAME
1047TR
1048TOUCH
1049TEE
1050TAR
1051TAIL
1052SORT
1053SH
1054RMDIR
1055RM
1056PRINTF
1057NAWK
1058MV
1059MKTEMP
1060MKDIR
1061LS
1062LN
1063HEAD
1064FIND
1065FILE
1066EXPR
1067ECHO
1068DIRNAME
1069DIFF
1070DATE
1071CUT
1072CP
1073COMM
1074CMP
1075CHMOD
1076CAT
1077BASH
1078BASENAME
1079DATE_WHEN_CONFIGURED
1080ORIGINAL_PATH
1081CONFIGURE_COMMAND_LINE
1082target_alias
1083host_alias
1084build_alias
1085LIBS
1086ECHO_T
1087ECHO_N
1088ECHO_C
1089DEFS
1090mandir
1091localedir
1092libdir
1093psdir
1094pdfdir
1095dvidir
1096htmldir
1097infodir
1098docdir
1099oldincludedir
1100includedir
1101localstatedir
1102sharedstatedir
1103sysconfdir
1104datadir
1105datarootdir
1106libexecdir
1107sbindir
1108bindir
1109program_transform_name
1110prefix
1111exec_prefix
1112PACKAGE_URL
1113PACKAGE_BUGREPORT
1114PACKAGE_STRING
1115PACKAGE_VERSION
1116PACKAGE_TARNAME
1117PACKAGE_NAME
1118PATH_SEPARATOR
1119SHELL'
1120ac_subst_files=''
1121ac_user_opts='
1122enable_option_checking
1123with_target_bits
1124enable_openjdk_only
1125with_custom_make_dir
1126with_jdk_variant
1127enable_debug
1128with_debug_level
1129with_jvm_variants
1130with_devkit
1131with_sys_root
1132with_sysroot
1133with_tools_dir
1134with_toolchain_path
1135with_extra_path
1136with_sdk_name
1137with_conf_name
1138with_output_sync
1139with_default_make_target
1140enable_headful
1141with_cacerts_file
1142enable_unlimited_crypto
1143with_copyright_year
1144enable_keep_packaged_modules
1145with_milestone
1146with_update_version
1147with_user_release_suffix
1148with_build_number
1149with_version_string
1150with_version_pre
1151with_version_opt
1152with_version_build
1153with_version_major
1154with_version_minor
1155with_version_security
1156with_version_patch
1157with_boot_jdk
1158with_build_jdk
1159with_add_source_root
1160with_override_source_root
1161with_adds_and_overrides
1162with_override_langtools
1163with_override_corba
1164with_override_jaxp
1165with_override_jaxws
1166with_override_hotspot
1167with_override_nashorn
1168with_override_jdk
1169with_import_hotspot
1170with_import_modules
1171enable_static_build
1172with_toolchain_type
1173with_extra_cflags
1174with_extra_cxxflags
1175with_extra_ldflags
1176with_toolchain_version
1177with_build_devkit
1178with_jtreg
1179enable_warnings_as_errors
1180with_native_debug_symbols
1181enable_debug_symbols
1182enable_zip_debug_info
1183enable_native_coverage
1184enable_dtrace
1185with_jvm_features
1186with_jvm_interpreter
1187with_stdc__lib
1188with_msvcr_dll
1189with_msvcp_dll
1190with_x
1191with_cups
1192with_cups_include
1193with_freetype
1194with_freetype_include
1195with_freetype_lib
1196with_freetype_src
1197enable_freetype_bundling
1198with_alsa
1199with_alsa_include
1200with_alsa_lib
1201with_libffi
1202with_libffi_include
1203with_libffi_lib
1204with_libjpeg
1205with_giflib
1206with_libpng
1207with_zlib
1208with_lcms
1209with_dxsdk
1210with_dxsdk_lib
1211with_dxsdk_include
1212enable_jtreg_failure_handler
1213with_num_cores
1214with_memory_size
1215with_jobs
1216with_test_jobs
1217with_boot_jdk_jvmargs
1218with_sjavac_server_java
1219enable_sjavac
1220enable_javac_server
1221enable_icecc
1222enable_precompiled_headers
1223enable_ccache
1224with_ccache_dir
1225'
1226      ac_precious_vars='build_alias
1227host_alias
1228target_alias
1229BASENAME
1230BASH
1231CAT
1232CHMOD
1233CMP
1234COMM
1235CP
1236CUT
1237DATE
1238DIFF
1239DIRNAME
1240ECHO
1241EXPR
1242FILE
1243FIND
1244HEAD
1245LN
1246LS
1247MKDIR
1248MKTEMP
1249MV
1250NAWK
1251PRINTF
1252RM
1253RMDIR
1254SH
1255SORT
1256TAIL
1257TAR
1258TEE
1259TOUCH
1260TR
1261UNAME
1262UNIQ
1263WC
1264WHICH
1265XARGS
1266AWK
1267GREP
1268EGREP
1269FGREP
1270SED
1271CYGPATH
1272READLINK
1273DF
1274CPIO
1275NICE
1276MAKE
1277UNZIP
1278ZIP
1279LDD
1280OTOOL
1281READELF
1282HG
1283STAT
1284TIME
1285DTRACE
1286PATCH
1287DSYMUTIL
1288XATTR
1289CODESIGN
1290SETFILE
1291PKG_CONFIG
1292JAVA
1293JAVAC
1294JAVAH
1295JAR
1296JARSIGNER
1297CC
1298CFLAGS
1299LDFLAGS
1300LIBS
1301CPPFLAGS
1302CXX
1303CXXFLAGS
1304CCC
1305CPP
1306CXXCPP
1307AS
1308AR
1309LIPO
1310STRIP
1311NM
1312GNM
1313OBJCOPY
1314OBJDUMP
1315BUILD_CC
1316BUILD_CXX
1317BUILD_NM
1318BUILD_AR
1319BUILD_OBJCOPY
1320BUILD_STRIP
1321JTREGEXE
1322XMKMF
1323FREETYPE_CFLAGS
1324FREETYPE_LIBS
1325ALSA_CFLAGS
1326ALSA_LIBS
1327LIBFFI_CFLAGS
1328LIBFFI_LIBS
1329PNG_CFLAGS
1330PNG_LIBS
1331LCMS_CFLAGS
1332LCMS_LIBS
1333ICECC_CMD
1334ICECC_CREATE_ENV
1335ICECC_WRAPPER
1336CCACHE'
1337
1338
1339# Initialize some variables set by options.
1340ac_init_help=
1341ac_init_version=false
1342ac_unrecognized_opts=
1343ac_unrecognized_sep=
1344# The variables have the same names as the options, with
1345# dashes changed to underlines.
1346cache_file=/dev/null
1347exec_prefix=NONE
1348no_create=
1349no_recursion=
1350prefix=NONE
1351program_prefix=NONE
1352program_suffix=NONE
1353program_transform_name=s,x,x,
1354silent=
1355site=
1356srcdir=
1357verbose=
1358x_includes=NONE
1359x_libraries=NONE
1360
1361# Installation directory options.
1362# These are left unexpanded so users can "make install exec_prefix=/foo"
1363# and all the variables that are supposed to be based on exec_prefix
1364# by default will actually change.
1365# Use braces instead of parens because sh, perl, etc. also accept them.
1366# (The list follows the same order as the GNU Coding Standards.)
1367bindir='${exec_prefix}/bin'
1368sbindir='${exec_prefix}/sbin'
1369libexecdir='${exec_prefix}/libexec'
1370datarootdir='${prefix}/share'
1371datadir='${datarootdir}'
1372sysconfdir='${prefix}/etc'
1373sharedstatedir='${prefix}/com'
1374localstatedir='${prefix}/var'
1375includedir='${prefix}/include'
1376oldincludedir='/usr/include'
1377docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1378infodir='${datarootdir}/info'
1379htmldir='${docdir}'
1380dvidir='${docdir}'
1381pdfdir='${docdir}'
1382psdir='${docdir}'
1383libdir='${exec_prefix}/lib'
1384localedir='${datarootdir}/locale'
1385mandir='${datarootdir}/man'
1386
1387ac_prev=
1388ac_dashdash=
1389for ac_option
1390do
1391  # If the previous option needs an argument, assign it.
1392  if test -n "$ac_prev"; then
1393    eval $ac_prev=\$ac_option
1394    ac_prev=
1395    continue
1396  fi
1397
1398  case $ac_option in
1399  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1400  *=)   ac_optarg= ;;
1401  *)    ac_optarg=yes ;;
1402  esac
1403
1404  # Accept the important Cygnus configure options, so we can diagnose typos.
1405
1406  case $ac_dashdash$ac_option in
1407  --)
1408    ac_dashdash=yes ;;
1409
1410  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1411    ac_prev=bindir ;;
1412  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1413    bindir=$ac_optarg ;;
1414
1415  -build | --build | --buil | --bui | --bu)
1416    ac_prev=build_alias ;;
1417  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1418    build_alias=$ac_optarg ;;
1419
1420  -cache-file | --cache-file | --cache-fil | --cache-fi \
1421  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1422    ac_prev=cache_file ;;
1423  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1424  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1425    cache_file=$ac_optarg ;;
1426
1427  --config-cache | -C)
1428    cache_file=config.cache ;;
1429
1430  -datadir | --datadir | --datadi | --datad)
1431    ac_prev=datadir ;;
1432  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1433    datadir=$ac_optarg ;;
1434
1435  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1436  | --dataroo | --dataro | --datar)
1437    ac_prev=datarootdir ;;
1438  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1439  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1440    datarootdir=$ac_optarg ;;
1441
1442  -disable-* | --disable-*)
1443    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1444    # Reject names that are not valid shell variable names.
1445    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1446      as_fn_error $? "invalid feature name: $ac_useropt"
1447    ac_useropt_orig=$ac_useropt
1448    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1449    case $ac_user_opts in
1450      *"
1451"enable_$ac_useropt"
1452"*) ;;
1453      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1454	 ac_unrecognized_sep=', ';;
1455    esac
1456    eval enable_$ac_useropt=no ;;
1457
1458  -docdir | --docdir | --docdi | --doc | --do)
1459    ac_prev=docdir ;;
1460  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1461    docdir=$ac_optarg ;;
1462
1463  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1464    ac_prev=dvidir ;;
1465  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1466    dvidir=$ac_optarg ;;
1467
1468  -enable-* | --enable-*)
1469    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1470    # Reject names that are not valid shell variable names.
1471    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1472      as_fn_error $? "invalid feature name: $ac_useropt"
1473    ac_useropt_orig=$ac_useropt
1474    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1475    case $ac_user_opts in
1476      *"
1477"enable_$ac_useropt"
1478"*) ;;
1479      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1480	 ac_unrecognized_sep=', ';;
1481    esac
1482    eval enable_$ac_useropt=\$ac_optarg ;;
1483
1484  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1485  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1486  | --exec | --exe | --ex)
1487    ac_prev=exec_prefix ;;
1488  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1489  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1490  | --exec=* | --exe=* | --ex=*)
1491    exec_prefix=$ac_optarg ;;
1492
1493  -gas | --gas | --ga | --g)
1494    # Obsolete; use --with-gas.
1495    with_gas=yes ;;
1496
1497  -help | --help | --hel | --he | -h)
1498    ac_init_help=long ;;
1499  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1500    ac_init_help=recursive ;;
1501  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1502    ac_init_help=short ;;
1503
1504  -host | --host | --hos | --ho)
1505    ac_prev=host_alias ;;
1506  -host=* | --host=* | --hos=* | --ho=*)
1507    host_alias=$ac_optarg ;;
1508
1509  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1510    ac_prev=htmldir ;;
1511  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1512  | --ht=*)
1513    htmldir=$ac_optarg ;;
1514
1515  -includedir | --includedir | --includedi | --included | --include \
1516  | --includ | --inclu | --incl | --inc)
1517    ac_prev=includedir ;;
1518  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1519  | --includ=* | --inclu=* | --incl=* | --inc=*)
1520    includedir=$ac_optarg ;;
1521
1522  -infodir | --infodir | --infodi | --infod | --info | --inf)
1523    ac_prev=infodir ;;
1524  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1525    infodir=$ac_optarg ;;
1526
1527  -libdir | --libdir | --libdi | --libd)
1528    ac_prev=libdir ;;
1529  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1530    libdir=$ac_optarg ;;
1531
1532  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1533  | --libexe | --libex | --libe)
1534    ac_prev=libexecdir ;;
1535  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1536  | --libexe=* | --libex=* | --libe=*)
1537    libexecdir=$ac_optarg ;;
1538
1539  -localedir | --localedir | --localedi | --localed | --locale)
1540    ac_prev=localedir ;;
1541  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1542    localedir=$ac_optarg ;;
1543
1544  -localstatedir | --localstatedir | --localstatedi | --localstated \
1545  | --localstate | --localstat | --localsta | --localst | --locals)
1546    ac_prev=localstatedir ;;
1547  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1548  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1549    localstatedir=$ac_optarg ;;
1550
1551  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1552    ac_prev=mandir ;;
1553  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1554    mandir=$ac_optarg ;;
1555
1556  -nfp | --nfp | --nf)
1557    # Obsolete; use --without-fp.
1558    with_fp=no ;;
1559
1560  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1561  | --no-cr | --no-c | -n)
1562    no_create=yes ;;
1563
1564  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1565  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1566    no_recursion=yes ;;
1567
1568  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1569  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1570  | --oldin | --oldi | --old | --ol | --o)
1571    ac_prev=oldincludedir ;;
1572  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1573  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1574  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1575    oldincludedir=$ac_optarg ;;
1576
1577  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1578    ac_prev=prefix ;;
1579  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1580    prefix=$ac_optarg ;;
1581
1582  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1583  | --program-pre | --program-pr | --program-p)
1584    ac_prev=program_prefix ;;
1585  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1586  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1587    program_prefix=$ac_optarg ;;
1588
1589  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1590  | --program-suf | --program-su | --program-s)
1591    ac_prev=program_suffix ;;
1592  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1593  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1594    program_suffix=$ac_optarg ;;
1595
1596  -program-transform-name | --program-transform-name \
1597  | --program-transform-nam | --program-transform-na \
1598  | --program-transform-n | --program-transform- \
1599  | --program-transform | --program-transfor \
1600  | --program-transfo | --program-transf \
1601  | --program-trans | --program-tran \
1602  | --progr-tra | --program-tr | --program-t)
1603    ac_prev=program_transform_name ;;
1604  -program-transform-name=* | --program-transform-name=* \
1605  | --program-transform-nam=* | --program-transform-na=* \
1606  | --program-transform-n=* | --program-transform-=* \
1607  | --program-transform=* | --program-transfor=* \
1608  | --program-transfo=* | --program-transf=* \
1609  | --program-trans=* | --program-tran=* \
1610  | --progr-tra=* | --program-tr=* | --program-t=*)
1611    program_transform_name=$ac_optarg ;;
1612
1613  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1614    ac_prev=pdfdir ;;
1615  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1616    pdfdir=$ac_optarg ;;
1617
1618  -psdir | --psdir | --psdi | --psd | --ps)
1619    ac_prev=psdir ;;
1620  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1621    psdir=$ac_optarg ;;
1622
1623  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1624  | -silent | --silent | --silen | --sile | --sil)
1625    silent=yes ;;
1626
1627  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1628    ac_prev=sbindir ;;
1629  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1630  | --sbi=* | --sb=*)
1631    sbindir=$ac_optarg ;;
1632
1633  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1634  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1635  | --sharedst | --shareds | --shared | --share | --shar \
1636  | --sha | --sh)
1637    ac_prev=sharedstatedir ;;
1638  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1639  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1640  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1641  | --sha=* | --sh=*)
1642    sharedstatedir=$ac_optarg ;;
1643
1644  -site | --site | --sit)
1645    ac_prev=site ;;
1646  -site=* | --site=* | --sit=*)
1647    site=$ac_optarg ;;
1648
1649  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1650    ac_prev=srcdir ;;
1651  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1652    srcdir=$ac_optarg ;;
1653
1654  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1655  | --syscon | --sysco | --sysc | --sys | --sy)
1656    ac_prev=sysconfdir ;;
1657  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1658  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1659    sysconfdir=$ac_optarg ;;
1660
1661  -target | --target | --targe | --targ | --tar | --ta | --t)
1662    ac_prev=target_alias ;;
1663  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1664    target_alias=$ac_optarg ;;
1665
1666  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1667    verbose=yes ;;
1668
1669  -version | --version | --versio | --versi | --vers | -V)
1670    ac_init_version=: ;;
1671
1672  -with-* | --with-*)
1673    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1674    # Reject names that are not valid shell variable names.
1675    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1676      as_fn_error $? "invalid package name: $ac_useropt"
1677    ac_useropt_orig=$ac_useropt
1678    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1679    case $ac_user_opts in
1680      *"
1681"with_$ac_useropt"
1682"*) ;;
1683      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1684	 ac_unrecognized_sep=', ';;
1685    esac
1686    eval with_$ac_useropt=\$ac_optarg ;;
1687
1688  -without-* | --without-*)
1689    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1690    # Reject names that are not valid shell variable names.
1691    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1692      as_fn_error $? "invalid package name: $ac_useropt"
1693    ac_useropt_orig=$ac_useropt
1694    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1695    case $ac_user_opts in
1696      *"
1697"with_$ac_useropt"
1698"*) ;;
1699      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1700	 ac_unrecognized_sep=', ';;
1701    esac
1702    eval with_$ac_useropt=no ;;
1703
1704  --x)
1705    # Obsolete; use --with-x.
1706    with_x=yes ;;
1707
1708  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1709  | --x-incl | --x-inc | --x-in | --x-i)
1710    ac_prev=x_includes ;;
1711  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1712  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1713    x_includes=$ac_optarg ;;
1714
1715  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1716  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1717    ac_prev=x_libraries ;;
1718  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1719  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1720    x_libraries=$ac_optarg ;;
1721
1722  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1723Try \`$0 --help' for more information"
1724    ;;
1725
1726  *=*)
1727    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1728    # Reject names that are not valid shell variable names.
1729    case $ac_envvar in #(
1730      '' | [0-9]* | *[!_$as_cr_alnum]* )
1731      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1732    esac
1733    eval $ac_envvar=\$ac_optarg
1734    export $ac_envvar ;;
1735
1736  *)
1737    # FIXME: should be removed in autoconf 3.0.
1738    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1739    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1740      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1741    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1742    ;;
1743
1744  esac
1745done
1746
1747if test -n "$ac_prev"; then
1748  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1749  as_fn_error $? "missing argument to $ac_option"
1750fi
1751
1752if test -n "$ac_unrecognized_opts"; then
1753  case $enable_option_checking in
1754    no) ;;
1755    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1756    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1757  esac
1758fi
1759
1760# Check all directory arguments for consistency.
1761for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1762		datadir sysconfdir sharedstatedir localstatedir includedir \
1763		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1764		libdir localedir mandir
1765do
1766  eval ac_val=\$$ac_var
1767  # Remove trailing slashes.
1768  case $ac_val in
1769    */ )
1770      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1771      eval $ac_var=\$ac_val;;
1772  esac
1773  # Be sure to have absolute directory names.
1774  case $ac_val in
1775    [\\/$]* | ?:[\\/]* )  continue;;
1776    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1777  esac
1778  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1779done
1780
1781# There might be people who depend on the old broken behavior: `$host'
1782# used to hold the argument of --host etc.
1783# FIXME: To remove some day.
1784build=$build_alias
1785host=$host_alias
1786target=$target_alias
1787
1788# FIXME: To remove some day.
1789if test "x$host_alias" != x; then
1790  if test "x$build_alias" = x; then
1791    cross_compiling=maybe
1792  elif test "x$build_alias" != "x$host_alias"; then
1793    cross_compiling=yes
1794  fi
1795fi
1796
1797ac_tool_prefix=
1798test -n "$host_alias" && ac_tool_prefix=$host_alias-
1799
1800test "$silent" = yes && exec 6>/dev/null
1801
1802
1803ac_pwd=`pwd` && test -n "$ac_pwd" &&
1804ac_ls_di=`ls -di .` &&
1805ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1806  as_fn_error $? "working directory cannot be determined"
1807test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1808  as_fn_error $? "pwd does not report name of working directory"
1809
1810
1811# Find the source files, if location was not specified.
1812if test -z "$srcdir"; then
1813  ac_srcdir_defaulted=yes
1814  # Try the directory containing this script, then the parent directory.
1815  ac_confdir=`$as_dirname -- "$as_myself" ||
1816$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1817	 X"$as_myself" : 'X\(//\)[^/]' \| \
1818	 X"$as_myself" : 'X\(//\)$' \| \
1819	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1820$as_echo X"$as_myself" |
1821    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1822	    s//\1/
1823	    q
1824	  }
1825	  /^X\(\/\/\)[^/].*/{
1826	    s//\1/
1827	    q
1828	  }
1829	  /^X\(\/\/\)$/{
1830	    s//\1/
1831	    q
1832	  }
1833	  /^X\(\/\).*/{
1834	    s//\1/
1835	    q
1836	  }
1837	  s/.*/./; q'`
1838  srcdir=$ac_confdir
1839  if test ! -r "$srcdir/$ac_unique_file"; then
1840    srcdir=..
1841  fi
1842else
1843  ac_srcdir_defaulted=no
1844fi
1845if test ! -r "$srcdir/$ac_unique_file"; then
1846  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1847  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1848fi
1849ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1850ac_abs_confdir=`(
1851	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1852	pwd)`
1853# When building in place, set srcdir=.
1854if test "$ac_abs_confdir" = "$ac_pwd"; then
1855  srcdir=.
1856fi
1857# Remove unnecessary trailing slashes from srcdir.
1858# Double slashes in file names in object file debugging info
1859# mess up M-x gdb in Emacs.
1860case $srcdir in
1861*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1862esac
1863for ac_var in $ac_precious_vars; do
1864  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1865  eval ac_env_${ac_var}_value=\$${ac_var}
1866  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1867  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1868done
1869
1870#
1871# Report the --help message.
1872#
1873if test "$ac_init_help" = "long"; then
1874  # Omit some internal or obsolete options to make the list less imposing.
1875  # This message is too long to be a string in the A/UX 3.1 sh.
1876  cat <<_ACEOF
1877\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1878
1879Usage: $0 [OPTION]... [VAR=VALUE]...
1880
1881To assign environment variables (e.g., CC, CFLAGS...), specify them as
1882VAR=VALUE.  See below for descriptions of some of the useful variables.
1883
1884Defaults for the options are specified in brackets.
1885
1886Configuration:
1887  -h, --help              display this help and exit
1888      --help=short        display options specific to this package
1889      --help=recursive    display the short help of all the included packages
1890  -V, --version           display version information and exit
1891  -q, --quiet, --silent   do not print \`checking ...' messages
1892      --cache-file=FILE   cache test results in FILE [disabled]
1893  -C, --config-cache      alias for \`--cache-file=config.cache'
1894  -n, --no-create         do not create output files
1895      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1896
1897Installation directories:
1898  --prefix=PREFIX         install architecture-independent files in PREFIX
1899                          [$ac_default_prefix]
1900  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1901                          [PREFIX]
1902
1903By default, \`make install' will install all the files in
1904\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1905an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1906for instance \`--prefix=\$HOME'.
1907
1908For better control, use the options below.
1909
1910Fine tuning of the installation directories:
1911  --bindir=DIR            user executables [EPREFIX/bin]
1912  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1913  --libexecdir=DIR        program executables [EPREFIX/libexec]
1914  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1915  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1916  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1917  --libdir=DIR            object code libraries [EPREFIX/lib]
1918  --includedir=DIR        C header files [PREFIX/include]
1919  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1920  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1921  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1922  --infodir=DIR           info documentation [DATAROOTDIR/info]
1923  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1924  --mandir=DIR            man documentation [DATAROOTDIR/man]
1925  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1926  --htmldir=DIR           html documentation [DOCDIR]
1927  --dvidir=DIR            dvi documentation [DOCDIR]
1928  --pdfdir=DIR            pdf documentation [DOCDIR]
1929  --psdir=DIR             ps documentation [DOCDIR]
1930_ACEOF
1931
1932  cat <<\_ACEOF
1933
1934X features:
1935  --x-includes=DIR    X include files are in DIR
1936  --x-libraries=DIR   X library files are in DIR
1937
1938System types:
1939  --build=BUILD     configure for building on BUILD [guessed]
1940  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1941  --target=TARGET   configure for building compilers for TARGET [HOST]
1942_ACEOF
1943fi
1944
1945if test -n "$ac_init_help"; then
1946  case $ac_init_help in
1947     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1948   esac
1949  cat <<\_ACEOF
1950
1951Optional Features:
1952  --disable-option-checking  ignore unrecognized --enable/--with options
1953  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1954  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1955  --enable-openjdk-only   suppress building custom source even if present
1956                          [disabled]
1957  --enable-debug          set the debug level to fastdebug (shorthand for
1958                          --with-debug-level=fastdebug) [disabled]
1959  --disable-headful       disable building headful support (graphical UI
1960                          support) [enabled]
1961  --enable-unlimited-crypto
1962                          Enable unlimited crypto policy [disabled]
1963  --disable-keep-packaged-modules
1964                          Do not keep packaged modules in jdk image [enable]
1965  --enable-static-build   enable static library build [disabled]
1966  --disable-warnings-as-errors
1967                          do not consider native warnings to be an error
1968                          [enabled]
1969  --enable-debug-symbols  Deprecated. Option is kept for backwards
1970                          compatibility and is ignored
1971  --enable-zip-debug-info Deprecated. Option is kept for backwards
1972                          compatibility and is ignored
1973  --enable-native-coverage
1974                          enable native compilation with code coverage
1975                          data[disabled]
1976  --enable-dtrace[=yes/no/auto]
1977                          enable dtrace. Default is auto, where dtrace is
1978                          enabled if all dependencies are present.
1979  --disable-freetype-bundling
1980                          disable bundling of the freetype library with the
1981                          build result [enabled on Windows or when using
1982                          --with-freetype, disabled otherwise]
1983  --enable-jtreg-failure-handler
1984                          forces build of the jtreg failure handler to be
1985                          enabled, missing dependencies become fatal errors.
1986                          Default is auto, where the failure handler is built
1987                          if all dependencies are present and otherwise just
1988                          disabled.
1989  --enable-sjavac         use sjavac to do fast incremental compiles
1990                          [disabled]
1991  --disable-javac-server  disable javac server [enabled]
1992  --enable-icecc          enable distribted compilation of native code using
1993                          icecc/icecream [disabled]
1994  --disable-precompiled-headers
1995                          disable using precompiled headers when compiling C++
1996                          [enabled]
1997  --enable-ccache         enable using ccache to speed up recompilations
1998                          [disabled]
1999
2000Optional Packages:
2001  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2002  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2003  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
2004                          support it), e.g. --with-target-bits=32 [guessed]
2005  --with-custom-make-dir  Deprecated. Option is kept for backwards
2006                          compatibility and is ignored
2007  --with-jdk-variant      JDK variant to build (normal) [normal]
2008  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
2009                          optimized) [release]
2010  --with-jvm-variants     JVM variants (separated by commas) to build
2011                          (server,client,minimal,core,zero,zeroshark,custom)
2012                          [server]
2013  --with-devkit           use this devkit for compilers, tools and resources
2014  --with-sys-root         alias for --with-sysroot for backwards compatability
2015  --with-sysroot          use this directory as sysroot
2016  --with-tools-dir        alias for --with-toolchain-path for backwards
2017                          compatibility
2018  --with-toolchain-path   prepend these directories when searching for
2019                          toolchain binaries (compilers etc)
2020  --with-extra-path       prepend these directories to the default path
2021  --with-sdk-name         use the platform SDK of the given name. [macosx]
2022  --with-conf-name        use this as the name of the configuration [generated
2023                          from important configuration options]
2024  --with-output-sync      set make output sync type if supported by make.
2025                          [recurse]
2026  --with-default-make-target
2027                          set the default make target [exploded-image]
2028  --with-cacerts-file     specify alternative cacerts file
2029  --with-copyright-year   Set copyright year value for build [current year]
2030  --with-milestone        Deprecated. Option is kept for backwards
2031                          compatibility and is ignored
2032  --with-update-version   Deprecated. Option is kept for backwards
2033                          compatibility and is ignored
2034  --with-user-release-suffix
2035                          Deprecated. Option is kept for backwards
2036                          compatibility and is ignored
2037  --with-build-number     Deprecated. Option is kept for backwards
2038                          compatibility and is ignored
2039  --with-version-string   Set version string [calculated]
2040  --with-version-pre      Set the base part of the version 'PRE' field
2041                          (pre-release identifier) ['internal']
2042  --with-version-opt      Set version 'OPT' field (build metadata)
2043                          [<timestamp>.<user>.<dirname>]
2044  --with-version-build    Set version 'BUILD' field (build number) [not
2045                          specified]
2046  --with-version-major    Set version 'MAJOR' field (first number) [current
2047                          source value]
2048  --with-version-minor    Set version 'MINOR' field (second number) [current
2049                          source value]
2050  --with-version-security Set version 'SECURITY' field (third number) [current
2051                          source value]
2052  --with-version-patch    Set version 'PATCH' field (fourth number) [not
2053                          specified]
2054  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2055  --with-build-jdk        path to JDK of same version as is being built[the
2056                          newly built JDK]
2057  --with-add-source-root  Deprecated. Option is kept for backwards
2058                          compatibility and is ignored
2059  --with-override-source-root
2060                          Deprecated. Option is kept for backwards
2061                          compatibility and is ignored
2062  --with-adds-and-overrides
2063                          Deprecated. Option is kept for backwards
2064                          compatibility and is ignored
2065  --with-override-langtools
2066                          Deprecated. Option is kept for backwards
2067                          compatibility and is ignored
2068  --with-override-corba   Deprecated. Option is kept for backwards
2069                          compatibility and is ignored
2070  --with-override-jaxp    Deprecated. Option is kept for backwards
2071                          compatibility and is ignored
2072  --with-override-jaxws   Deprecated. Option is kept for backwards
2073                          compatibility and is ignored
2074  --with-override-hotspot Deprecated. Option is kept for backwards
2075                          compatibility and is ignored
2076  --with-override-nashorn Deprecated. Option is kept for backwards
2077                          compatibility and is ignored
2078  --with-override-jdk     Deprecated. Option is kept for backwards
2079                          compatibility and is ignored
2080  --with-import-hotspot   import hotspot binaries from this jdk image or
2081                          hotspot build dist dir instead of building from
2082                          source
2083  --with-import-modules   import a set of prebuilt modules either as a zip
2084                          file or an exploded directory
2085  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2086                          to show possible values [platform dependent]
2087  --with-extra-cflags     extra flags to be used when compiling jdk c-files
2088  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2089  --with-extra-ldflags    extra flags to be used when linking jdk
2090  --with-toolchain-version
2091                          the version of the toolchain to look for, use
2092                          '--help' to show possible values [platform
2093                          dependent]
2094  --with-build-devkit     Devkit to use for the build platform toolchain
2095  --with-jtreg            Regression Test Harness [probed]
2096  --with-native-debug-symbols
2097                          set the native debug symbol configuration (none,
2098                          internal, external, zipped) [varying]
2099  --with-jvm-features     additional JVM features to enable (separated by
2100                          comma), use '--help' to show possible values [none]
2101  --with-jvm-interpreter  Deprecated. Option is kept for backwards
2102                          compatibility and is ignored
2103  --with-stdc++lib=<static>,<dynamic>,<default>
2104                          force linking of the C++ runtime on Linux to either
2105                          static or dynamic, default is static with dynamic as
2106                          fallback
2107  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2108                          (Windows only) [probed]
2109  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2110                          (Windows only) [probed]
2111  --with-x                use the X Window System
2112  --with-cups             specify prefix directory for the cups package
2113                          (expecting the headers under PATH/include)
2114  --with-cups-include     specify directory for the cups include files
2115  --with-freetype         specify prefix directory for the freetype package
2116                          (expecting the libraries under PATH/lib and the
2117                          headers under PATH/include)
2118  --with-freetype-include specify directory for the freetype include files
2119  --with-freetype-lib     specify directory for the freetype library
2120  --with-freetype-src     specify directory with freetype sources to
2121                          automatically build the library (experimental,
2122                          Windows-only)
2123  --with-alsa             specify prefix directory for the alsa package
2124                          (expecting the libraries under PATH/lib and the
2125                          headers under PATH/include)
2126  --with-alsa-include     specify directory for the alsa include files
2127  --with-alsa-lib         specify directory for the alsa library
2128  --with-libffi           specify prefix directory for the libffi package
2129                          (expecting the libraries under PATH/lib and the
2130                          headers under PATH/include)
2131  --with-libffi-include   specify directory for the libffi include files
2132  --with-libffi-lib       specify directory for the libffi library
2133  --with-libjpeg          use libjpeg from build system or OpenJDK source
2134                          (system, bundled) [bundled]
2135  --with-giflib           use giflib from build system or OpenJDK source
2136                          (system, bundled) [bundled]
2137  --with-libpng           use libpng from build system or OpenJDK source
2138                          (system, bundled) [bundled]
2139  --with-zlib             use zlib from build system or OpenJDK source
2140                          (system, bundled) [bundled]
2141  --with-lcms             use lcms2 from build system or OpenJDK source
2142                          (system, bundled) [bundled]
2143  --with-dxsdk            Deprecated. Option is kept for backwards
2144                          compatibility and is ignored
2145  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2146                          compatibility and is ignored
2147  --with-dxsdk-include    Deprecated. Option is kept for backwards
2148                          compatibility and is ignored
2149  --with-num-cores        number of cores in the build system, e.g.
2150                          --with-num-cores=8 [probed]
2151  --with-memory-size      memory (in MB) available in the build system, e.g.
2152                          --with-memory-size=1024 [probed]
2153  --with-jobs             number of parallel jobs to let make run [calculated
2154                          based on cores and memory]
2155  --with-test-jobs        number of parallel tests jobs to run [based on build
2156                          jobs]
2157  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2158                          invocations of boot JDK, overriding the default
2159                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2160                          -enableassertions"
2161  --with-sjavac-server-java
2162                          use this java binary for running the sjavac
2163                          background server [Boot JDK java]
2164  --with-ccache-dir       where to store ccache files [~/.ccache]
2165
2166Some influential environment variables:
2167  BASENAME    Override default value for BASENAME
2168  BASH        Override default value for BASH
2169  CAT         Override default value for CAT
2170  CHMOD       Override default value for CHMOD
2171  CMP         Override default value for CMP
2172  COMM        Override default value for COMM
2173  CP          Override default value for CP
2174  CUT         Override default value for CUT
2175  DATE        Override default value for DATE
2176  DIFF        Override default value for DIFF
2177  DIRNAME     Override default value for DIRNAME
2178  ECHO        Override default value for ECHO
2179  EXPR        Override default value for EXPR
2180  FILE        Override default value for FILE
2181  FIND        Override default value for FIND
2182  HEAD        Override default value for HEAD
2183  LN          Override default value for LN
2184  LS          Override default value for LS
2185  MKDIR       Override default value for MKDIR
2186  MKTEMP      Override default value for MKTEMP
2187  MV          Override default value for MV
2188  NAWK        Override default value for NAWK
2189  PRINTF      Override default value for PRINTF
2190  RM          Override default value for RM
2191  RMDIR       Override default value for RMDIR
2192  SH          Override default value for SH
2193  SORT        Override default value for SORT
2194  TAIL        Override default value for TAIL
2195  TAR         Override default value for TAR
2196  TEE         Override default value for TEE
2197  TOUCH       Override default value for TOUCH
2198  TR          Override default value for TR
2199  UNAME       Override default value for UNAME
2200  UNIQ        Override default value for UNIQ
2201  WC          Override default value for WC
2202  WHICH       Override default value for WHICH
2203  XARGS       Override default value for XARGS
2204  AWK         Override default value for AWK
2205  GREP        Override default value for GREP
2206  EGREP       Override default value for EGREP
2207  FGREP       Override default value for FGREP
2208  SED         Override default value for SED
2209  CYGPATH     Override default value for CYGPATH
2210  READLINK    Override default value for READLINK
2211  DF          Override default value for DF
2212  CPIO        Override default value for CPIO
2213  NICE        Override default value for NICE
2214  MAKE        Override default value for MAKE
2215  UNZIP       Override default value for UNZIP
2216  ZIP         Override default value for ZIP
2217  LDD         Override default value for LDD
2218  OTOOL       Override default value for OTOOL
2219  READELF     Override default value for READELF
2220  HG          Override default value for HG
2221  STAT        Override default value for STAT
2222  TIME        Override default value for TIME
2223  DTRACE      Override default value for DTRACE
2224  PATCH       Override default value for PATCH
2225  DSYMUTIL    Override default value for DSYMUTIL
2226  XATTR       Override default value for XATTR
2227  CODESIGN    Override default value for CODESIGN
2228  SETFILE     Override default value for SETFILE
2229  PKG_CONFIG  path to pkg-config utility
2230  JAVA        Override default value for JAVA
2231  JAVAC       Override default value for JAVAC
2232  JAVAH       Override default value for JAVAH
2233  JAR         Override default value for JAR
2234  JARSIGNER   Override default value for JARSIGNER
2235  CC          C compiler command
2236  CFLAGS      C compiler flags
2237  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2238              nonstandard directory <lib dir>
2239  LIBS        libraries to pass to the linker, e.g. -l<library>
2240  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2241              you have headers in a nonstandard directory <include dir>
2242  CXX         C++ compiler command
2243  CXXFLAGS    C++ compiler flags
2244  CPP         C preprocessor
2245  CXXCPP      C++ preprocessor
2246  AS          Override default value for AS
2247  AR          Override default value for AR
2248  LIPO        Override default value for LIPO
2249  STRIP       Override default value for STRIP
2250  NM          Override default value for NM
2251  GNM         Override default value for GNM
2252  OBJCOPY     Override default value for OBJCOPY
2253  OBJDUMP     Override default value for OBJDUMP
2254  BUILD_CC    Override default value for BUILD_CC
2255  BUILD_CXX   Override default value for BUILD_CXX
2256  BUILD_NM    Override default value for BUILD_NM
2257  BUILD_AR    Override default value for BUILD_AR
2258  BUILD_OBJCOPY
2259              Override default value for BUILD_OBJCOPY
2260  BUILD_STRIP Override default value for BUILD_STRIP
2261  JTREGEXE    Override default value for JTREGEXE
2262  XMKMF       Path to xmkmf, Makefile generator for X Window System
2263  FREETYPE_CFLAGS
2264              C compiler flags for FREETYPE, overriding pkg-config
2265  FREETYPE_LIBS
2266              linker flags for FREETYPE, overriding pkg-config
2267  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2268  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2269  LIBFFI_CFLAGS
2270              C compiler flags for LIBFFI, overriding pkg-config
2271  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2272  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2273  PNG_LIBS    linker flags for PNG, overriding pkg-config
2274  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2275  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2276  ICECC_CMD   Override default value for ICECC_CMD
2277  ICECC_CREATE_ENV
2278              Override default value for ICECC_CREATE_ENV
2279  ICECC_WRAPPER
2280              Override default value for ICECC_WRAPPER
2281  CCACHE      Override default value for CCACHE
2282
2283Use these variables to override the choices made by `configure' or to help
2284it to find libraries and programs with nonstandard names/locations.
2285
2286Report bugs to <build-dev@openjdk.java.net>.
2287OpenJDK home page: <http://openjdk.java.net>.
2288_ACEOF
2289ac_status=$?
2290fi
2291
2292if test "$ac_init_help" = "recursive"; then
2293  # If there are subdirs, report their specific --help.
2294  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2295    test -d "$ac_dir" ||
2296      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2297      continue
2298    ac_builddir=.
2299
2300case "$ac_dir" in
2301.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2302*)
2303  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2304  # A ".." for each directory in $ac_dir_suffix.
2305  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2306  case $ac_top_builddir_sub in
2307  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2308  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2309  esac ;;
2310esac
2311ac_abs_top_builddir=$ac_pwd
2312ac_abs_builddir=$ac_pwd$ac_dir_suffix
2313# for backward compatibility:
2314ac_top_builddir=$ac_top_build_prefix
2315
2316case $srcdir in
2317  .)  # We are building in place.
2318    ac_srcdir=.
2319    ac_top_srcdir=$ac_top_builddir_sub
2320    ac_abs_top_srcdir=$ac_pwd ;;
2321  [\\/]* | ?:[\\/]* )  # Absolute name.
2322    ac_srcdir=$srcdir$ac_dir_suffix;
2323    ac_top_srcdir=$srcdir
2324    ac_abs_top_srcdir=$srcdir ;;
2325  *) # Relative name.
2326    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2327    ac_top_srcdir=$ac_top_build_prefix$srcdir
2328    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2329esac
2330ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2331
2332    cd "$ac_dir" || { ac_status=$?; continue; }
2333    # Check for guested configure.
2334    if test -f "$ac_srcdir/configure.gnu"; then
2335      echo &&
2336      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2337    elif test -f "$ac_srcdir/configure"; then
2338      echo &&
2339      $SHELL "$ac_srcdir/configure" --help=recursive
2340    else
2341      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2342    fi || ac_status=$?
2343    cd "$ac_pwd" || { ac_status=$?; break; }
2344  done
2345fi
2346
2347test -n "$ac_init_help" && exit $ac_status
2348if $ac_init_version; then
2349  cat <<\_ACEOF
2350OpenJDK configure jdk9
2351generated by GNU Autoconf 2.69
2352
2353Copyright (C) 2012 Free Software Foundation, Inc.
2354This configure script is free software; the Free Software Foundation
2355gives unlimited permission to copy, distribute and modify it.
2356_ACEOF
2357  exit
2358fi
2359
2360## ------------------------ ##
2361## Autoconf initialization. ##
2362## ------------------------ ##
2363
2364# ac_fn_c_try_compile LINENO
2365# --------------------------
2366# Try to compile conftest.$ac_ext, and return whether this succeeded.
2367ac_fn_c_try_compile ()
2368{
2369  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2370  rm -f conftest.$ac_objext
2371  if { { ac_try="$ac_compile"
2372case "(($ac_try" in
2373  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2374  *) ac_try_echo=$ac_try;;
2375esac
2376eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2377$as_echo "$ac_try_echo"; } >&5
2378  (eval "$ac_compile") 2>conftest.err
2379  ac_status=$?
2380  if test -s conftest.err; then
2381    grep -v '^ *+' conftest.err >conftest.er1
2382    cat conftest.er1 >&5
2383    mv -f conftest.er1 conftest.err
2384  fi
2385  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2386  test $ac_status = 0; } && {
2387	 test -z "$ac_c_werror_flag" ||
2388	 test ! -s conftest.err
2389       } && test -s conftest.$ac_objext; then :
2390  ac_retval=0
2391else
2392  $as_echo "$as_me: failed program was:" >&5
2393sed 's/^/| /' conftest.$ac_ext >&5
2394
2395	ac_retval=1
2396fi
2397  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2398  as_fn_set_status $ac_retval
2399
2400} # ac_fn_c_try_compile
2401
2402# ac_fn_cxx_try_compile LINENO
2403# ----------------------------
2404# Try to compile conftest.$ac_ext, and return whether this succeeded.
2405ac_fn_cxx_try_compile ()
2406{
2407  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2408  rm -f conftest.$ac_objext
2409  if { { ac_try="$ac_compile"
2410case "(($ac_try" in
2411  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2412  *) ac_try_echo=$ac_try;;
2413esac
2414eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2415$as_echo "$ac_try_echo"; } >&5
2416  (eval "$ac_compile") 2>conftest.err
2417  ac_status=$?
2418  if test -s conftest.err; then
2419    grep -v '^ *+' conftest.err >conftest.er1
2420    cat conftest.er1 >&5
2421    mv -f conftest.er1 conftest.err
2422  fi
2423  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2424  test $ac_status = 0; } && {
2425	 test -z "$ac_cxx_werror_flag" ||
2426	 test ! -s conftest.err
2427       } && test -s conftest.$ac_objext; then :
2428  ac_retval=0
2429else
2430  $as_echo "$as_me: failed program was:" >&5
2431sed 's/^/| /' conftest.$ac_ext >&5
2432
2433	ac_retval=1
2434fi
2435  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2436  as_fn_set_status $ac_retval
2437
2438} # ac_fn_cxx_try_compile
2439
2440# ac_fn_c_try_cpp LINENO
2441# ----------------------
2442# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2443ac_fn_c_try_cpp ()
2444{
2445  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2446  if { { ac_try="$ac_cpp conftest.$ac_ext"
2447case "(($ac_try" in
2448  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2449  *) ac_try_echo=$ac_try;;
2450esac
2451eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2452$as_echo "$ac_try_echo"; } >&5
2453  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2454  ac_status=$?
2455  if test -s conftest.err; then
2456    grep -v '^ *+' conftest.err >conftest.er1
2457    cat conftest.er1 >&5
2458    mv -f conftest.er1 conftest.err
2459  fi
2460  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2461  test $ac_status = 0; } > conftest.i && {
2462	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2463	 test ! -s conftest.err
2464       }; then :
2465  ac_retval=0
2466else
2467  $as_echo "$as_me: failed program was:" >&5
2468sed 's/^/| /' conftest.$ac_ext >&5
2469
2470    ac_retval=1
2471fi
2472  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2473  as_fn_set_status $ac_retval
2474
2475} # ac_fn_c_try_cpp
2476
2477# ac_fn_cxx_try_cpp LINENO
2478# ------------------------
2479# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2480ac_fn_cxx_try_cpp ()
2481{
2482  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2483  if { { ac_try="$ac_cpp conftest.$ac_ext"
2484case "(($ac_try" in
2485  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2486  *) ac_try_echo=$ac_try;;
2487esac
2488eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2489$as_echo "$ac_try_echo"; } >&5
2490  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2491  ac_status=$?
2492  if test -s conftest.err; then
2493    grep -v '^ *+' conftest.err >conftest.er1
2494    cat conftest.er1 >&5
2495    mv -f conftest.er1 conftest.err
2496  fi
2497  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2498  test $ac_status = 0; } > conftest.i && {
2499	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2500	 test ! -s conftest.err
2501       }; then :
2502  ac_retval=0
2503else
2504  $as_echo "$as_me: failed program was:" >&5
2505sed 's/^/| /' conftest.$ac_ext >&5
2506
2507    ac_retval=1
2508fi
2509  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2510  as_fn_set_status $ac_retval
2511
2512} # ac_fn_cxx_try_cpp
2513
2514# ac_fn_c_try_link LINENO
2515# -----------------------
2516# Try to link conftest.$ac_ext, and return whether this succeeded.
2517ac_fn_c_try_link ()
2518{
2519  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2520  rm -f conftest.$ac_objext conftest$ac_exeext
2521  if { { ac_try="$ac_link"
2522case "(($ac_try" in
2523  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2524  *) ac_try_echo=$ac_try;;
2525esac
2526eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2527$as_echo "$ac_try_echo"; } >&5
2528  (eval "$ac_link") 2>conftest.err
2529  ac_status=$?
2530  if test -s conftest.err; then
2531    grep -v '^ *+' conftest.err >conftest.er1
2532    cat conftest.er1 >&5
2533    mv -f conftest.er1 conftest.err
2534  fi
2535  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2536  test $ac_status = 0; } && {
2537	 test -z "$ac_c_werror_flag" ||
2538	 test ! -s conftest.err
2539       } && test -s conftest$ac_exeext && {
2540	 test "$cross_compiling" = yes ||
2541	 test -x conftest$ac_exeext
2542       }; then :
2543  ac_retval=0
2544else
2545  $as_echo "$as_me: failed program was:" >&5
2546sed 's/^/| /' conftest.$ac_ext >&5
2547
2548	ac_retval=1
2549fi
2550  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2551  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2552  # interfere with the next link command; also delete a directory that is
2553  # left behind by Apple's compiler.  We do this before executing the actions.
2554  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2555  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2556  as_fn_set_status $ac_retval
2557
2558} # ac_fn_c_try_link
2559
2560# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2561# ---------------------------------------------------------
2562# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2563# the include files in INCLUDES and setting the cache variable VAR
2564# accordingly.
2565ac_fn_cxx_check_header_mongrel ()
2566{
2567  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2568  if eval \${$3+:} false; then :
2569  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2570$as_echo_n "checking for $2... " >&6; }
2571if eval \${$3+:} false; then :
2572  $as_echo_n "(cached) " >&6
2573fi
2574eval ac_res=\$$3
2575	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2576$as_echo "$ac_res" >&6; }
2577else
2578  # Is the header compilable?
2579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2580$as_echo_n "checking $2 usability... " >&6; }
2581cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2582/* end confdefs.h.  */
2583$4
2584#include <$2>
2585_ACEOF
2586if ac_fn_cxx_try_compile "$LINENO"; then :
2587  ac_header_compiler=yes
2588else
2589  ac_header_compiler=no
2590fi
2591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2593$as_echo "$ac_header_compiler" >&6; }
2594
2595# Is the header present?
2596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2597$as_echo_n "checking $2 presence... " >&6; }
2598cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2599/* end confdefs.h.  */
2600#include <$2>
2601_ACEOF
2602if ac_fn_cxx_try_cpp "$LINENO"; then :
2603  ac_header_preproc=yes
2604else
2605  ac_header_preproc=no
2606fi
2607rm -f conftest.err conftest.i conftest.$ac_ext
2608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2609$as_echo "$ac_header_preproc" >&6; }
2610
2611# So?  What about this header?
2612case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2613  yes:no: )
2614    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2615$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2616    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2617$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2618    ;;
2619  no:yes:* )
2620    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2621$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2622    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2623$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2624    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2625$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2626    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2627$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2628    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2629$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2630( $as_echo "## ----------------------------------------- ##
2631## Report this to build-dev@openjdk.java.net ##
2632## ----------------------------------------- ##"
2633     ) | sed "s/^/$as_me: WARNING:     /" >&2
2634    ;;
2635esac
2636  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2637$as_echo_n "checking for $2... " >&6; }
2638if eval \${$3+:} false; then :
2639  $as_echo_n "(cached) " >&6
2640else
2641  eval "$3=\$ac_header_compiler"
2642fi
2643eval ac_res=\$$3
2644	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2645$as_echo "$ac_res" >&6; }
2646fi
2647  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2648
2649} # ac_fn_cxx_check_header_mongrel
2650
2651# ac_fn_cxx_try_run LINENO
2652# ------------------------
2653# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2654# that executables *can* be run.
2655ac_fn_cxx_try_run ()
2656{
2657  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2658  if { { ac_try="$ac_link"
2659case "(($ac_try" in
2660  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2661  *) ac_try_echo=$ac_try;;
2662esac
2663eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2664$as_echo "$ac_try_echo"; } >&5
2665  (eval "$ac_link") 2>&5
2666  ac_status=$?
2667  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2668  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2669  { { case "(($ac_try" in
2670  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2671  *) ac_try_echo=$ac_try;;
2672esac
2673eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2674$as_echo "$ac_try_echo"; } >&5
2675  (eval "$ac_try") 2>&5
2676  ac_status=$?
2677  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2678  test $ac_status = 0; }; }; then :
2679  ac_retval=0
2680else
2681  $as_echo "$as_me: program exited with status $ac_status" >&5
2682       $as_echo "$as_me: failed program was:" >&5
2683sed 's/^/| /' conftest.$ac_ext >&5
2684
2685       ac_retval=$ac_status
2686fi
2687  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2688  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2689  as_fn_set_status $ac_retval
2690
2691} # ac_fn_cxx_try_run
2692
2693# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2694# ---------------------------------------------------------
2695# Tests whether HEADER exists and can be compiled using the include files in
2696# INCLUDES, setting the cache variable VAR accordingly.
2697ac_fn_cxx_check_header_compile ()
2698{
2699  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2700  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2701$as_echo_n "checking for $2... " >&6; }
2702if eval \${$3+:} false; then :
2703  $as_echo_n "(cached) " >&6
2704else
2705  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2706/* end confdefs.h.  */
2707$4
2708#include <$2>
2709_ACEOF
2710if ac_fn_cxx_try_compile "$LINENO"; then :
2711  eval "$3=yes"
2712else
2713  eval "$3=no"
2714fi
2715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2716fi
2717eval ac_res=\$$3
2718	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2719$as_echo "$ac_res" >&6; }
2720  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2721
2722} # ac_fn_cxx_check_header_compile
2723
2724# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2725# ----------------------------------------------
2726# Tries to find the compile-time value of EXPR in a program that includes
2727# INCLUDES, setting VAR accordingly. Returns whether the value could be
2728# computed
2729ac_fn_cxx_compute_int ()
2730{
2731  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2732  if test "$cross_compiling" = yes; then
2733    # Depending upon the size, compute the lo and hi bounds.
2734cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2735/* end confdefs.h.  */
2736$4
2737int
2738main ()
2739{
2740static int test_array [1 - 2 * !(($2) >= 0)];
2741test_array [0] = 0;
2742return test_array [0];
2743
2744  ;
2745  return 0;
2746}
2747_ACEOF
2748if ac_fn_cxx_try_compile "$LINENO"; then :
2749  ac_lo=0 ac_mid=0
2750  while :; do
2751    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2752/* end confdefs.h.  */
2753$4
2754int
2755main ()
2756{
2757static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2758test_array [0] = 0;
2759return test_array [0];
2760
2761  ;
2762  return 0;
2763}
2764_ACEOF
2765if ac_fn_cxx_try_compile "$LINENO"; then :
2766  ac_hi=$ac_mid; break
2767else
2768  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2769			if test $ac_lo -le $ac_mid; then
2770			  ac_lo= ac_hi=
2771			  break
2772			fi
2773			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2774fi
2775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2776  done
2777else
2778  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2779/* end confdefs.h.  */
2780$4
2781int
2782main ()
2783{
2784static int test_array [1 - 2 * !(($2) < 0)];
2785test_array [0] = 0;
2786return test_array [0];
2787
2788  ;
2789  return 0;
2790}
2791_ACEOF
2792if ac_fn_cxx_try_compile "$LINENO"; then :
2793  ac_hi=-1 ac_mid=-1
2794  while :; do
2795    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2796/* end confdefs.h.  */
2797$4
2798int
2799main ()
2800{
2801static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2802test_array [0] = 0;
2803return test_array [0];
2804
2805  ;
2806  return 0;
2807}
2808_ACEOF
2809if ac_fn_cxx_try_compile "$LINENO"; then :
2810  ac_lo=$ac_mid; break
2811else
2812  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2813			if test $ac_mid -le $ac_hi; then
2814			  ac_lo= ac_hi=
2815			  break
2816			fi
2817			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2818fi
2819rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2820  done
2821else
2822  ac_lo= ac_hi=
2823fi
2824rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2825fi
2826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2827# Binary search between lo and hi bounds.
2828while test "x$ac_lo" != "x$ac_hi"; do
2829  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2830  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2831/* end confdefs.h.  */
2832$4
2833int
2834main ()
2835{
2836static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2837test_array [0] = 0;
2838return test_array [0];
2839
2840  ;
2841  return 0;
2842}
2843_ACEOF
2844if ac_fn_cxx_try_compile "$LINENO"; then :
2845  ac_hi=$ac_mid
2846else
2847  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2848fi
2849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2850done
2851case $ac_lo in #((
2852?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2853'') ac_retval=1 ;;
2854esac
2855  else
2856    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2857/* end confdefs.h.  */
2858$4
2859static long int longval () { return $2; }
2860static unsigned long int ulongval () { return $2; }
2861#include <stdio.h>
2862#include <stdlib.h>
2863int
2864main ()
2865{
2866
2867  FILE *f = fopen ("conftest.val", "w");
2868  if (! f)
2869    return 1;
2870  if (($2) < 0)
2871    {
2872      long int i = longval ();
2873      if (i != ($2))
2874	return 1;
2875      fprintf (f, "%ld", i);
2876    }
2877  else
2878    {
2879      unsigned long int i = ulongval ();
2880      if (i != ($2))
2881	return 1;
2882      fprintf (f, "%lu", i);
2883    }
2884  /* Do not output a trailing newline, as this causes \r\n confusion
2885     on some platforms.  */
2886  return ferror (f) || fclose (f) != 0;
2887
2888  ;
2889  return 0;
2890}
2891_ACEOF
2892if ac_fn_cxx_try_run "$LINENO"; then :
2893  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2894else
2895  ac_retval=1
2896fi
2897rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2898  conftest.$ac_objext conftest.beam conftest.$ac_ext
2899rm -f conftest.val
2900
2901  fi
2902  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2903  as_fn_set_status $ac_retval
2904
2905} # ac_fn_cxx_compute_int
2906
2907# ac_fn_cxx_try_link LINENO
2908# -------------------------
2909# Try to link conftest.$ac_ext, and return whether this succeeded.
2910ac_fn_cxx_try_link ()
2911{
2912  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2913  rm -f conftest.$ac_objext conftest$ac_exeext
2914  if { { ac_try="$ac_link"
2915case "(($ac_try" in
2916  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2917  *) ac_try_echo=$ac_try;;
2918esac
2919eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2920$as_echo "$ac_try_echo"; } >&5
2921  (eval "$ac_link") 2>conftest.err
2922  ac_status=$?
2923  if test -s conftest.err; then
2924    grep -v '^ *+' conftest.err >conftest.er1
2925    cat conftest.er1 >&5
2926    mv -f conftest.er1 conftest.err
2927  fi
2928  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2929  test $ac_status = 0; } && {
2930	 test -z "$ac_cxx_werror_flag" ||
2931	 test ! -s conftest.err
2932       } && test -s conftest$ac_exeext && {
2933	 test "$cross_compiling" = yes ||
2934	 test -x conftest$ac_exeext
2935       }; then :
2936  ac_retval=0
2937else
2938  $as_echo "$as_me: failed program was:" >&5
2939sed 's/^/| /' conftest.$ac_ext >&5
2940
2941	ac_retval=1
2942fi
2943  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2944  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2945  # interfere with the next link command; also delete a directory that is
2946  # left behind by Apple's compiler.  We do this before executing the actions.
2947  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2948  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2949  as_fn_set_status $ac_retval
2950
2951} # ac_fn_cxx_try_link
2952
2953# ac_fn_cxx_check_func LINENO FUNC VAR
2954# ------------------------------------
2955# Tests whether FUNC exists, setting the cache variable VAR accordingly
2956ac_fn_cxx_check_func ()
2957{
2958  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2959  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2960$as_echo_n "checking for $2... " >&6; }
2961if eval \${$3+:} false; then :
2962  $as_echo_n "(cached) " >&6
2963else
2964  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2965/* end confdefs.h.  */
2966/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2967   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2968#define $2 innocuous_$2
2969
2970/* System header to define __stub macros and hopefully few prototypes,
2971    which can conflict with char $2 (); below.
2972    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2973    <limits.h> exists even on freestanding compilers.  */
2974
2975#ifdef __STDC__
2976# include <limits.h>
2977#else
2978# include <assert.h>
2979#endif
2980
2981#undef $2
2982
2983/* Override any GCC internal prototype to avoid an error.
2984   Use char because int might match the return type of a GCC
2985   builtin and then its argument prototype would still apply.  */
2986#ifdef __cplusplus
2987extern "C"
2988#endif
2989char $2 ();
2990/* The GNU C library defines this for functions which it implements
2991    to always fail with ENOSYS.  Some functions are actually named
2992    something starting with __ and the normal name is an alias.  */
2993#if defined __stub_$2 || defined __stub___$2
2994choke me
2995#endif
2996
2997int
2998main ()
2999{
3000return $2 ();
3001  ;
3002  return 0;
3003}
3004_ACEOF
3005if ac_fn_cxx_try_link "$LINENO"; then :
3006  eval "$3=yes"
3007else
3008  eval "$3=no"
3009fi
3010rm -f core conftest.err conftest.$ac_objext \
3011    conftest$ac_exeext conftest.$ac_ext
3012fi
3013eval ac_res=\$$3
3014	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3015$as_echo "$ac_res" >&6; }
3016  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3017
3018} # ac_fn_cxx_check_func
3019
3020# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3021# -------------------------------------------------------
3022# Tests whether HEADER exists and can be compiled using the include files in
3023# INCLUDES, setting the cache variable VAR accordingly.
3024ac_fn_c_check_header_compile ()
3025{
3026  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3027  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3028$as_echo_n "checking for $2... " >&6; }
3029if eval \${$3+:} false; then :
3030  $as_echo_n "(cached) " >&6
3031else
3032  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3033/* end confdefs.h.  */
3034$4
3035#include <$2>
3036_ACEOF
3037if ac_fn_c_try_compile "$LINENO"; then :
3038  eval "$3=yes"
3039else
3040  eval "$3=no"
3041fi
3042rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3043fi
3044eval ac_res=\$$3
3045	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3046$as_echo "$ac_res" >&6; }
3047  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3048
3049} # ac_fn_c_check_header_compile
3050cat >config.log <<_ACEOF
3051This file contains any messages produced by compilers while
3052running configure, to aid debugging if configure makes a mistake.
3053
3054It was created by OpenJDK $as_me jdk9, which was
3055generated by GNU Autoconf 2.69.  Invocation command line was
3056
3057  $ $0 $@
3058
3059_ACEOF
3060exec 5>>config.log
3061{
3062cat <<_ASUNAME
3063## --------- ##
3064## Platform. ##
3065## --------- ##
3066
3067hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3068uname -m = `(uname -m) 2>/dev/null || echo unknown`
3069uname -r = `(uname -r) 2>/dev/null || echo unknown`
3070uname -s = `(uname -s) 2>/dev/null || echo unknown`
3071uname -v = `(uname -v) 2>/dev/null || echo unknown`
3072
3073/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3074/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3075
3076/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3077/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3078/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3079/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3080/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3081/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3082/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3083
3084_ASUNAME
3085
3086as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3087for as_dir in $PATH
3088do
3089  IFS=$as_save_IFS
3090  test -z "$as_dir" && as_dir=.
3091    $as_echo "PATH: $as_dir"
3092  done
3093IFS=$as_save_IFS
3094
3095} >&5
3096
3097cat >&5 <<_ACEOF
3098
3099
3100## ----------- ##
3101## Core tests. ##
3102## ----------- ##
3103
3104_ACEOF
3105
3106
3107# Keep a trace of the command line.
3108# Strip out --no-create and --no-recursion so they do not pile up.
3109# Strip out --silent because we don't want to record it for future runs.
3110# Also quote any args containing shell meta-characters.
3111# Make two passes to allow for proper duplicate-argument suppression.
3112ac_configure_args=
3113ac_configure_args0=
3114ac_configure_args1=
3115ac_must_keep_next=false
3116for ac_pass in 1 2
3117do
3118  for ac_arg
3119  do
3120    case $ac_arg in
3121    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3122    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3123    | -silent | --silent | --silen | --sile | --sil)
3124      continue ;;
3125    *\'*)
3126      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3127    esac
3128    case $ac_pass in
3129    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3130    2)
3131      as_fn_append ac_configure_args1 " '$ac_arg'"
3132      if test $ac_must_keep_next = true; then
3133	ac_must_keep_next=false # Got value, back to normal.
3134      else
3135	case $ac_arg in
3136	  *=* | --config-cache | -C | -disable-* | --disable-* \
3137	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3138	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3139	  | -with-* | --with-* | -without-* | --without-* | --x)
3140	    case "$ac_configure_args0 " in
3141	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3142	    esac
3143	    ;;
3144	  -* ) ac_must_keep_next=true ;;
3145	esac
3146      fi
3147      as_fn_append ac_configure_args " '$ac_arg'"
3148      ;;
3149    esac
3150  done
3151done
3152{ ac_configure_args0=; unset ac_configure_args0;}
3153{ ac_configure_args1=; unset ac_configure_args1;}
3154
3155# When interrupted or exit'd, cleanup temporary files, and complete
3156# config.log.  We remove comments because anyway the quotes in there
3157# would cause problems or look ugly.
3158# WARNING: Use '\'' to represent an apostrophe within the trap.
3159# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3160trap 'exit_status=$?
3161  # Save into config.log some information that might help in debugging.
3162  {
3163    echo
3164
3165    $as_echo "## ---------------- ##
3166## Cache variables. ##
3167## ---------------- ##"
3168    echo
3169    # The following way of writing the cache mishandles newlines in values,
3170(
3171  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3172    eval ac_val=\$$ac_var
3173    case $ac_val in #(
3174    *${as_nl}*)
3175      case $ac_var in #(
3176      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3177$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3178      esac
3179      case $ac_var in #(
3180      _ | IFS | as_nl) ;; #(
3181      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3182      *) { eval $ac_var=; unset $ac_var;} ;;
3183      esac ;;
3184    esac
3185  done
3186  (set) 2>&1 |
3187    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3188    *${as_nl}ac_space=\ *)
3189      sed -n \
3190	"s/'\''/'\''\\\\'\'''\''/g;
3191	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3192      ;; #(
3193    *)
3194      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3195      ;;
3196    esac |
3197    sort
3198)
3199    echo
3200
3201    $as_echo "## ----------------- ##
3202## Output variables. ##
3203## ----------------- ##"
3204    echo
3205    for ac_var in $ac_subst_vars
3206    do
3207      eval ac_val=\$$ac_var
3208      case $ac_val in
3209      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3210      esac
3211      $as_echo "$ac_var='\''$ac_val'\''"
3212    done | sort
3213    echo
3214
3215    if test -n "$ac_subst_files"; then
3216      $as_echo "## ------------------- ##
3217## File substitutions. ##
3218## ------------------- ##"
3219      echo
3220      for ac_var in $ac_subst_files
3221      do
3222	eval ac_val=\$$ac_var
3223	case $ac_val in
3224	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3225	esac
3226	$as_echo "$ac_var='\''$ac_val'\''"
3227      done | sort
3228      echo
3229    fi
3230
3231    if test -s confdefs.h; then
3232      $as_echo "## ----------- ##
3233## confdefs.h. ##
3234## ----------- ##"
3235      echo
3236      cat confdefs.h
3237      echo
3238    fi
3239    test "$ac_signal" != 0 &&
3240      $as_echo "$as_me: caught signal $ac_signal"
3241    $as_echo "$as_me: exit $exit_status"
3242  } >&5
3243  rm -f core *.core core.conftest.* &&
3244    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3245    exit $exit_status
3246' 0
3247for ac_signal in 1 2 13 15; do
3248  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3249done
3250ac_signal=0
3251
3252# confdefs.h avoids OS command line length limits that DEFS can exceed.
3253rm -f -r conftest* confdefs.h
3254
3255$as_echo "/* confdefs.h */" > confdefs.h
3256
3257# Predefined preprocessor variables.
3258
3259cat >>confdefs.h <<_ACEOF
3260#define PACKAGE_NAME "$PACKAGE_NAME"
3261_ACEOF
3262
3263cat >>confdefs.h <<_ACEOF
3264#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3265_ACEOF
3266
3267cat >>confdefs.h <<_ACEOF
3268#define PACKAGE_VERSION "$PACKAGE_VERSION"
3269_ACEOF
3270
3271cat >>confdefs.h <<_ACEOF
3272#define PACKAGE_STRING "$PACKAGE_STRING"
3273_ACEOF
3274
3275cat >>confdefs.h <<_ACEOF
3276#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3277_ACEOF
3278
3279cat >>confdefs.h <<_ACEOF
3280#define PACKAGE_URL "$PACKAGE_URL"
3281_ACEOF
3282
3283
3284# Let the site file select an alternate cache file if it wants to.
3285# Prefer an explicitly selected file to automatically selected ones.
3286ac_site_file1=NONE
3287ac_site_file2=NONE
3288if test -n "$CONFIG_SITE"; then
3289  # We do not want a PATH search for config.site.
3290  case $CONFIG_SITE in #((
3291    -*)  ac_site_file1=./$CONFIG_SITE;;
3292    */*) ac_site_file1=$CONFIG_SITE;;
3293    *)   ac_site_file1=./$CONFIG_SITE;;
3294  esac
3295elif test "x$prefix" != xNONE; then
3296  ac_site_file1=$prefix/share/config.site
3297  ac_site_file2=$prefix/etc/config.site
3298else
3299  ac_site_file1=$ac_default_prefix/share/config.site
3300  ac_site_file2=$ac_default_prefix/etc/config.site
3301fi
3302for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3303do
3304  test "x$ac_site_file" = xNONE && continue
3305  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3306    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3307$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3308    sed 's/^/| /' "$ac_site_file" >&5
3309    . "$ac_site_file" \
3310      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3311$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3312as_fn_error $? "failed to load site script $ac_site_file
3313See \`config.log' for more details" "$LINENO" 5; }
3314  fi
3315done
3316
3317if test -r "$cache_file"; then
3318  # Some versions of bash will fail to source /dev/null (special files
3319  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3320  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3321    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3322$as_echo "$as_me: loading cache $cache_file" >&6;}
3323    case $cache_file in
3324      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3325      *)                      . "./$cache_file";;
3326    esac
3327  fi
3328else
3329  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3330$as_echo "$as_me: creating cache $cache_file" >&6;}
3331  >$cache_file
3332fi
3333
3334# Check that the precious variables saved in the cache have kept the same
3335# value.
3336ac_cache_corrupted=false
3337for ac_var in $ac_precious_vars; do
3338  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3339  eval ac_new_set=\$ac_env_${ac_var}_set
3340  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3341  eval ac_new_val=\$ac_env_${ac_var}_value
3342  case $ac_old_set,$ac_new_set in
3343    set,)
3344      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3345$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3346      ac_cache_corrupted=: ;;
3347    ,set)
3348      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3349$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3350      ac_cache_corrupted=: ;;
3351    ,);;
3352    *)
3353      if test "x$ac_old_val" != "x$ac_new_val"; then
3354	# differences in whitespace do not lead to failure.
3355	ac_old_val_w=`echo x $ac_old_val`
3356	ac_new_val_w=`echo x $ac_new_val`
3357	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3358	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3359$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3360	  ac_cache_corrupted=:
3361	else
3362	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3363$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3364	  eval $ac_var=\$ac_old_val
3365	fi
3366	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3367$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3368	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3369$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3370      fi;;
3371  esac
3372  # Pass precious variables to config.status.
3373  if test "$ac_new_set" = set; then
3374    case $ac_new_val in
3375    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3376    *) ac_arg=$ac_var=$ac_new_val ;;
3377    esac
3378    case " $ac_configure_args " in
3379      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3380      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3381    esac
3382  fi
3383done
3384if $ac_cache_corrupted; then
3385  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3386$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3387  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3388$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3389  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3390fi
3391## -------------------- ##
3392## Main body of script. ##
3393## -------------------- ##
3394
3395ac_ext=c
3396ac_cpp='$CPP $CPPFLAGS'
3397ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3398ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3399ac_compiler_gnu=$ac_cv_c_compiler_gnu
3400
3401
3402
3403ac_aux_dir=
3404for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3405  if test -f "$ac_dir/install-sh"; then
3406    ac_aux_dir=$ac_dir
3407    ac_install_sh="$ac_aux_dir/install-sh -c"
3408    break
3409  elif test -f "$ac_dir/install.sh"; then
3410    ac_aux_dir=$ac_dir
3411    ac_install_sh="$ac_aux_dir/install.sh -c"
3412    break
3413  elif test -f "$ac_dir/shtool"; then
3414    ac_aux_dir=$ac_dir
3415    ac_install_sh="$ac_aux_dir/shtool install -c"
3416    break
3417  fi
3418done
3419if test -z "$ac_aux_dir"; then
3420  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
3421fi
3422
3423# These three variables are undocumented and unsupported,
3424# and are intended to be withdrawn in a future Autoconf release.
3425# They can cause serious problems if a builder's source tree is in a directory
3426# whose full name contains unusual characters.
3427ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3428ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3429ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3430
3431
3432# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3433
3434#
3435# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3436# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3437#
3438# This code is free software; you can redistribute it and/or modify it
3439# under the terms of the GNU General Public License version 2 only, as
3440# published by the Free Software Foundation.  Oracle designates this
3441# particular file as subject to the "Classpath" exception as provided
3442# by Oracle in the LICENSE file that accompanied this code.
3443#
3444# This code is distributed in the hope that it will be useful, but WITHOUT
3445# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3446# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3447# version 2 for more details (a copy is included in the LICENSE file that
3448# accompanied this code).
3449#
3450# You should have received a copy of the GNU General Public License version
3451# 2 along with this work; if not, write to the Free Software Foundation,
3452# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3453#
3454# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3455# or visit www.oracle.com if you need additional information or have any
3456# questions.
3457#
3458
3459#
3460# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3461#
3462# This program is free software; you can redistribute it and/or modify
3463# it under the terms of the GNU General Public License as published by
3464# the Free Software Foundation; either version 2 of the License, or
3465# (at your option) any later version.
3466#
3467# This program is distributed in the hope that it will be useful, but
3468# WITHOUT ANY WARRANTY; without even the implied warranty of
3469# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3470# General Public License for more details.
3471#
3472# You should have received a copy of the GNU General Public License
3473# along with this program; if not, write to the Free Software
3474# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3475#
3476# As a special exception to the GNU General Public License, if you
3477# distribute this file as part of a program that contains a
3478# configuration script generated by Autoconf, you may include it under
3479# the same distribution terms that you use for the rest of that program.
3480
3481# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3482# ----------------------------------
3483# PKG_PROG_PKG_CONFIG
3484
3485# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3486#
3487# Check to see whether a particular set of modules exists.  Similar
3488# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3489#
3490#
3491# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3492# this or PKG_CHECK_MODULES is called, or make sure to call
3493# PKG_CHECK_EXISTS manually
3494# --------------------------------------------------------------
3495
3496
3497
3498# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3499# ---------------------------------------------
3500# _PKG_CONFIG
3501
3502# _PKG_SHORT_ERRORS_SUPPORTED
3503# -----------------------------
3504# _PKG_SHORT_ERRORS_SUPPORTED
3505
3506
3507# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3508# [ACTION-IF-NOT-FOUND])
3509#
3510#
3511# Note that if there is a possibility the first call to
3512# PKG_CHECK_MODULES might not happen, you should be sure to include an
3513# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3514#
3515#
3516# --------------------------------------------------------------
3517# PKG_CHECK_MODULES
3518
3519
3520# Include these first...
3521#
3522# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3523# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3524#
3525# This code is free software; you can redistribute it and/or modify it
3526# under the terms of the GNU General Public License version 2 only, as
3527# published by the Free Software Foundation.  Oracle designates this
3528# particular file as subject to the "Classpath" exception as provided
3529# by Oracle in the LICENSE file that accompanied this code.
3530#
3531# This code is distributed in the hope that it will be useful, but WITHOUT
3532# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3533# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3534# version 2 for more details (a copy is included in the LICENSE file that
3535# accompanied this code).
3536#
3537# You should have received a copy of the GNU General Public License version
3538# 2 along with this work; if not, write to the Free Software Foundation,
3539# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3540#
3541# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3542# or visit www.oracle.com if you need additional information or have any
3543# questions.
3544#
3545
3546# Create a function/macro that takes a series of named arguments. The call is
3547# similar to AC_DEFUN, but the setup of the function looks like this:
3548# BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3549# ... do something
3550#   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3551# ])
3552# A star (*) in front of a named argument means that it is required and it's
3553# presence will be verified. To pass e.g. the first value as a normal indexed
3554# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3555# arguments are referenced in the function by their name prefixed by ARG_, e.g.
3556# "ARG_FOO".
3557#
3558# The generated function can be called like this:
3559# MYFUNC(FOO: [foo-val],
3560#     BAR: [
3561#         $ECHO hello world
3562#     ])
3563# Note that the argument value must start on the same line as the argument name.
3564#
3565# Argument 1: Name of the function to define
3566# Argument 2: List of legal named arguments, with a * prefix for required arguments
3567# Argument 3: Argument array to treat as named, typically $@
3568# Argument 4: The main function body
3569
3570
3571# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3572# If so, then append $1 to $2 \
3573# Also set JVM_ARG_OK to true/false depending on outcome.
3574
3575
3576# Appends a string to a path variable, only adding the : when needed.
3577
3578
3579# Prepends a string to a path variable, only adding the : when needed.
3580
3581
3582# This will make sure the given variable points to a full and proper
3583# path. This means:
3584# 1) There will be no spaces in the path. On unix platforms,
3585#    spaces in the path will result in an error. On Windows,
3586#    the path will be rewritten using short-style to be space-free.
3587# 2) The path will be absolute, and it will be in unix-style (on
3588#     cygwin).
3589# $1: The name of the variable to fix
3590
3591
3592# This will make sure the given variable points to a executable
3593# with a full and proper path. This means:
3594# 1) There will be no spaces in the path. On unix platforms,
3595#    spaces in the path will result in an error. On Windows,
3596#    the path will be rewritten using short-style to be space-free.
3597# 2) The path will be absolute, and it will be in unix-style (on
3598#     cygwin).
3599# Any arguments given to the executable is preserved.
3600# If the input variable does not have a directory specification, then
3601# it need to be in the PATH.
3602# $1: The name of the variable to fix
3603
3604
3605
3606
3607# Register a --with argument but mark it as deprecated
3608# $1: The name of the with argument to deprecate, not including --with-
3609
3610
3611# Register a --enable argument but mark it as deprecated
3612# $1: The name of the with argument to deprecate, not including --enable-
3613# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3614# $3: Messages to user.
3615
3616
3617
3618
3619# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3620# $1: variable to check
3621
3622
3623# Check that there are no unprocessed overridden variables left.
3624# If so, they are an incorrect argument and we will exit with an error.
3625
3626
3627# Setup a tool for the given variable. If correctly specified by the user,
3628# use that value, otherwise search for the tool using the supplied code snippet.
3629# $1: variable to set
3630# $2: code snippet to call to look for the tool
3631# $3: code snippet to call if variable was used to find tool
3632
3633
3634# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3635# $1: variable to set
3636# $2: executable name (or list of names) to look for
3637
3638
3639# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3640# $1: variable to set
3641# $2: executable name (or list of names) to look for
3642
3643
3644# Like BASIC_PATH_PROGS but fails if no tool was found.
3645# $1: variable to set
3646# $2: executable name (or list of names) to look for
3647
3648
3649# Like BASIC_SETUP_TOOL but fails if no tool was found.
3650# $1: variable to set
3651# $2: autoconf macro to call to look for the special tool
3652
3653
3654# Setup the most fundamental tools that relies on not much else to set up,
3655# but is used by much of the early bootstrap code.
3656
3657
3658# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3659
3660
3661# Evaluates platform specific overrides for devkit variables.
3662# $1: Name of variable
3663
3664
3665
3666
3667
3668
3669#%%% Simple tools %%%
3670
3671# Check if we have found a usable version of make
3672# $1: the path to a potential make binary (or empty)
3673# $2: the description on how we found this
3674
3675
3676
3677
3678# Goes looking for a usable version of GNU make.
3679
3680
3681
3682
3683
3684
3685# Check if build directory is on local disk. If not possible to determine,
3686# we prefer to claim it's local.
3687# Argument 1: directory to test
3688# Argument 2: what to do if it is on local disk
3689# Argument 3: what to do otherwise (remote disk or failure)
3690
3691
3692# Check that source files have basic read permissions set. This might
3693# not be the case in cygwin in certain conditions.
3694
3695
3696
3697
3698# Check for support for specific options in bash
3699
3700
3701################################################################################
3702#
3703# Default make target
3704#
3705
3706
3707# Code to run after AC_OUTPUT
3708
3709
3710#
3711# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3712# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3713#
3714# This code is free software; you can redistribute it and/or modify it
3715# under the terms of the GNU General Public License version 2 only, as
3716# published by the Free Software Foundation.  Oracle designates this
3717# particular file as subject to the "Classpath" exception as provided
3718# by Oracle in the LICENSE file that accompanied this code.
3719#
3720# This code is distributed in the hope that it will be useful, but WITHOUT
3721# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3722# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3723# version 2 for more details (a copy is included in the LICENSE file that
3724# accompanied this code).
3725#
3726# You should have received a copy of the GNU General Public License version
3727# 2 along with this work; if not, write to the Free Software Foundation,
3728# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3729#
3730# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3731# or visit www.oracle.com if you need additional information or have any
3732# questions.
3733#
3734
3735
3736
3737
3738
3739# Helper function which possibly converts a path using DOS-style short mode.
3740# If so, the updated path is stored in $new_path.
3741# $1: The path to check
3742
3743
3744# Helper function which possibly converts a path using DOS-style short mode.
3745# If so, the updated path is stored in $new_path.
3746# $1: The path to check
3747
3748
3749# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3750# and could probably be heavily simplified. However, all changes in this
3751# area tend to need lot of testing in different scenarios, and in lack of
3752# proper unit testing, cleaning this up has not been deemed worth the effort
3753# at the moment.
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3764
3765
3766
3767
3768# ... then the rest
3769#
3770# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3771# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3772#
3773# This code is free software; you can redistribute it and/or modify it
3774# under the terms of the GNU General Public License version 2 only, as
3775# published by the Free Software Foundation.  Oracle designates this
3776# particular file as subject to the "Classpath" exception as provided
3777# by Oracle in the LICENSE file that accompanied this code.
3778#
3779# This code is distributed in the hope that it will be useful, but WITHOUT
3780# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3781# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3782# version 2 for more details (a copy is included in the LICENSE file that
3783# accompanied this code).
3784#
3785# You should have received a copy of the GNU General Public License version
3786# 2 along with this work; if not, write to the Free Software Foundation,
3787# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3788#
3789# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3790# or visit www.oracle.com if you need additional information or have any
3791# questions.
3792#
3793
3794########################################################################
3795# This file handles detection of the Boot JDK. The Boot JDK detection
3796# process has been developed as a response to solve a complex real-world
3797# problem. Initially, it was simple, but it has grown as platform after
3798# platform, idiosyncracy after idiosyncracy has been supported.
3799#
3800# The basic idea is this:
3801# 1) You need an acceptable *) JDK to use as a Boot JDK
3802# 2) There are several ways to locate a JDK, that are mostly platform
3803#    dependent **)
3804# 3) You can have multiple JDKs installed
3805# 4) If possible, configure should try to dig out an acceptable JDK
3806#    automatically, without having to resort to command-line options
3807#
3808# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3809#     javac) and not a JRE, etc.
3810#
3811# **) On Windows we typically use a well-known path.
3812#     On MacOSX we typically use the tool java_home.
3813#     On Linux we typically find javac in the $PATH, and then follow a
3814#     chain of symlinks that often ends up in a real JDK.
3815#
3816# This leads to the code where we check in different ways to locate a
3817# JDK, and if one is found, check if it is acceptable. If not, we print
3818# our reasons for rejecting it (useful when debugging non-working
3819# configure situations) and continue checking the next one.
3820########################################################################
3821
3822# Execute the check given as argument, and verify the result
3823# If the Boot JDK was previously found, do nothing
3824# $1 A command line (typically autoconf macro) to execute
3825
3826
3827# Test: Is bootjdk explicitely set by command line arguments?
3828
3829
3830# Test: Is $JAVA_HOME set?
3831
3832
3833# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3834
3835
3836# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3837# $1: Argument to the java_home binary (optional)
3838
3839
3840# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3841
3842
3843# Look for a jdk in the given path. If there are multiple, try to select the newest.
3844# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3845# $1 = Path to directory containing jdk installations.
3846# $2 = String to append to the found JDK directory to get the proper JDK home
3847
3848
3849# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3850# environmental variable as base for where to look.
3851# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3852
3853
3854# Test: Is there a JDK installed in default, well-known locations?
3855
3856
3857# Check that a command-line tool in the Boot JDK is correct
3858# $1 = name of variable to assign
3859# $2 = name of binary
3860
3861
3862###############################################################################
3863#
3864# We need a Boot JDK to bootstrap the build.
3865#
3866
3867
3868
3869
3870
3871# BUILD_JDK: the location of the latest JDK that can run
3872#   on the host system and supports the target class file version
3873#   generated in this JDK build.  This variable should only be
3874#   used after the launchers are built.
3875#
3876
3877# Execute the check given as argument, and verify the result.
3878# If the JDK was previously found, do nothing.
3879# $1 A command line (typically autoconf macro) to execute
3880
3881
3882# By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3883# is different than the host system doing the build (e.g. cross-compilation),
3884# a special BUILD_JDK is built as part of the build process.  An external
3885# prebuilt BUILD_JDK can also be supplied.
3886
3887
3888#
3889# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3890# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3891#
3892# This code is free software; you can redistribute it and/or modify it
3893# under the terms of the GNU General Public License version 2 only, as
3894# published by the Free Software Foundation.  Oracle designates this
3895# particular file as subject to the "Classpath" exception as provided
3896# by Oracle in the LICENSE file that accompanied this code.
3897#
3898# This code is distributed in the hope that it will be useful, but WITHOUT
3899# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3900# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3901# version 2 for more details (a copy is included in the LICENSE file that
3902# accompanied this code).
3903#
3904# You should have received a copy of the GNU General Public License version
3905# 2 along with this work; if not, write to the Free Software Foundation,
3906# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3907#
3908# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3909# or visit www.oracle.com if you need additional information or have any
3910# questions.
3911#
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929################################################################################
3930#
3931# Runs icecc-create-env once and prints the error if it fails
3932#
3933# $1: arguments to icecc-create-env
3934# $2: log file
3935#
3936
3937
3938################################################################################
3939#
3940# Optionally enable distributed compilation of native code using icecc/icecream
3941#
3942
3943
3944
3945
3946
3947
3948
3949#
3950# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3951# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3952#
3953# This code is free software; you can redistribute it and/or modify it
3954# under the terms of the GNU General Public License version 2 only, as
3955# published by the Free Software Foundation.  Oracle designates this
3956# particular file as subject to the "Classpath" exception as provided
3957# by Oracle in the LICENSE file that accompanied this code.
3958#
3959# This code is distributed in the hope that it will be useful, but WITHOUT
3960# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3961# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3962# version 2 for more details (a copy is included in the LICENSE file that
3963# accompanied this code).
3964#
3965# You should have received a copy of the GNU General Public License version
3966# 2 along with this work; if not, write to the Free Software Foundation,
3967# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3968#
3969# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3970# or visit www.oracle.com if you need additional information or have any
3971# questions.
3972#
3973
3974# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
3975# corresponding configure arguments instead
3976
3977
3978# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
3979# that configure can use them while detecting compilers.
3980# TOOLCHAIN_TYPE is available here.
3981# Param 1 - Optional prefix to all variables. (e.g BUILD_)
3982
3983
3984
3985
3986
3987
3988# Documentation on common flags used for solstudio in HIGHEST.
3989#
3990# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3991#          done with care, there are some assumptions below that need to
3992#          be understood about the use of pointers, and IEEE behavior.
3993#
3994# -fns: Use non-standard floating point mode (not IEEE 754)
3995# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3996# -fsingle: Use single precision floating point with 'float'
3997# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3998#   (Source with excessing pointer casting and data access with mixed
3999#    pointer types are not recommended)
4000# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4001#   (If you expect perfect errno behavior, do not use this)
4002# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4003# -xrestrict: Pointer parameters to functions do not overlap
4004#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4005#    If you pass in multiple pointers to the same data, do not use this)
4006# -xlibmil: Inline some library routines
4007#   (If you expect perfect errno behavior, do not use this)
4008# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4009#   (If you expect perfect errno behavior, do not use this)
4010#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4011
4012    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4013    # Bug?
4014    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4015    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4016    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4017    #fi
4018
4019
4020
4021
4022
4023
4024################################################################################
4025# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4026#      conditionals against.
4027# $2 - Optional prefix for each variable defined.
4028
4029
4030# FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4031#                                  IF_FALSE: [RUN-IF-FALSE])
4032# ------------------------------------------------------------
4033# Check that the C compiler supports an argument
4034
4035
4036
4037
4038# FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4039#                                    IF_FALSE: [RUN-IF-FALSE])
4040# ------------------------------------------------------------
4041# Check that the C++ compiler supports an argument
4042
4043
4044
4045
4046# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4047#                                IF_FALSE: [RUN-IF-FALSE])
4048# ------------------------------------------------------------
4049# Check that the C and C++ compilers support an argument
4050
4051
4052
4053
4054# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4055#                                   IF_FALSE: [RUN-IF-FALSE])
4056# ------------------------------------------------------------
4057# Check that the linker support an argument
4058
4059
4060
4061
4062
4063
4064
4065
4066#
4067# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4068# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4069#
4070# This code is free software; you can redistribute it and/or modify it
4071# under the terms of the GNU General Public License version 2 only, as
4072# published by the Free Software Foundation.  Oracle designates this
4073# particular file as subject to the "Classpath" exception as provided
4074# by Oracle in the LICENSE file that accompanied this code.
4075#
4076# This code is distributed in the hope that it will be useful, but WITHOUT
4077# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4078# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4079# version 2 for more details (a copy is included in the LICENSE file that
4080# accompanied this code).
4081#
4082# You should have received a copy of the GNU General Public License version
4083# 2 along with this work; if not, write to the Free Software Foundation,
4084# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4085#
4086# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4087# or visit www.oracle.com if you need additional information or have any
4088# questions.
4089#
4090
4091
4092
4093
4094
4095cygwin_help() {
4096  case $1 in
4097    unzip)
4098      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4099      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4100      ;;
4101    zip)
4102      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4103      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4104      ;;
4105    make)
4106      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4107      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4108      ;;
4109    freetype)
4110      HELP_MSG="
4111The freetype library can now be build during the configure process.
4112Download the freetype sources and unpack them into an arbitrary directory:
4113
4114wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4115tar -xzf freetype-2.5.3.tar.gz
4116
4117Then run configure with '--with-freetype-src=<freetype_src>'. This will
4118automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4119builds or into '<freetype_src>/lib32' for 32-bit builds.
4120Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4121and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4122
4123Alternatively you can unpack the sources like this to use the default directory:
4124
4125tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4126      ;;
4127  esac
4128}
4129
4130msys_help() {
4131  PKGHANDLER_COMMAND=""
4132}
4133
4134apt_help() {
4135  case $1 in
4136    reduced)
4137      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4138    devkit)
4139      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4140    openjdk)
4141      PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4142    alsa)
4143      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4144    cups)
4145      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4146    freetype)
4147      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4148    ffi)
4149      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4150    x11)
4151      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4152    ccache)
4153      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4154    dtrace)
4155      PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4156  esac
4157}
4158
4159yum_help() {
4160  case $1 in
4161    devkit)
4162      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4163    openjdk)
4164      PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4165    alsa)
4166      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4167    cups)
4168      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4169    freetype)
4170      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4171    x11)
4172      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4173    ccache)
4174      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4175  esac
4176}
4177
4178port_help() {
4179  PKGHANDLER_COMMAND=""
4180}
4181
4182pkgutil_help() {
4183  PKGHANDLER_COMMAND=""
4184}
4185
4186pkgadd_help() {
4187  PKGHANDLER_COMMAND=""
4188}
4189
4190# This function will check if we're called from the "configure" wrapper while
4191# printing --help. If so, we will print out additional information that can
4192# only be extracted within the autoconf script, and then exit. This must be
4193# called at the very beginning in configure.ac.
4194
4195
4196
4197
4198
4199
4200#
4201# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4202# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4203#
4204# This code is free software; you can redistribute it and/or modify it
4205# under the terms of the GNU General Public License version 2 only, as
4206# published by the Free Software Foundation.  Oracle designates this
4207# particular file as subject to the "Classpath" exception as provided
4208# by Oracle in the LICENSE file that accompanied this code.
4209#
4210# This code is distributed in the hope that it will be useful, but WITHOUT
4211# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4212# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4213# version 2 for more details (a copy is included in the LICENSE file that
4214# accompanied this code).
4215#
4216# You should have received a copy of the GNU General Public License version
4217# 2 along with this work; if not, write to the Free Software Foundation,
4218# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4219#
4220# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4221# or visit www.oracle.com if you need additional information or have any
4222# questions.
4223#
4224
4225# All valid JVM features, regardless of platform
4226VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4227    fprof vm-structs jni-check services management all-gcs nmt cds static-build"
4228
4229# All valid JVM variants
4230VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4231
4232###############################################################################
4233# Check if the specified JVM variant should be built. To be used in shell if
4234# constructs, like this:
4235# if HOTSPOT_CHECK_JVM_VARIANT(server); then
4236#
4237# Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4238
4239# Definition kept in one line to allow inlining in if statements.
4240# Additional [] needed to keep m4 from mangling shell constructs.
4241
4242
4243###############################################################################
4244# Check if the specified JVM features are explicitly enabled. To be used in
4245# shell if constructs, like this:
4246# if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4247#
4248# Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4249
4250# Definition kept in one line to allow inlining in if statements.
4251# Additional [] needed to keep m4 from mangling shell constructs.
4252
4253
4254###############################################################################
4255# Check which variants of the JVM that we want to build. Available variants are:
4256#   server: normal interpreter, and a tiered C1/C2 compiler
4257#   client: normal interpreter, and C1 (no C2 compiler)
4258#   minimal: reduced form of client with optional features stripped out
4259#   core: normal interpreter only, no compiler
4260#   zero: C++ based interpreter only, no compiler
4261#   zeroshark: C++ based interpreter, and a llvm-based compiler
4262#   custom: baseline JVM with no default features
4263#
4264
4265
4266###############################################################################
4267# Check if dtrace should be enabled and has all prerequisites present.
4268#
4269
4270
4271###############################################################################
4272# Set up all JVM features for each JVM variant.
4273#
4274
4275
4276###############################################################################
4277# Validate JVM features once all setup is complete, including custom setup.
4278#
4279
4280
4281#
4282# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4283# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4284#
4285# This code is free software; you can redistribute it and/or modify it
4286# under the terms of the GNU General Public License version 2 only, as
4287# published by the Free Software Foundation.  Oracle designates this
4288# particular file as subject to the "Classpath" exception as provided
4289# by Oracle in the LICENSE file that accompanied this code.
4290#
4291# This code is distributed in the hope that it will be useful, but WITHOUT
4292# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4293# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4294# version 2 for more details (a copy is included in the LICENSE file that
4295# accompanied this code).
4296#
4297# You should have received a copy of the GNU General Public License version
4298# 2 along with this work; if not, write to the Free Software Foundation,
4299# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4300#
4301# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4302# or visit www.oracle.com if you need additional information or have any
4303# questions.
4304#
4305
4306###############################################################################
4307# Check which variant of the JDK that we want to build.
4308# Currently we have:
4309#    normal:   standard edition
4310# but the custom make system may add other variants
4311#
4312# Effectively the JDK variant gives a name to a specific set of
4313# modules to compile into the JDK.
4314
4315
4316###############################################################################
4317# Set the debug level
4318#    release: no debug information, all optimizations, no asserts.
4319#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4320#    fastdebug: debug information (-g), all optimizations, all asserts
4321#    slowdebug: debug information (-g), no optimizations, all asserts
4322
4323
4324###############################################################################
4325#
4326# Should we build only OpenJDK even if closed sources are present?
4327#
4328
4329
4330
4331
4332###############################################################################
4333#
4334# Enable or disable the elliptic curve crypto implementation
4335#
4336
4337
4338
4339
4340################################################################################
4341#
4342# Gcov coverage data for hotspot
4343#
4344
4345
4346################################################################################
4347#
4348# Static build support.  When enabled will generate static
4349# libraries instead of shared libraries for all JDK libs.
4350#
4351
4352
4353################################################################################
4354#
4355# jlink options.
4356# We always keep packaged modules in JDK image.
4357#
4358
4359
4360################################################################################
4361#
4362# Check if building of the jtreg failure handler should be enabled.
4363#
4364
4365
4366#
4367# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4368# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4369#
4370# This code is free software; you can redistribute it and/or modify it
4371# under the terms of the GNU General Public License version 2 only, as
4372# published by the Free Software Foundation.  Oracle designates this
4373# particular file as subject to the "Classpath" exception as provided
4374# by Oracle in the LICENSE file that accompanied this code.
4375#
4376# This code is distributed in the hope that it will be useful, but WITHOUT
4377# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4378# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4379# version 2 for more details (a copy is included in the LICENSE file that
4380# accompanied this code).
4381#
4382# You should have received a copy of the GNU General Public License version
4383# 2 along with this work; if not, write to the Free Software Foundation,
4384# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4385#
4386# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4387# or visit www.oracle.com if you need additional information or have any
4388# questions.
4389#
4390
4391###############################################################################
4392#
4393# Setup version numbers
4394#
4395
4396# Verify that a given string represents a valid version number, and assign it
4397# to a variable.
4398
4399# Argument 1: the variable to assign to
4400# Argument 2: the value given by the user
4401
4402
4403
4404
4405#
4406# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4407# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4408#
4409# This code is free software; you can redistribute it and/or modify it
4410# under the terms of the GNU General Public License version 2 only, as
4411# published by the Free Software Foundation.  Oracle designates this
4412# particular file as subject to the "Classpath" exception as provided
4413# by Oracle in the LICENSE file that accompanied this code.
4414#
4415# This code is distributed in the hope that it will be useful, but WITHOUT
4416# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4417# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4418# version 2 for more details (a copy is included in the LICENSE file that
4419# accompanied this code).
4420#
4421# You should have received a copy of the GNU General Public License version
4422# 2 along with this work; if not, write to the Free Software Foundation,
4423# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4424#
4425# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4426# or visit www.oracle.com if you need additional information or have any
4427# questions.
4428#
4429
4430# Major library component reside in separate files.
4431#
4432# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4433# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4434#
4435# This code is free software; you can redistribute it and/or modify it
4436# under the terms of the GNU General Public License version 2 only, as
4437# published by the Free Software Foundation.  Oracle designates this
4438# particular file as subject to the "Classpath" exception as provided
4439# by Oracle in the LICENSE file that accompanied this code.
4440#
4441# This code is distributed in the hope that it will be useful, but WITHOUT
4442# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4443# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4444# version 2 for more details (a copy is included in the LICENSE file that
4445# accompanied this code).
4446#
4447# You should have received a copy of the GNU General Public License version
4448# 2 along with this work; if not, write to the Free Software Foundation,
4449# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4450#
4451# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4452# or visit www.oracle.com if you need additional information or have any
4453# questions.
4454#
4455
4456################################################################################
4457# Setup alsa (Advanced Linux Sound Architecture)
4458################################################################################
4459
4460
4461#
4462# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4463# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4464#
4465# This code is free software; you can redistribute it and/or modify it
4466# under the terms of the GNU General Public License version 2 only, as
4467# published by the Free Software Foundation.  Oracle designates this
4468# particular file as subject to the "Classpath" exception as provided
4469# by Oracle in the LICENSE file that accompanied this code.
4470#
4471# This code is distributed in the hope that it will be useful, but WITHOUT
4472# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4473# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4474# version 2 for more details (a copy is included in the LICENSE file that
4475# accompanied this code).
4476#
4477# You should have received a copy of the GNU General Public License version
4478# 2 along with this work; if not, write to the Free Software Foundation,
4479# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4480#
4481# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4482# or visit www.oracle.com if you need additional information or have any
4483# questions.
4484#
4485
4486################################################################################
4487# Setup bundled libraries.
4488#
4489# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4490# OpenJDK repository. Default is to use these libraries as bundled, but they
4491# might be replaced by en external version by the user.
4492################################################################################
4493
4494
4495################################################################################
4496# Setup libjpeg
4497################################################################################
4498
4499
4500################################################################################
4501# Setup giflib
4502################################################################################
4503
4504
4505################################################################################
4506# Setup libpng
4507################################################################################
4508
4509
4510################################################################################
4511# Setup zlib
4512################################################################################
4513
4514
4515################################################################################
4516# Setup lcms (Little CMS)
4517################################################################################
4518
4519
4520#
4521# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4522# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4523#
4524# This code is free software; you can redistribute it and/or modify it
4525# under the terms of the GNU General Public License version 2 only, as
4526# published by the Free Software Foundation.  Oracle designates this
4527# particular file as subject to the "Classpath" exception as provided
4528# by Oracle in the LICENSE file that accompanied this code.
4529#
4530# This code is distributed in the hope that it will be useful, but WITHOUT
4531# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4532# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4533# version 2 for more details (a copy is included in the LICENSE file that
4534# accompanied this code).
4535#
4536# You should have received a copy of the GNU General Public License version
4537# 2 along with this work; if not, write to the Free Software Foundation,
4538# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4539#
4540# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4541# or visit www.oracle.com if you need additional information or have any
4542# questions.
4543#
4544
4545################################################################################
4546# Setup cups (Common Unix Printing System)
4547################################################################################
4548
4549
4550#
4551# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4552# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4553#
4554# This code is free software; you can redistribute it and/or modify it
4555# under the terms of the GNU General Public License version 2 only, as
4556# published by the Free Software Foundation.  Oracle designates this
4557# particular file as subject to the "Classpath" exception as provided
4558# by Oracle in the LICENSE file that accompanied this code.
4559#
4560# This code is distributed in the hope that it will be useful, but WITHOUT
4561# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4562# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4563# version 2 for more details (a copy is included in the LICENSE file that
4564# accompanied this code).
4565#
4566# You should have received a copy of the GNU General Public License version
4567# 2 along with this work; if not, write to the Free Software Foundation,
4568# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4569#
4570# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4571# or visit www.oracle.com if you need additional information or have any
4572# questions.
4573#
4574
4575################################################################################
4576# Setup libffi (Foreign Function Interface)
4577################################################################################
4578
4579
4580#
4581# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4582# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4583#
4584# This code is free software; you can redistribute it and/or modify it
4585# under the terms of the GNU General Public License version 2 only, as
4586# published by the Free Software Foundation.  Oracle designates this
4587# particular file as subject to the "Classpath" exception as provided
4588# by Oracle in the LICENSE file that accompanied this code.
4589#
4590# This code is distributed in the hope that it will be useful, but WITHOUT
4591# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4592# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4593# version 2 for more details (a copy is included in the LICENSE file that
4594# accompanied this code).
4595#
4596# You should have received a copy of the GNU General Public License version
4597# 2 along with this work; if not, write to the Free Software Foundation,
4598# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4599#
4600# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4601# or visit www.oracle.com if you need additional information or have any
4602# questions.
4603#
4604
4605################################################################################
4606# Build the freetype lib from source
4607################################################################################
4608
4609
4610################################################################################
4611# Check if a potential freeype library match is correct and usable
4612################################################################################
4613
4614
4615################################################################################
4616# Setup freetype (The FreeType2 font rendering library)
4617################################################################################
4618
4619
4620#
4621# Copyright (c) 2011, 2016, 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# Setup the standard C/C++ runtime libraries.
4647#
4648# Most importantly, determine if stdc++ should be linked statically or
4649# dynamically.
4650################################################################################
4651
4652
4653#
4654# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4655# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4656#
4657# This code is free software; you can redistribute it and/or modify it
4658# under the terms of the GNU General Public License version 2 only, as
4659# published by the Free Software Foundation.  Oracle designates this
4660# particular file as subject to the "Classpath" exception as provided
4661# by Oracle in the LICENSE file that accompanied this code.
4662#
4663# This code is distributed in the hope that it will be useful, but WITHOUT
4664# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4665# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4666# version 2 for more details (a copy is included in the LICENSE file that
4667# accompanied this code).
4668#
4669# You should have received a copy of the GNU General Public License version
4670# 2 along with this work; if not, write to the Free Software Foundation,
4671# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4672#
4673# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4674# or visit www.oracle.com if you need additional information or have any
4675# questions.
4676#
4677
4678################################################################################
4679# Setup X11 Windows system
4680################################################################################
4681
4682
4683
4684################################################################################
4685# Determine which libraries are needed for this configuration
4686################################################################################
4687
4688
4689################################################################################
4690# Parse library options, and setup needed libraries
4691################################################################################
4692
4693
4694################################################################################
4695# Setup llvm (Low-Level VM)
4696################################################################################
4697
4698
4699################################################################################
4700# Setup various libraries, typically small system libraries
4701################################################################################
4702
4703
4704#
4705# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4706# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4707#
4708# This code is free software; you can redistribute it and/or modify it
4709# under the terms of the GNU General Public License version 2 only, as
4710# published by the Free Software Foundation.  Oracle designates this
4711# particular file as subject to the "Classpath" exception as provided
4712# by Oracle in the LICENSE file that accompanied this code.
4713#
4714# This code is distributed in the hope that it will be useful, but WITHOUT
4715# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4716# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4717# version 2 for more details (a copy is included in the LICENSE file that
4718# accompanied this code).
4719#
4720# You should have received a copy of the GNU General Public License version
4721# 2 along with this work; if not, write to the Free Software Foundation,
4722# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4723#
4724# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4725# or visit www.oracle.com if you need additional information or have any
4726# questions.
4727#
4728
4729# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4730# Converts autoconf style CPU name to OpenJDK style, into
4731# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4732
4733
4734# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4735# Converts autoconf style OS name to OpenJDK style, into
4736# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4737
4738
4739# Expects $host_os $host_cpu $build_os and $build_cpu
4740# and $with_target_bits to have been setup!
4741#
4742# Translate the standard triplet(quadruplet) definition
4743# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4744# OPENJDK_BUILD_OS, etc.
4745
4746
4747# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4748# accordingly. Must be done after setting up build and target system, but before
4749# doing anything else with these values.
4750
4751
4752# Setup the legacy variables, for controlling the old makefiles.
4753#
4754
4755
4756# $1 - Either TARGET or BUILD to setup the variables for.
4757
4758
4759
4760
4761#%%% Build and target systems %%%
4762
4763
4764
4765
4766# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4767# Add -mX to various FLAGS variables.
4768
4769
4770
4771
4772
4773
4774#
4775# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4776# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4777#
4778# This code is free software; you can redistribute it and/or modify it
4779# under the terms of the GNU General Public License version 2 only, as
4780# published by the Free Software Foundation.  Oracle designates this
4781# particular file as subject to the "Classpath" exception as provided
4782# by Oracle in the LICENSE file that accompanied this code.
4783#
4784# This code is distributed in the hope that it will be useful, but WITHOUT
4785# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4786# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4787# version 2 for more details (a copy is included in the LICENSE file that
4788# accompanied this code).
4789#
4790# You should have received a copy of the GNU General Public License version
4791# 2 along with this work; if not, write to the Free Software Foundation,
4792# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4793#
4794# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4795# or visit www.oracle.com if you need additional information or have any
4796# questions.
4797#
4798
4799
4800
4801
4802
4803
4804
4805################################################################################
4806# Define a mechanism for importing extra prebuilt modules
4807#
4808
4809
4810
4811#
4812# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4813# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4814#
4815# This code is free software; you can redistribute it and/or modify it
4816# under the terms of the GNU General Public License version 2 only, as
4817# published by the Free Software Foundation.  Oracle designates this
4818# particular file as subject to the "Classpath" exception as provided
4819# by Oracle in the LICENSE file that accompanied this code.
4820#
4821# This code is distributed in the hope that it will be useful, but WITHOUT
4822# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4823# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4824# version 2 for more details (a copy is included in the LICENSE file that
4825# accompanied this code).
4826#
4827# You should have received a copy of the GNU General Public License version
4828# 2 along with this work; if not, write to the Free Software Foundation,
4829# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4830#
4831# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4832# or visit www.oracle.com if you need additional information or have any
4833# questions.
4834#
4835
4836########################################################################
4837# This file is responsible for detecting, verifying and setting up the
4838# toolchain, i.e. the compiler, linker and related utilities. It will setup
4839# proper paths to the binaries, but it will not setup any flags.
4840#
4841# The binaries used is determined by the toolchain type, which is the family of
4842# compilers and related tools that are used.
4843########################################################################
4844
4845
4846# All valid toolchains, regardless of platform (used by help.m4)
4847VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4848
4849# These toolchains are valid on different platforms
4850VALID_TOOLCHAINS_linux="gcc clang"
4851VALID_TOOLCHAINS_solaris="solstudio"
4852VALID_TOOLCHAINS_macosx="gcc clang"
4853VALID_TOOLCHAINS_aix="xlc"
4854VALID_TOOLCHAINS_windows="microsoft"
4855
4856# Toolchain descriptions
4857TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4858TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4859TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4860TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4861TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4862
4863# Minimum supported versions, empty means unspecified
4864TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
4865TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
4866TOOLCHAIN_MINIMUM_VERSION_microsoft=""
4867TOOLCHAIN_MINIMUM_VERSION_solstudio="5.12"
4868TOOLCHAIN_MINIMUM_VERSION_xlc=""
4869
4870# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
4871# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
4872
4873
4874# Check if the configured compiler (C and C++) is of a specific version or
4875# newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
4876#
4877# Arguments:
4878#   VERSION:   The version string to check against the found version
4879#   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
4880#   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
4881
4882
4883
4884
4885# Setup a number of variables describing how native output files are
4886# named on this platform/toolchain.
4887
4888
4889# Determine which toolchain type to use, and make sure it is valid for this
4890# platform. Setup various information about the selected toolchain.
4891
4892
4893# Before we start detecting the toolchain executables, we might need some
4894# special setup, e.g. additional paths etc.
4895
4896
4897# Restore path, etc
4898
4899
4900# Check if a compiler is of the toolchain type we expect, and save the version
4901# information from it. If the compiler does not match the expected type,
4902# this function will abort using AC_MSG_ERROR. If it matches, the version will
4903# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4904# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4905#
4906# $1 = compiler to test (CC or CXX)
4907# $2 = human readable name of compiler (C or C++)
4908
4909
4910# Try to locate the given C or C++ compiler in the path, or otherwise.
4911#
4912# $1 = compiler to test (CC or CXX)
4913# $2 = human readable name of compiler (C or C++)
4914# $3 = list of compiler names to search for
4915
4916
4917# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4918# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4919# archiver (AR). Verify that the compilers are correct according to the
4920# toolchain type.
4921
4922
4923# Setup additional tools that is considered a part of the toolchain, but not the
4924# core part. Many of these are highly platform-specific and do not exist,
4925# and/or are not needed on all platforms.
4926
4927
4928# Setup the build tools (i.e, the compiler and linker used to build programs
4929# that should be run on the build platform, not the target platform, as a build
4930# helper). Since the non-cross-compile case uses the normal, target compilers
4931# for this, we can only do this after these have been setup.
4932
4933
4934# Setup legacy variables that are still needed as alternative ways to refer to
4935# parts of the toolchain.
4936
4937
4938# Do some additional checks on the detected tools.
4939
4940
4941# Setup the JTReg Regression Test Harness.
4942
4943
4944#
4945# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4946# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4947#
4948# This code is free software; you can redistribute it and/or modify it
4949# under the terms of the GNU General Public License version 2 only, as
4950# published by the Free Software Foundation.  Oracle designates this
4951# particular file as subject to the "Classpath" exception as provided
4952# by Oracle in the LICENSE file that accompanied this code.
4953#
4954# This code is distributed in the hope that it will be useful, but WITHOUT
4955# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4956# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4957# version 2 for more details (a copy is included in the LICENSE file that
4958# accompanied this code).
4959#
4960# You should have received a copy of the GNU General Public License version
4961# 2 along with this work; if not, write to the Free Software Foundation,
4962# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4963#
4964# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4965# or visit www.oracle.com if you need additional information or have any
4966# questions.
4967#
4968
4969################################################################################
4970# The order of these defines the priority by which we try to find them.
4971VALID_VS_VERSIONS="2013 2012 2010"
4972
4973VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4974VS_VERSION_INTERNAL_2010=100
4975VS_MSVCR_2010=msvcr100.dll
4976# We don't use msvcp on Visual Studio 2010
4977#VS_MSVCP_2010=msvcp100.dll
4978VS_ENVVAR_2010="VS100COMNTOOLS"
4979VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4980VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4981VS_VS_PLATFORM_NAME_2010="v100"
4982VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4983
4984VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4985VS_VERSION_INTERNAL_2012=110
4986VS_MSVCR_2012=msvcr110.dll
4987VS_MSVCP_2012=msvcp110.dll
4988VS_ENVVAR_2012="VS110COMNTOOLS"
4989VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
4990VS_SDK_INSTALLDIR_2012=
4991VS_VS_PLATFORM_NAME_2012="v110"
4992VS_SDK_PLATFORM_NAME_2012=
4993
4994VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
4995VS_VERSION_INTERNAL_2013=120
4996VS_MSVCR_2013=msvcr120.dll
4997VS_MSVCP_2013=msvcp120.dll
4998VS_ENVVAR_2013="VS120COMNTOOLS"
4999VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5000VS_SDK_INSTALLDIR_2013=
5001VS_VS_PLATFORM_NAME_2013="v120"
5002VS_SDK_PLATFORM_NAME_2013=
5003
5004################################################################################
5005
5006
5007
5008################################################################################
5009
5010
5011
5012################################################################################
5013# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5014# build environment and assigns it to VS_ENV_CMD
5015
5016
5017################################################################################
5018
5019
5020
5021################################################################################
5022# Check if the VS env variables were setup prior to running configure.
5023# If not, then find vcvarsall.bat and run it automatically, and integrate
5024# the set env variables into the spec file.
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039# This line needs to be here, verbatim, after all includes and the dummy hook
5040# definitions. It is replaced with custom functionality when building
5041# custom sources.
5042#CUSTOM_AUTOCONF_INCLUDE
5043
5044# Do not change or remove the following line, it is needed for consistency checks:
5045DATE_WHEN_GENERATED=1461670455
5046
5047###############################################################################
5048#
5049# Initialization / Boot-strapping
5050#
5051# The bootstrapping process needs to solve the "chicken or the egg" problem,
5052# thus it jumps back and forth, each time gaining something needed later on.
5053#
5054###############################################################################
5055
5056# If we are requested to print additional help, do that and then exit.
5057# This must be the very first call.
5058
5059  if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5060
5061    # Print available toolchains
5062    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5063    $PRINTF "Which are valid to use depends on the build platform.\n"
5064    for toolchain in $VALID_TOOLCHAINS_all; do
5065      # Use indirect variable referencing
5066      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5067      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5068      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5069    done
5070    $PRINTF "\n"
5071
5072    # Print available jvm features
5073    $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5074    $PRINTF "Which are valid to use depends on the target platform.\n  "
5075    $PRINTF "%s " $VALID_JVM_FEATURES
5076    $PRINTF "\n"
5077
5078    # And now exit directly
5079    exit 0
5080  fi
5081
5082
5083# Basic initialization that must happen first of all in the normal process.
5084
5085  # Save the original command line. This is passed to us by the wrapper configure script.
5086
5087  # Save the path variable before it gets changed
5088  ORIGINAL_PATH="$PATH"
5089
5090  DATE_WHEN_CONFIGURED=`LANG=C date`
5091
5092  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5093$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5094  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5095$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5096
5097
5098  # Start with tools that do not need have cross compilation support
5099  # and can be expected to be found in the default PATH. These tools are
5100  # used by configure.
5101
5102  # First are all the simple required tools.
5103
5104
5105
5106  # Publish this variable in the help.
5107
5108
5109  if [ -z "${BASENAME+x}" ]; then
5110    # The variable is not set by user, try to locate tool using the code snippet
5111    for ac_prog in basename
5112do
5113  # Extract the first word of "$ac_prog", so it can be a program name with args.
5114set dummy $ac_prog; ac_word=$2
5115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5116$as_echo_n "checking for $ac_word... " >&6; }
5117if ${ac_cv_path_BASENAME+:} false; then :
5118  $as_echo_n "(cached) " >&6
5119else
5120  case $BASENAME in
5121  [\\/]* | ?:[\\/]*)
5122  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5123  ;;
5124  *)
5125  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5126for as_dir in $PATH
5127do
5128  IFS=$as_save_IFS
5129  test -z "$as_dir" && as_dir=.
5130    for ac_exec_ext in '' $ac_executable_extensions; do
5131  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5132    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5133    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5134    break 2
5135  fi
5136done
5137  done
5138IFS=$as_save_IFS
5139
5140  ;;
5141esac
5142fi
5143BASENAME=$ac_cv_path_BASENAME
5144if test -n "$BASENAME"; then
5145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5146$as_echo "$BASENAME" >&6; }
5147else
5148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5149$as_echo "no" >&6; }
5150fi
5151
5152
5153  test -n "$BASENAME" && break
5154done
5155
5156  else
5157    # The variable is set, but is it from the command line or the environment?
5158
5159    # Try to remove the string !BASENAME! from our list.
5160    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5161    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5162      # If it failed, the variable was not from the command line. Ignore it,
5163      # but warn the user (except for BASH, which is always set by the calling BASH).
5164      if test "xBASENAME" != xBASH; then
5165        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5166$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5167      fi
5168      # Try to locate tool using the code snippet
5169      for ac_prog in basename
5170do
5171  # Extract the first word of "$ac_prog", so it can be a program name with args.
5172set dummy $ac_prog; ac_word=$2
5173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5174$as_echo_n "checking for $ac_word... " >&6; }
5175if ${ac_cv_path_BASENAME+:} false; then :
5176  $as_echo_n "(cached) " >&6
5177else
5178  case $BASENAME in
5179  [\\/]* | ?:[\\/]*)
5180  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5181  ;;
5182  *)
5183  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5184for as_dir in $PATH
5185do
5186  IFS=$as_save_IFS
5187  test -z "$as_dir" && as_dir=.
5188    for ac_exec_ext in '' $ac_executable_extensions; do
5189  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5190    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5191    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5192    break 2
5193  fi
5194done
5195  done
5196IFS=$as_save_IFS
5197
5198  ;;
5199esac
5200fi
5201BASENAME=$ac_cv_path_BASENAME
5202if test -n "$BASENAME"; then
5203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5204$as_echo "$BASENAME" >&6; }
5205else
5206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5207$as_echo "no" >&6; }
5208fi
5209
5210
5211  test -n "$BASENAME" && break
5212done
5213
5214    else
5215      # If it succeeded, then it was overridden by the user. We will use it
5216      # for the tool.
5217
5218      # First remove it from the list of overridden variables, so we can test
5219      # for unknown variables in the end.
5220      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5221
5222      # Check if we try to supply an empty value
5223      if test "x$BASENAME" = x; then
5224        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5225$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5226        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5227$as_echo_n "checking for BASENAME... " >&6; }
5228        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5229$as_echo "disabled" >&6; }
5230      else
5231        # Check if the provided tool contains a complete path.
5232        tool_specified="$BASENAME"
5233        tool_basename="${tool_specified##*/}"
5234        if test "x$tool_basename" = "x$tool_specified"; then
5235          # A command without a complete path is provided, search $PATH.
5236          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5237$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5238          # Extract the first word of "$tool_basename", so it can be a program name with args.
5239set dummy $tool_basename; ac_word=$2
5240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5241$as_echo_n "checking for $ac_word... " >&6; }
5242if ${ac_cv_path_BASENAME+:} false; then :
5243  $as_echo_n "(cached) " >&6
5244else
5245  case $BASENAME in
5246  [\\/]* | ?:[\\/]*)
5247  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5248  ;;
5249  *)
5250  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5251for as_dir in $PATH
5252do
5253  IFS=$as_save_IFS
5254  test -z "$as_dir" && as_dir=.
5255    for ac_exec_ext in '' $ac_executable_extensions; do
5256  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5257    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5258    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5259    break 2
5260  fi
5261done
5262  done
5263IFS=$as_save_IFS
5264
5265  ;;
5266esac
5267fi
5268BASENAME=$ac_cv_path_BASENAME
5269if test -n "$BASENAME"; then
5270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5271$as_echo "$BASENAME" >&6; }
5272else
5273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5274$as_echo "no" >&6; }
5275fi
5276
5277
5278          if test "x$BASENAME" = x; then
5279            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5280          fi
5281        else
5282          # Otherwise we believe it is a complete path. Use it as it is.
5283          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5284$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5285          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5286$as_echo_n "checking for BASENAME... " >&6; }
5287          if test ! -x "$tool_specified"; then
5288            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5289$as_echo "not found" >&6; }
5290            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5291          fi
5292          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5293$as_echo "$tool_specified" >&6; }
5294        fi
5295      fi
5296    fi
5297
5298  fi
5299
5300
5301
5302  if test "x$BASENAME" = x; then
5303    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5304  fi
5305
5306
5307
5308
5309
5310  # Publish this variable in the help.
5311
5312
5313  if [ -z "${BASH+x}" ]; then
5314    # The variable is not set by user, try to locate tool using the code snippet
5315    for ac_prog in bash
5316do
5317  # Extract the first word of "$ac_prog", so it can be a program name with args.
5318set dummy $ac_prog; ac_word=$2
5319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5320$as_echo_n "checking for $ac_word... " >&6; }
5321if ${ac_cv_path_BASH+:} false; then :
5322  $as_echo_n "(cached) " >&6
5323else
5324  case $BASH in
5325  [\\/]* | ?:[\\/]*)
5326  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5327  ;;
5328  *)
5329  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5330for as_dir in $PATH
5331do
5332  IFS=$as_save_IFS
5333  test -z "$as_dir" && as_dir=.
5334    for ac_exec_ext in '' $ac_executable_extensions; do
5335  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5336    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5337    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5338    break 2
5339  fi
5340done
5341  done
5342IFS=$as_save_IFS
5343
5344  ;;
5345esac
5346fi
5347BASH=$ac_cv_path_BASH
5348if test -n "$BASH"; then
5349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5350$as_echo "$BASH" >&6; }
5351else
5352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5353$as_echo "no" >&6; }
5354fi
5355
5356
5357  test -n "$BASH" && break
5358done
5359
5360  else
5361    # The variable is set, but is it from the command line or the environment?
5362
5363    # Try to remove the string !BASH! from our list.
5364    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5365    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5366      # If it failed, the variable was not from the command line. Ignore it,
5367      # but warn the user (except for BASH, which is always set by the calling BASH).
5368      if test "xBASH" != xBASH; then
5369        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5370$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5371      fi
5372      # Try to locate tool using the code snippet
5373      for ac_prog in bash
5374do
5375  # Extract the first word of "$ac_prog", so it can be a program name with args.
5376set dummy $ac_prog; ac_word=$2
5377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5378$as_echo_n "checking for $ac_word... " >&6; }
5379if ${ac_cv_path_BASH+:} false; then :
5380  $as_echo_n "(cached) " >&6
5381else
5382  case $BASH in
5383  [\\/]* | ?:[\\/]*)
5384  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5385  ;;
5386  *)
5387  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5388for as_dir in $PATH
5389do
5390  IFS=$as_save_IFS
5391  test -z "$as_dir" && as_dir=.
5392    for ac_exec_ext in '' $ac_executable_extensions; do
5393  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5394    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5395    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5396    break 2
5397  fi
5398done
5399  done
5400IFS=$as_save_IFS
5401
5402  ;;
5403esac
5404fi
5405BASH=$ac_cv_path_BASH
5406if test -n "$BASH"; then
5407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5408$as_echo "$BASH" >&6; }
5409else
5410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5411$as_echo "no" >&6; }
5412fi
5413
5414
5415  test -n "$BASH" && break
5416done
5417
5418    else
5419      # If it succeeded, then it was overridden by the user. We will use it
5420      # for the tool.
5421
5422      # First remove it from the list of overridden variables, so we can test
5423      # for unknown variables in the end.
5424      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5425
5426      # Check if we try to supply an empty value
5427      if test "x$BASH" = x; then
5428        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5429$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5430        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5431$as_echo_n "checking for BASH... " >&6; }
5432        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5433$as_echo "disabled" >&6; }
5434      else
5435        # Check if the provided tool contains a complete path.
5436        tool_specified="$BASH"
5437        tool_basename="${tool_specified##*/}"
5438        if test "x$tool_basename" = "x$tool_specified"; then
5439          # A command without a complete path is provided, search $PATH.
5440          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5441$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5442          # Extract the first word of "$tool_basename", so it can be a program name with args.
5443set dummy $tool_basename; ac_word=$2
5444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5445$as_echo_n "checking for $ac_word... " >&6; }
5446if ${ac_cv_path_BASH+:} false; then :
5447  $as_echo_n "(cached) " >&6
5448else
5449  case $BASH in
5450  [\\/]* | ?:[\\/]*)
5451  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5452  ;;
5453  *)
5454  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5455for as_dir in $PATH
5456do
5457  IFS=$as_save_IFS
5458  test -z "$as_dir" && as_dir=.
5459    for ac_exec_ext in '' $ac_executable_extensions; do
5460  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5461    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5462    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5463    break 2
5464  fi
5465done
5466  done
5467IFS=$as_save_IFS
5468
5469  ;;
5470esac
5471fi
5472BASH=$ac_cv_path_BASH
5473if test -n "$BASH"; then
5474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5475$as_echo "$BASH" >&6; }
5476else
5477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5478$as_echo "no" >&6; }
5479fi
5480
5481
5482          if test "x$BASH" = x; then
5483            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5484          fi
5485        else
5486          # Otherwise we believe it is a complete path. Use it as it is.
5487          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5488$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5489          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5490$as_echo_n "checking for BASH... " >&6; }
5491          if test ! -x "$tool_specified"; then
5492            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5493$as_echo "not found" >&6; }
5494            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5495          fi
5496          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5497$as_echo "$tool_specified" >&6; }
5498        fi
5499      fi
5500    fi
5501
5502  fi
5503
5504
5505
5506  if test "x$BASH" = x; then
5507    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5508  fi
5509
5510
5511
5512
5513
5514  # Publish this variable in the help.
5515
5516
5517  if [ -z "${CAT+x}" ]; then
5518    # The variable is not set by user, try to locate tool using the code snippet
5519    for ac_prog in cat
5520do
5521  # Extract the first word of "$ac_prog", so it can be a program name with args.
5522set dummy $ac_prog; ac_word=$2
5523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5524$as_echo_n "checking for $ac_word... " >&6; }
5525if ${ac_cv_path_CAT+:} false; then :
5526  $as_echo_n "(cached) " >&6
5527else
5528  case $CAT in
5529  [\\/]* | ?:[\\/]*)
5530  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5531  ;;
5532  *)
5533  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5534for as_dir in $PATH
5535do
5536  IFS=$as_save_IFS
5537  test -z "$as_dir" && as_dir=.
5538    for ac_exec_ext in '' $ac_executable_extensions; do
5539  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5540    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5541    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5542    break 2
5543  fi
5544done
5545  done
5546IFS=$as_save_IFS
5547
5548  ;;
5549esac
5550fi
5551CAT=$ac_cv_path_CAT
5552if test -n "$CAT"; then
5553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5554$as_echo "$CAT" >&6; }
5555else
5556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5557$as_echo "no" >&6; }
5558fi
5559
5560
5561  test -n "$CAT" && break
5562done
5563
5564  else
5565    # The variable is set, but is it from the command line or the environment?
5566
5567    # Try to remove the string !CAT! from our list.
5568    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5569    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5570      # If it failed, the variable was not from the command line. Ignore it,
5571      # but warn the user (except for BASH, which is always set by the calling BASH).
5572      if test "xCAT" != xBASH; then
5573        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5574$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5575      fi
5576      # Try to locate tool using the code snippet
5577      for ac_prog in cat
5578do
5579  # Extract the first word of "$ac_prog", so it can be a program name with args.
5580set dummy $ac_prog; ac_word=$2
5581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5582$as_echo_n "checking for $ac_word... " >&6; }
5583if ${ac_cv_path_CAT+:} false; then :
5584  $as_echo_n "(cached) " >&6
5585else
5586  case $CAT in
5587  [\\/]* | ?:[\\/]*)
5588  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5589  ;;
5590  *)
5591  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5592for as_dir in $PATH
5593do
5594  IFS=$as_save_IFS
5595  test -z "$as_dir" && as_dir=.
5596    for ac_exec_ext in '' $ac_executable_extensions; do
5597  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5598    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5599    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5600    break 2
5601  fi
5602done
5603  done
5604IFS=$as_save_IFS
5605
5606  ;;
5607esac
5608fi
5609CAT=$ac_cv_path_CAT
5610if test -n "$CAT"; then
5611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5612$as_echo "$CAT" >&6; }
5613else
5614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5615$as_echo "no" >&6; }
5616fi
5617
5618
5619  test -n "$CAT" && break
5620done
5621
5622    else
5623      # If it succeeded, then it was overridden by the user. We will use it
5624      # for the tool.
5625
5626      # First remove it from the list of overridden variables, so we can test
5627      # for unknown variables in the end.
5628      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5629
5630      # Check if we try to supply an empty value
5631      if test "x$CAT" = x; then
5632        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5633$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5634        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5635$as_echo_n "checking for CAT... " >&6; }
5636        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5637$as_echo "disabled" >&6; }
5638      else
5639        # Check if the provided tool contains a complete path.
5640        tool_specified="$CAT"
5641        tool_basename="${tool_specified##*/}"
5642        if test "x$tool_basename" = "x$tool_specified"; then
5643          # A command without a complete path is provided, search $PATH.
5644          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5645$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5646          # Extract the first word of "$tool_basename", so it can be a program name with args.
5647set dummy $tool_basename; ac_word=$2
5648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5649$as_echo_n "checking for $ac_word... " >&6; }
5650if ${ac_cv_path_CAT+:} false; then :
5651  $as_echo_n "(cached) " >&6
5652else
5653  case $CAT in
5654  [\\/]* | ?:[\\/]*)
5655  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5656  ;;
5657  *)
5658  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5659for as_dir in $PATH
5660do
5661  IFS=$as_save_IFS
5662  test -z "$as_dir" && as_dir=.
5663    for ac_exec_ext in '' $ac_executable_extensions; do
5664  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5665    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5666    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5667    break 2
5668  fi
5669done
5670  done
5671IFS=$as_save_IFS
5672
5673  ;;
5674esac
5675fi
5676CAT=$ac_cv_path_CAT
5677if test -n "$CAT"; then
5678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5679$as_echo "$CAT" >&6; }
5680else
5681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5682$as_echo "no" >&6; }
5683fi
5684
5685
5686          if test "x$CAT" = x; then
5687            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5688          fi
5689        else
5690          # Otherwise we believe it is a complete path. Use it as it is.
5691          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5692$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5693          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5694$as_echo_n "checking for CAT... " >&6; }
5695          if test ! -x "$tool_specified"; then
5696            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5697$as_echo "not found" >&6; }
5698            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5699          fi
5700          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5701$as_echo "$tool_specified" >&6; }
5702        fi
5703      fi
5704    fi
5705
5706  fi
5707
5708
5709
5710  if test "x$CAT" = x; then
5711    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5712  fi
5713
5714
5715
5716
5717
5718  # Publish this variable in the help.
5719
5720
5721  if [ -z "${CHMOD+x}" ]; then
5722    # The variable is not set by user, try to locate tool using the code snippet
5723    for ac_prog in chmod
5724do
5725  # Extract the first word of "$ac_prog", so it can be a program name with args.
5726set dummy $ac_prog; ac_word=$2
5727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5728$as_echo_n "checking for $ac_word... " >&6; }
5729if ${ac_cv_path_CHMOD+:} false; then :
5730  $as_echo_n "(cached) " >&6
5731else
5732  case $CHMOD in
5733  [\\/]* | ?:[\\/]*)
5734  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5735  ;;
5736  *)
5737  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5738for as_dir in $PATH
5739do
5740  IFS=$as_save_IFS
5741  test -z "$as_dir" && as_dir=.
5742    for ac_exec_ext in '' $ac_executable_extensions; do
5743  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5744    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5745    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5746    break 2
5747  fi
5748done
5749  done
5750IFS=$as_save_IFS
5751
5752  ;;
5753esac
5754fi
5755CHMOD=$ac_cv_path_CHMOD
5756if test -n "$CHMOD"; then
5757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5758$as_echo "$CHMOD" >&6; }
5759else
5760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5761$as_echo "no" >&6; }
5762fi
5763
5764
5765  test -n "$CHMOD" && break
5766done
5767
5768  else
5769    # The variable is set, but is it from the command line or the environment?
5770
5771    # Try to remove the string !CHMOD! from our list.
5772    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5773    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5774      # If it failed, the variable was not from the command line. Ignore it,
5775      # but warn the user (except for BASH, which is always set by the calling BASH).
5776      if test "xCHMOD" != xBASH; then
5777        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5778$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5779      fi
5780      # Try to locate tool using the code snippet
5781      for ac_prog in chmod
5782do
5783  # Extract the first word of "$ac_prog", so it can be a program name with args.
5784set dummy $ac_prog; ac_word=$2
5785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5786$as_echo_n "checking for $ac_word... " >&6; }
5787if ${ac_cv_path_CHMOD+:} false; then :
5788  $as_echo_n "(cached) " >&6
5789else
5790  case $CHMOD in
5791  [\\/]* | ?:[\\/]*)
5792  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5793  ;;
5794  *)
5795  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5796for as_dir in $PATH
5797do
5798  IFS=$as_save_IFS
5799  test -z "$as_dir" && as_dir=.
5800    for ac_exec_ext in '' $ac_executable_extensions; do
5801  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5802    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5803    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5804    break 2
5805  fi
5806done
5807  done
5808IFS=$as_save_IFS
5809
5810  ;;
5811esac
5812fi
5813CHMOD=$ac_cv_path_CHMOD
5814if test -n "$CHMOD"; then
5815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5816$as_echo "$CHMOD" >&6; }
5817else
5818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5819$as_echo "no" >&6; }
5820fi
5821
5822
5823  test -n "$CHMOD" && break
5824done
5825
5826    else
5827      # If it succeeded, then it was overridden by the user. We will use it
5828      # for the tool.
5829
5830      # First remove it from the list of overridden variables, so we can test
5831      # for unknown variables in the end.
5832      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5833
5834      # Check if we try to supply an empty value
5835      if test "x$CHMOD" = x; then
5836        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5837$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5838        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5839$as_echo_n "checking for CHMOD... " >&6; }
5840        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5841$as_echo "disabled" >&6; }
5842      else
5843        # Check if the provided tool contains a complete path.
5844        tool_specified="$CHMOD"
5845        tool_basename="${tool_specified##*/}"
5846        if test "x$tool_basename" = "x$tool_specified"; then
5847          # A command without a complete path is provided, search $PATH.
5848          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5849$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5850          # Extract the first word of "$tool_basename", so it can be a program name with args.
5851set dummy $tool_basename; ac_word=$2
5852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5853$as_echo_n "checking for $ac_word... " >&6; }
5854if ${ac_cv_path_CHMOD+:} false; then :
5855  $as_echo_n "(cached) " >&6
5856else
5857  case $CHMOD in
5858  [\\/]* | ?:[\\/]*)
5859  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5860  ;;
5861  *)
5862  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5863for as_dir in $PATH
5864do
5865  IFS=$as_save_IFS
5866  test -z "$as_dir" && as_dir=.
5867    for ac_exec_ext in '' $ac_executable_extensions; do
5868  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5869    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5870    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5871    break 2
5872  fi
5873done
5874  done
5875IFS=$as_save_IFS
5876
5877  ;;
5878esac
5879fi
5880CHMOD=$ac_cv_path_CHMOD
5881if test -n "$CHMOD"; then
5882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5883$as_echo "$CHMOD" >&6; }
5884else
5885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5886$as_echo "no" >&6; }
5887fi
5888
5889
5890          if test "x$CHMOD" = x; then
5891            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5892          fi
5893        else
5894          # Otherwise we believe it is a complete path. Use it as it is.
5895          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5896$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5897          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5898$as_echo_n "checking for CHMOD... " >&6; }
5899          if test ! -x "$tool_specified"; then
5900            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5901$as_echo "not found" >&6; }
5902            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5903          fi
5904          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5905$as_echo "$tool_specified" >&6; }
5906        fi
5907      fi
5908    fi
5909
5910  fi
5911
5912
5913
5914  if test "x$CHMOD" = x; then
5915    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5916  fi
5917
5918
5919
5920
5921
5922  # Publish this variable in the help.
5923
5924
5925  if [ -z "${CMP+x}" ]; then
5926    # The variable is not set by user, try to locate tool using the code snippet
5927    for ac_prog in cmp
5928do
5929  # Extract the first word of "$ac_prog", so it can be a program name with args.
5930set dummy $ac_prog; ac_word=$2
5931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5932$as_echo_n "checking for $ac_word... " >&6; }
5933if ${ac_cv_path_CMP+:} false; then :
5934  $as_echo_n "(cached) " >&6
5935else
5936  case $CMP in
5937  [\\/]* | ?:[\\/]*)
5938  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5939  ;;
5940  *)
5941  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5942for as_dir in $PATH
5943do
5944  IFS=$as_save_IFS
5945  test -z "$as_dir" && as_dir=.
5946    for ac_exec_ext in '' $ac_executable_extensions; do
5947  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5948    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5949    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5950    break 2
5951  fi
5952done
5953  done
5954IFS=$as_save_IFS
5955
5956  ;;
5957esac
5958fi
5959CMP=$ac_cv_path_CMP
5960if test -n "$CMP"; then
5961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5962$as_echo "$CMP" >&6; }
5963else
5964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5965$as_echo "no" >&6; }
5966fi
5967
5968
5969  test -n "$CMP" && break
5970done
5971
5972  else
5973    # The variable is set, but is it from the command line or the environment?
5974
5975    # Try to remove the string !CMP! from our list.
5976    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5977    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5978      # If it failed, the variable was not from the command line. Ignore it,
5979      # but warn the user (except for BASH, which is always set by the calling BASH).
5980      if test "xCMP" != xBASH; then
5981        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5982$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5983      fi
5984      # Try to locate tool using the code snippet
5985      for ac_prog in cmp
5986do
5987  # Extract the first word of "$ac_prog", so it can be a program name with args.
5988set dummy $ac_prog; ac_word=$2
5989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5990$as_echo_n "checking for $ac_word... " >&6; }
5991if ${ac_cv_path_CMP+:} false; then :
5992  $as_echo_n "(cached) " >&6
5993else
5994  case $CMP in
5995  [\\/]* | ?:[\\/]*)
5996  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5997  ;;
5998  *)
5999  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6000for as_dir in $PATH
6001do
6002  IFS=$as_save_IFS
6003  test -z "$as_dir" && as_dir=.
6004    for ac_exec_ext in '' $ac_executable_extensions; do
6005  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6006    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6007    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6008    break 2
6009  fi
6010done
6011  done
6012IFS=$as_save_IFS
6013
6014  ;;
6015esac
6016fi
6017CMP=$ac_cv_path_CMP
6018if test -n "$CMP"; then
6019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6020$as_echo "$CMP" >&6; }
6021else
6022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6023$as_echo "no" >&6; }
6024fi
6025
6026
6027  test -n "$CMP" && break
6028done
6029
6030    else
6031      # If it succeeded, then it was overridden by the user. We will use it
6032      # for the tool.
6033
6034      # First remove it from the list of overridden variables, so we can test
6035      # for unknown variables in the end.
6036      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6037
6038      # Check if we try to supply an empty value
6039      if test "x$CMP" = x; then
6040        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6041$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6042        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6043$as_echo_n "checking for CMP... " >&6; }
6044        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6045$as_echo "disabled" >&6; }
6046      else
6047        # Check if the provided tool contains a complete path.
6048        tool_specified="$CMP"
6049        tool_basename="${tool_specified##*/}"
6050        if test "x$tool_basename" = "x$tool_specified"; then
6051          # A command without a complete path is provided, search $PATH.
6052          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6053$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6054          # Extract the first word of "$tool_basename", so it can be a program name with args.
6055set dummy $tool_basename; ac_word=$2
6056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6057$as_echo_n "checking for $ac_word... " >&6; }
6058if ${ac_cv_path_CMP+:} false; then :
6059  $as_echo_n "(cached) " >&6
6060else
6061  case $CMP in
6062  [\\/]* | ?:[\\/]*)
6063  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6064  ;;
6065  *)
6066  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6067for as_dir in $PATH
6068do
6069  IFS=$as_save_IFS
6070  test -z "$as_dir" && as_dir=.
6071    for ac_exec_ext in '' $ac_executable_extensions; do
6072  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6073    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6074    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6075    break 2
6076  fi
6077done
6078  done
6079IFS=$as_save_IFS
6080
6081  ;;
6082esac
6083fi
6084CMP=$ac_cv_path_CMP
6085if test -n "$CMP"; then
6086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6087$as_echo "$CMP" >&6; }
6088else
6089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6090$as_echo "no" >&6; }
6091fi
6092
6093
6094          if test "x$CMP" = x; then
6095            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6096          fi
6097        else
6098          # Otherwise we believe it is a complete path. Use it as it is.
6099          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6100$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6101          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6102$as_echo_n "checking for CMP... " >&6; }
6103          if test ! -x "$tool_specified"; then
6104            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6105$as_echo "not found" >&6; }
6106            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6107          fi
6108          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6109$as_echo "$tool_specified" >&6; }
6110        fi
6111      fi
6112    fi
6113
6114  fi
6115
6116
6117
6118  if test "x$CMP" = x; then
6119    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6120  fi
6121
6122
6123
6124
6125
6126  # Publish this variable in the help.
6127
6128
6129  if [ -z "${COMM+x}" ]; then
6130    # The variable is not set by user, try to locate tool using the code snippet
6131    for ac_prog in comm
6132do
6133  # Extract the first word of "$ac_prog", so it can be a program name with args.
6134set dummy $ac_prog; ac_word=$2
6135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6136$as_echo_n "checking for $ac_word... " >&6; }
6137if ${ac_cv_path_COMM+:} false; then :
6138  $as_echo_n "(cached) " >&6
6139else
6140  case $COMM in
6141  [\\/]* | ?:[\\/]*)
6142  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6143  ;;
6144  *)
6145  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6146for as_dir in $PATH
6147do
6148  IFS=$as_save_IFS
6149  test -z "$as_dir" && as_dir=.
6150    for ac_exec_ext in '' $ac_executable_extensions; do
6151  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6152    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6153    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6154    break 2
6155  fi
6156done
6157  done
6158IFS=$as_save_IFS
6159
6160  ;;
6161esac
6162fi
6163COMM=$ac_cv_path_COMM
6164if test -n "$COMM"; then
6165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6166$as_echo "$COMM" >&6; }
6167else
6168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6169$as_echo "no" >&6; }
6170fi
6171
6172
6173  test -n "$COMM" && break
6174done
6175
6176  else
6177    # The variable is set, but is it from the command line or the environment?
6178
6179    # Try to remove the string !COMM! from our list.
6180    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6181    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6182      # If it failed, the variable was not from the command line. Ignore it,
6183      # but warn the user (except for BASH, which is always set by the calling BASH).
6184      if test "xCOMM" != xBASH; then
6185        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6186$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6187      fi
6188      # Try to locate tool using the code snippet
6189      for ac_prog in comm
6190do
6191  # Extract the first word of "$ac_prog", so it can be a program name with args.
6192set dummy $ac_prog; ac_word=$2
6193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6194$as_echo_n "checking for $ac_word... " >&6; }
6195if ${ac_cv_path_COMM+:} false; then :
6196  $as_echo_n "(cached) " >&6
6197else
6198  case $COMM in
6199  [\\/]* | ?:[\\/]*)
6200  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6201  ;;
6202  *)
6203  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6204for as_dir in $PATH
6205do
6206  IFS=$as_save_IFS
6207  test -z "$as_dir" && as_dir=.
6208    for ac_exec_ext in '' $ac_executable_extensions; do
6209  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6210    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6211    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6212    break 2
6213  fi
6214done
6215  done
6216IFS=$as_save_IFS
6217
6218  ;;
6219esac
6220fi
6221COMM=$ac_cv_path_COMM
6222if test -n "$COMM"; then
6223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6224$as_echo "$COMM" >&6; }
6225else
6226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6227$as_echo "no" >&6; }
6228fi
6229
6230
6231  test -n "$COMM" && break
6232done
6233
6234    else
6235      # If it succeeded, then it was overridden by the user. We will use it
6236      # for the tool.
6237
6238      # First remove it from the list of overridden variables, so we can test
6239      # for unknown variables in the end.
6240      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6241
6242      # Check if we try to supply an empty value
6243      if test "x$COMM" = x; then
6244        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6245$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6246        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6247$as_echo_n "checking for COMM... " >&6; }
6248        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6249$as_echo "disabled" >&6; }
6250      else
6251        # Check if the provided tool contains a complete path.
6252        tool_specified="$COMM"
6253        tool_basename="${tool_specified##*/}"
6254        if test "x$tool_basename" = "x$tool_specified"; then
6255          # A command without a complete path is provided, search $PATH.
6256          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6257$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6258          # Extract the first word of "$tool_basename", so it can be a program name with args.
6259set dummy $tool_basename; ac_word=$2
6260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6261$as_echo_n "checking for $ac_word... " >&6; }
6262if ${ac_cv_path_COMM+:} false; then :
6263  $as_echo_n "(cached) " >&6
6264else
6265  case $COMM in
6266  [\\/]* | ?:[\\/]*)
6267  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6268  ;;
6269  *)
6270  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6271for as_dir in $PATH
6272do
6273  IFS=$as_save_IFS
6274  test -z "$as_dir" && as_dir=.
6275    for ac_exec_ext in '' $ac_executable_extensions; do
6276  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6277    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6278    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6279    break 2
6280  fi
6281done
6282  done
6283IFS=$as_save_IFS
6284
6285  ;;
6286esac
6287fi
6288COMM=$ac_cv_path_COMM
6289if test -n "$COMM"; then
6290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6291$as_echo "$COMM" >&6; }
6292else
6293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6294$as_echo "no" >&6; }
6295fi
6296
6297
6298          if test "x$COMM" = x; then
6299            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6300          fi
6301        else
6302          # Otherwise we believe it is a complete path. Use it as it is.
6303          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6304$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6305          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6306$as_echo_n "checking for COMM... " >&6; }
6307          if test ! -x "$tool_specified"; then
6308            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6309$as_echo "not found" >&6; }
6310            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6311          fi
6312          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6313$as_echo "$tool_specified" >&6; }
6314        fi
6315      fi
6316    fi
6317
6318  fi
6319
6320
6321
6322  if test "x$COMM" = x; then
6323    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6324  fi
6325
6326
6327
6328
6329
6330  # Publish this variable in the help.
6331
6332
6333  if [ -z "${CP+x}" ]; then
6334    # The variable is not set by user, try to locate tool using the code snippet
6335    for ac_prog in cp
6336do
6337  # Extract the first word of "$ac_prog", so it can be a program name with args.
6338set dummy $ac_prog; ac_word=$2
6339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6340$as_echo_n "checking for $ac_word... " >&6; }
6341if ${ac_cv_path_CP+:} false; then :
6342  $as_echo_n "(cached) " >&6
6343else
6344  case $CP in
6345  [\\/]* | ?:[\\/]*)
6346  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6347  ;;
6348  *)
6349  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6350for as_dir in $PATH
6351do
6352  IFS=$as_save_IFS
6353  test -z "$as_dir" && as_dir=.
6354    for ac_exec_ext in '' $ac_executable_extensions; do
6355  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6356    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6357    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6358    break 2
6359  fi
6360done
6361  done
6362IFS=$as_save_IFS
6363
6364  ;;
6365esac
6366fi
6367CP=$ac_cv_path_CP
6368if test -n "$CP"; then
6369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6370$as_echo "$CP" >&6; }
6371else
6372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6373$as_echo "no" >&6; }
6374fi
6375
6376
6377  test -n "$CP" && break
6378done
6379
6380  else
6381    # The variable is set, but is it from the command line or the environment?
6382
6383    # Try to remove the string !CP! from our list.
6384    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6385    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6386      # If it failed, the variable was not from the command line. Ignore it,
6387      # but warn the user (except for BASH, which is always set by the calling BASH).
6388      if test "xCP" != xBASH; then
6389        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6390$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6391      fi
6392      # Try to locate tool using the code snippet
6393      for ac_prog in cp
6394do
6395  # Extract the first word of "$ac_prog", so it can be a program name with args.
6396set dummy $ac_prog; ac_word=$2
6397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6398$as_echo_n "checking for $ac_word... " >&6; }
6399if ${ac_cv_path_CP+:} false; then :
6400  $as_echo_n "(cached) " >&6
6401else
6402  case $CP in
6403  [\\/]* | ?:[\\/]*)
6404  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6405  ;;
6406  *)
6407  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6408for as_dir in $PATH
6409do
6410  IFS=$as_save_IFS
6411  test -z "$as_dir" && as_dir=.
6412    for ac_exec_ext in '' $ac_executable_extensions; do
6413  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6414    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6415    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6416    break 2
6417  fi
6418done
6419  done
6420IFS=$as_save_IFS
6421
6422  ;;
6423esac
6424fi
6425CP=$ac_cv_path_CP
6426if test -n "$CP"; then
6427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6428$as_echo "$CP" >&6; }
6429else
6430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6431$as_echo "no" >&6; }
6432fi
6433
6434
6435  test -n "$CP" && break
6436done
6437
6438    else
6439      # If it succeeded, then it was overridden by the user. We will use it
6440      # for the tool.
6441
6442      # First remove it from the list of overridden variables, so we can test
6443      # for unknown variables in the end.
6444      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6445
6446      # Check if we try to supply an empty value
6447      if test "x$CP" = x; then
6448        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6449$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6450        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6451$as_echo_n "checking for CP... " >&6; }
6452        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6453$as_echo "disabled" >&6; }
6454      else
6455        # Check if the provided tool contains a complete path.
6456        tool_specified="$CP"
6457        tool_basename="${tool_specified##*/}"
6458        if test "x$tool_basename" = "x$tool_specified"; then
6459          # A command without a complete path is provided, search $PATH.
6460          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6461$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6462          # Extract the first word of "$tool_basename", so it can be a program name with args.
6463set dummy $tool_basename; ac_word=$2
6464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6465$as_echo_n "checking for $ac_word... " >&6; }
6466if ${ac_cv_path_CP+:} false; then :
6467  $as_echo_n "(cached) " >&6
6468else
6469  case $CP in
6470  [\\/]* | ?:[\\/]*)
6471  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6472  ;;
6473  *)
6474  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6475for as_dir in $PATH
6476do
6477  IFS=$as_save_IFS
6478  test -z "$as_dir" && as_dir=.
6479    for ac_exec_ext in '' $ac_executable_extensions; do
6480  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6481    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6482    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6483    break 2
6484  fi
6485done
6486  done
6487IFS=$as_save_IFS
6488
6489  ;;
6490esac
6491fi
6492CP=$ac_cv_path_CP
6493if test -n "$CP"; then
6494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6495$as_echo "$CP" >&6; }
6496else
6497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6498$as_echo "no" >&6; }
6499fi
6500
6501
6502          if test "x$CP" = x; then
6503            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6504          fi
6505        else
6506          # Otherwise we believe it is a complete path. Use it as it is.
6507          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6508$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6509          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6510$as_echo_n "checking for CP... " >&6; }
6511          if test ! -x "$tool_specified"; then
6512            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6513$as_echo "not found" >&6; }
6514            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6515          fi
6516          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6517$as_echo "$tool_specified" >&6; }
6518        fi
6519      fi
6520    fi
6521
6522  fi
6523
6524
6525
6526  if test "x$CP" = x; then
6527    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6528  fi
6529
6530
6531
6532
6533
6534  # Publish this variable in the help.
6535
6536
6537  if [ -z "${CUT+x}" ]; then
6538    # The variable is not set by user, try to locate tool using the code snippet
6539    for ac_prog in cut
6540do
6541  # Extract the first word of "$ac_prog", so it can be a program name with args.
6542set dummy $ac_prog; ac_word=$2
6543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6544$as_echo_n "checking for $ac_word... " >&6; }
6545if ${ac_cv_path_CUT+:} false; then :
6546  $as_echo_n "(cached) " >&6
6547else
6548  case $CUT in
6549  [\\/]* | ?:[\\/]*)
6550  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6551  ;;
6552  *)
6553  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6554for as_dir in $PATH
6555do
6556  IFS=$as_save_IFS
6557  test -z "$as_dir" && as_dir=.
6558    for ac_exec_ext in '' $ac_executable_extensions; do
6559  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6560    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6561    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6562    break 2
6563  fi
6564done
6565  done
6566IFS=$as_save_IFS
6567
6568  ;;
6569esac
6570fi
6571CUT=$ac_cv_path_CUT
6572if test -n "$CUT"; then
6573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6574$as_echo "$CUT" >&6; }
6575else
6576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6577$as_echo "no" >&6; }
6578fi
6579
6580
6581  test -n "$CUT" && break
6582done
6583
6584  else
6585    # The variable is set, but is it from the command line or the environment?
6586
6587    # Try to remove the string !CUT! from our list.
6588    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6589    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6590      # If it failed, the variable was not from the command line. Ignore it,
6591      # but warn the user (except for BASH, which is always set by the calling BASH).
6592      if test "xCUT" != xBASH; then
6593        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6594$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6595      fi
6596      # Try to locate tool using the code snippet
6597      for ac_prog in cut
6598do
6599  # Extract the first word of "$ac_prog", so it can be a program name with args.
6600set dummy $ac_prog; ac_word=$2
6601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6602$as_echo_n "checking for $ac_word... " >&6; }
6603if ${ac_cv_path_CUT+:} false; then :
6604  $as_echo_n "(cached) " >&6
6605else
6606  case $CUT in
6607  [\\/]* | ?:[\\/]*)
6608  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6609  ;;
6610  *)
6611  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6612for as_dir in $PATH
6613do
6614  IFS=$as_save_IFS
6615  test -z "$as_dir" && as_dir=.
6616    for ac_exec_ext in '' $ac_executable_extensions; do
6617  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6618    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6619    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6620    break 2
6621  fi
6622done
6623  done
6624IFS=$as_save_IFS
6625
6626  ;;
6627esac
6628fi
6629CUT=$ac_cv_path_CUT
6630if test -n "$CUT"; then
6631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6632$as_echo "$CUT" >&6; }
6633else
6634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6635$as_echo "no" >&6; }
6636fi
6637
6638
6639  test -n "$CUT" && break
6640done
6641
6642    else
6643      # If it succeeded, then it was overridden by the user. We will use it
6644      # for the tool.
6645
6646      # First remove it from the list of overridden variables, so we can test
6647      # for unknown variables in the end.
6648      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6649
6650      # Check if we try to supply an empty value
6651      if test "x$CUT" = x; then
6652        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6653$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6654        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6655$as_echo_n "checking for CUT... " >&6; }
6656        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6657$as_echo "disabled" >&6; }
6658      else
6659        # Check if the provided tool contains a complete path.
6660        tool_specified="$CUT"
6661        tool_basename="${tool_specified##*/}"
6662        if test "x$tool_basename" = "x$tool_specified"; then
6663          # A command without a complete path is provided, search $PATH.
6664          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6665$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6666          # Extract the first word of "$tool_basename", so it can be a program name with args.
6667set dummy $tool_basename; ac_word=$2
6668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6669$as_echo_n "checking for $ac_word... " >&6; }
6670if ${ac_cv_path_CUT+:} false; then :
6671  $as_echo_n "(cached) " >&6
6672else
6673  case $CUT in
6674  [\\/]* | ?:[\\/]*)
6675  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6676  ;;
6677  *)
6678  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6679for as_dir in $PATH
6680do
6681  IFS=$as_save_IFS
6682  test -z "$as_dir" && as_dir=.
6683    for ac_exec_ext in '' $ac_executable_extensions; do
6684  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6685    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6686    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6687    break 2
6688  fi
6689done
6690  done
6691IFS=$as_save_IFS
6692
6693  ;;
6694esac
6695fi
6696CUT=$ac_cv_path_CUT
6697if test -n "$CUT"; then
6698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6699$as_echo "$CUT" >&6; }
6700else
6701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6702$as_echo "no" >&6; }
6703fi
6704
6705
6706          if test "x$CUT" = x; then
6707            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6708          fi
6709        else
6710          # Otherwise we believe it is a complete path. Use it as it is.
6711          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6712$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6713          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6714$as_echo_n "checking for CUT... " >&6; }
6715          if test ! -x "$tool_specified"; then
6716            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6717$as_echo "not found" >&6; }
6718            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6719          fi
6720          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6721$as_echo "$tool_specified" >&6; }
6722        fi
6723      fi
6724    fi
6725
6726  fi
6727
6728
6729
6730  if test "x$CUT" = x; then
6731    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6732  fi
6733
6734
6735
6736
6737
6738  # Publish this variable in the help.
6739
6740
6741  if [ -z "${DATE+x}" ]; then
6742    # The variable is not set by user, try to locate tool using the code snippet
6743    for ac_prog in date
6744do
6745  # Extract the first word of "$ac_prog", so it can be a program name with args.
6746set dummy $ac_prog; ac_word=$2
6747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6748$as_echo_n "checking for $ac_word... " >&6; }
6749if ${ac_cv_path_DATE+:} false; then :
6750  $as_echo_n "(cached) " >&6
6751else
6752  case $DATE in
6753  [\\/]* | ?:[\\/]*)
6754  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6755  ;;
6756  *)
6757  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6758for as_dir in $PATH
6759do
6760  IFS=$as_save_IFS
6761  test -z "$as_dir" && as_dir=.
6762    for ac_exec_ext in '' $ac_executable_extensions; do
6763  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6764    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6765    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6766    break 2
6767  fi
6768done
6769  done
6770IFS=$as_save_IFS
6771
6772  ;;
6773esac
6774fi
6775DATE=$ac_cv_path_DATE
6776if test -n "$DATE"; then
6777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6778$as_echo "$DATE" >&6; }
6779else
6780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6781$as_echo "no" >&6; }
6782fi
6783
6784
6785  test -n "$DATE" && break
6786done
6787
6788  else
6789    # The variable is set, but is it from the command line or the environment?
6790
6791    # Try to remove the string !DATE! from our list.
6792    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6793    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6794      # If it failed, the variable was not from the command line. Ignore it,
6795      # but warn the user (except for BASH, which is always set by the calling BASH).
6796      if test "xDATE" != xBASH; then
6797        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6798$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6799      fi
6800      # Try to locate tool using the code snippet
6801      for ac_prog in date
6802do
6803  # Extract the first word of "$ac_prog", so it can be a program name with args.
6804set dummy $ac_prog; ac_word=$2
6805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6806$as_echo_n "checking for $ac_word... " >&6; }
6807if ${ac_cv_path_DATE+:} false; then :
6808  $as_echo_n "(cached) " >&6
6809else
6810  case $DATE in
6811  [\\/]* | ?:[\\/]*)
6812  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6813  ;;
6814  *)
6815  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6816for as_dir in $PATH
6817do
6818  IFS=$as_save_IFS
6819  test -z "$as_dir" && as_dir=.
6820    for ac_exec_ext in '' $ac_executable_extensions; do
6821  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6822    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6823    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6824    break 2
6825  fi
6826done
6827  done
6828IFS=$as_save_IFS
6829
6830  ;;
6831esac
6832fi
6833DATE=$ac_cv_path_DATE
6834if test -n "$DATE"; then
6835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6836$as_echo "$DATE" >&6; }
6837else
6838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6839$as_echo "no" >&6; }
6840fi
6841
6842
6843  test -n "$DATE" && break
6844done
6845
6846    else
6847      # If it succeeded, then it was overridden by the user. We will use it
6848      # for the tool.
6849
6850      # First remove it from the list of overridden variables, so we can test
6851      # for unknown variables in the end.
6852      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6853
6854      # Check if we try to supply an empty value
6855      if test "x$DATE" = x; then
6856        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6857$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6858        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6859$as_echo_n "checking for DATE... " >&6; }
6860        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6861$as_echo "disabled" >&6; }
6862      else
6863        # Check if the provided tool contains a complete path.
6864        tool_specified="$DATE"
6865        tool_basename="${tool_specified##*/}"
6866        if test "x$tool_basename" = "x$tool_specified"; then
6867          # A command without a complete path is provided, search $PATH.
6868          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6869$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6870          # Extract the first word of "$tool_basename", so it can be a program name with args.
6871set dummy $tool_basename; ac_word=$2
6872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6873$as_echo_n "checking for $ac_word... " >&6; }
6874if ${ac_cv_path_DATE+:} false; then :
6875  $as_echo_n "(cached) " >&6
6876else
6877  case $DATE in
6878  [\\/]* | ?:[\\/]*)
6879  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6880  ;;
6881  *)
6882  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6883for as_dir in $PATH
6884do
6885  IFS=$as_save_IFS
6886  test -z "$as_dir" && as_dir=.
6887    for ac_exec_ext in '' $ac_executable_extensions; do
6888  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6889    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6890    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6891    break 2
6892  fi
6893done
6894  done
6895IFS=$as_save_IFS
6896
6897  ;;
6898esac
6899fi
6900DATE=$ac_cv_path_DATE
6901if test -n "$DATE"; then
6902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6903$as_echo "$DATE" >&6; }
6904else
6905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6906$as_echo "no" >&6; }
6907fi
6908
6909
6910          if test "x$DATE" = x; then
6911            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6912          fi
6913        else
6914          # Otherwise we believe it is a complete path. Use it as it is.
6915          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6916$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6917          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6918$as_echo_n "checking for DATE... " >&6; }
6919          if test ! -x "$tool_specified"; then
6920            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6921$as_echo "not found" >&6; }
6922            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6923          fi
6924          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6925$as_echo "$tool_specified" >&6; }
6926        fi
6927      fi
6928    fi
6929
6930  fi
6931
6932
6933
6934  if test "x$DATE" = x; then
6935    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6936  fi
6937
6938
6939
6940
6941
6942  # Publish this variable in the help.
6943
6944
6945  if [ -z "${DIFF+x}" ]; then
6946    # The variable is not set by user, try to locate tool using the code snippet
6947    for ac_prog in gdiff diff
6948do
6949  # Extract the first word of "$ac_prog", so it can be a program name with args.
6950set dummy $ac_prog; ac_word=$2
6951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6952$as_echo_n "checking for $ac_word... " >&6; }
6953if ${ac_cv_path_DIFF+:} false; then :
6954  $as_echo_n "(cached) " >&6
6955else
6956  case $DIFF in
6957  [\\/]* | ?:[\\/]*)
6958  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6959  ;;
6960  *)
6961  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6962for as_dir in $PATH
6963do
6964  IFS=$as_save_IFS
6965  test -z "$as_dir" && as_dir=.
6966    for ac_exec_ext in '' $ac_executable_extensions; do
6967  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6968    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6969    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6970    break 2
6971  fi
6972done
6973  done
6974IFS=$as_save_IFS
6975
6976  ;;
6977esac
6978fi
6979DIFF=$ac_cv_path_DIFF
6980if test -n "$DIFF"; then
6981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6982$as_echo "$DIFF" >&6; }
6983else
6984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6985$as_echo "no" >&6; }
6986fi
6987
6988
6989  test -n "$DIFF" && break
6990done
6991
6992  else
6993    # The variable is set, but is it from the command line or the environment?
6994
6995    # Try to remove the string !DIFF! from our list.
6996    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6997    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6998      # If it failed, the variable was not from the command line. Ignore it,
6999      # but warn the user (except for BASH, which is always set by the calling BASH).
7000      if test "xDIFF" != xBASH; then
7001        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7002$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7003      fi
7004      # Try to locate tool using the code snippet
7005      for ac_prog in gdiff diff
7006do
7007  # Extract the first word of "$ac_prog", so it can be a program name with args.
7008set dummy $ac_prog; ac_word=$2
7009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7010$as_echo_n "checking for $ac_word... " >&6; }
7011if ${ac_cv_path_DIFF+:} false; then :
7012  $as_echo_n "(cached) " >&6
7013else
7014  case $DIFF in
7015  [\\/]* | ?:[\\/]*)
7016  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7017  ;;
7018  *)
7019  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7020for as_dir in $PATH
7021do
7022  IFS=$as_save_IFS
7023  test -z "$as_dir" && as_dir=.
7024    for ac_exec_ext in '' $ac_executable_extensions; do
7025  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7026    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7027    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7028    break 2
7029  fi
7030done
7031  done
7032IFS=$as_save_IFS
7033
7034  ;;
7035esac
7036fi
7037DIFF=$ac_cv_path_DIFF
7038if test -n "$DIFF"; then
7039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7040$as_echo "$DIFF" >&6; }
7041else
7042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7043$as_echo "no" >&6; }
7044fi
7045
7046
7047  test -n "$DIFF" && break
7048done
7049
7050    else
7051      # If it succeeded, then it was overridden by the user. We will use it
7052      # for the tool.
7053
7054      # First remove it from the list of overridden variables, so we can test
7055      # for unknown variables in the end.
7056      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7057
7058      # Check if we try to supply an empty value
7059      if test "x$DIFF" = x; then
7060        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7061$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7062        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7063$as_echo_n "checking for DIFF... " >&6; }
7064        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7065$as_echo "disabled" >&6; }
7066      else
7067        # Check if the provided tool contains a complete path.
7068        tool_specified="$DIFF"
7069        tool_basename="${tool_specified##*/}"
7070        if test "x$tool_basename" = "x$tool_specified"; then
7071          # A command without a complete path is provided, search $PATH.
7072          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7073$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7074          # Extract the first word of "$tool_basename", so it can be a program name with args.
7075set dummy $tool_basename; ac_word=$2
7076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7077$as_echo_n "checking for $ac_word... " >&6; }
7078if ${ac_cv_path_DIFF+:} false; then :
7079  $as_echo_n "(cached) " >&6
7080else
7081  case $DIFF in
7082  [\\/]* | ?:[\\/]*)
7083  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7084  ;;
7085  *)
7086  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7087for as_dir in $PATH
7088do
7089  IFS=$as_save_IFS
7090  test -z "$as_dir" && as_dir=.
7091    for ac_exec_ext in '' $ac_executable_extensions; do
7092  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7093    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7094    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7095    break 2
7096  fi
7097done
7098  done
7099IFS=$as_save_IFS
7100
7101  ;;
7102esac
7103fi
7104DIFF=$ac_cv_path_DIFF
7105if test -n "$DIFF"; then
7106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7107$as_echo "$DIFF" >&6; }
7108else
7109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7110$as_echo "no" >&6; }
7111fi
7112
7113
7114          if test "x$DIFF" = x; then
7115            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7116          fi
7117        else
7118          # Otherwise we believe it is a complete path. Use it as it is.
7119          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7120$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7121          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7122$as_echo_n "checking for DIFF... " >&6; }
7123          if test ! -x "$tool_specified"; then
7124            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7125$as_echo "not found" >&6; }
7126            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7127          fi
7128          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7129$as_echo "$tool_specified" >&6; }
7130        fi
7131      fi
7132    fi
7133
7134  fi
7135
7136
7137
7138  if test "x$DIFF" = x; then
7139    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7140  fi
7141
7142
7143
7144
7145
7146  # Publish this variable in the help.
7147
7148
7149  if [ -z "${DIRNAME+x}" ]; then
7150    # The variable is not set by user, try to locate tool using the code snippet
7151    for ac_prog in dirname
7152do
7153  # Extract the first word of "$ac_prog", so it can be a program name with args.
7154set dummy $ac_prog; ac_word=$2
7155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7156$as_echo_n "checking for $ac_word... " >&6; }
7157if ${ac_cv_path_DIRNAME+:} false; then :
7158  $as_echo_n "(cached) " >&6
7159else
7160  case $DIRNAME in
7161  [\\/]* | ?:[\\/]*)
7162  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7163  ;;
7164  *)
7165  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7166for as_dir in $PATH
7167do
7168  IFS=$as_save_IFS
7169  test -z "$as_dir" && as_dir=.
7170    for ac_exec_ext in '' $ac_executable_extensions; do
7171  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7172    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7173    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7174    break 2
7175  fi
7176done
7177  done
7178IFS=$as_save_IFS
7179
7180  ;;
7181esac
7182fi
7183DIRNAME=$ac_cv_path_DIRNAME
7184if test -n "$DIRNAME"; then
7185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7186$as_echo "$DIRNAME" >&6; }
7187else
7188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7189$as_echo "no" >&6; }
7190fi
7191
7192
7193  test -n "$DIRNAME" && break
7194done
7195
7196  else
7197    # The variable is set, but is it from the command line or the environment?
7198
7199    # Try to remove the string !DIRNAME! from our list.
7200    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7201    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7202      # If it failed, the variable was not from the command line. Ignore it,
7203      # but warn the user (except for BASH, which is always set by the calling BASH).
7204      if test "xDIRNAME" != xBASH; then
7205        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7206$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7207      fi
7208      # Try to locate tool using the code snippet
7209      for ac_prog in dirname
7210do
7211  # Extract the first word of "$ac_prog", so it can be a program name with args.
7212set dummy $ac_prog; ac_word=$2
7213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7214$as_echo_n "checking for $ac_word... " >&6; }
7215if ${ac_cv_path_DIRNAME+:} false; then :
7216  $as_echo_n "(cached) " >&6
7217else
7218  case $DIRNAME in
7219  [\\/]* | ?:[\\/]*)
7220  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7221  ;;
7222  *)
7223  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7224for as_dir in $PATH
7225do
7226  IFS=$as_save_IFS
7227  test -z "$as_dir" && as_dir=.
7228    for ac_exec_ext in '' $ac_executable_extensions; do
7229  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7230    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7231    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7232    break 2
7233  fi
7234done
7235  done
7236IFS=$as_save_IFS
7237
7238  ;;
7239esac
7240fi
7241DIRNAME=$ac_cv_path_DIRNAME
7242if test -n "$DIRNAME"; then
7243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7244$as_echo "$DIRNAME" >&6; }
7245else
7246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7247$as_echo "no" >&6; }
7248fi
7249
7250
7251  test -n "$DIRNAME" && break
7252done
7253
7254    else
7255      # If it succeeded, then it was overridden by the user. We will use it
7256      # for the tool.
7257
7258      # First remove it from the list of overridden variables, so we can test
7259      # for unknown variables in the end.
7260      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7261
7262      # Check if we try to supply an empty value
7263      if test "x$DIRNAME" = x; then
7264        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7265$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7266        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7267$as_echo_n "checking for DIRNAME... " >&6; }
7268        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7269$as_echo "disabled" >&6; }
7270      else
7271        # Check if the provided tool contains a complete path.
7272        tool_specified="$DIRNAME"
7273        tool_basename="${tool_specified##*/}"
7274        if test "x$tool_basename" = "x$tool_specified"; then
7275          # A command without a complete path is provided, search $PATH.
7276          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7277$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7278          # Extract the first word of "$tool_basename", so it can be a program name with args.
7279set dummy $tool_basename; ac_word=$2
7280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7281$as_echo_n "checking for $ac_word... " >&6; }
7282if ${ac_cv_path_DIRNAME+:} false; then :
7283  $as_echo_n "(cached) " >&6
7284else
7285  case $DIRNAME in
7286  [\\/]* | ?:[\\/]*)
7287  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7288  ;;
7289  *)
7290  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7291for as_dir in $PATH
7292do
7293  IFS=$as_save_IFS
7294  test -z "$as_dir" && as_dir=.
7295    for ac_exec_ext in '' $ac_executable_extensions; do
7296  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7297    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7298    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7299    break 2
7300  fi
7301done
7302  done
7303IFS=$as_save_IFS
7304
7305  ;;
7306esac
7307fi
7308DIRNAME=$ac_cv_path_DIRNAME
7309if test -n "$DIRNAME"; then
7310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7311$as_echo "$DIRNAME" >&6; }
7312else
7313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7314$as_echo "no" >&6; }
7315fi
7316
7317
7318          if test "x$DIRNAME" = x; then
7319            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7320          fi
7321        else
7322          # Otherwise we believe it is a complete path. Use it as it is.
7323          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7324$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7325          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7326$as_echo_n "checking for DIRNAME... " >&6; }
7327          if test ! -x "$tool_specified"; then
7328            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7329$as_echo "not found" >&6; }
7330            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7331          fi
7332          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7333$as_echo "$tool_specified" >&6; }
7334        fi
7335      fi
7336    fi
7337
7338  fi
7339
7340
7341
7342  if test "x$DIRNAME" = x; then
7343    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7344  fi
7345
7346
7347
7348
7349
7350  # Publish this variable in the help.
7351
7352
7353  if [ -z "${ECHO+x}" ]; then
7354    # The variable is not set by user, try to locate tool using the code snippet
7355    for ac_prog in echo
7356do
7357  # Extract the first word of "$ac_prog", so it can be a program name with args.
7358set dummy $ac_prog; ac_word=$2
7359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7360$as_echo_n "checking for $ac_word... " >&6; }
7361if ${ac_cv_path_ECHO+:} false; then :
7362  $as_echo_n "(cached) " >&6
7363else
7364  case $ECHO in
7365  [\\/]* | ?:[\\/]*)
7366  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7367  ;;
7368  *)
7369  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7370for as_dir in $PATH
7371do
7372  IFS=$as_save_IFS
7373  test -z "$as_dir" && as_dir=.
7374    for ac_exec_ext in '' $ac_executable_extensions; do
7375  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7376    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7377    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7378    break 2
7379  fi
7380done
7381  done
7382IFS=$as_save_IFS
7383
7384  ;;
7385esac
7386fi
7387ECHO=$ac_cv_path_ECHO
7388if test -n "$ECHO"; then
7389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7390$as_echo "$ECHO" >&6; }
7391else
7392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7393$as_echo "no" >&6; }
7394fi
7395
7396
7397  test -n "$ECHO" && break
7398done
7399
7400  else
7401    # The variable is set, but is it from the command line or the environment?
7402
7403    # Try to remove the string !ECHO! from our list.
7404    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7405    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7406      # If it failed, the variable was not from the command line. Ignore it,
7407      # but warn the user (except for BASH, which is always set by the calling BASH).
7408      if test "xECHO" != xBASH; then
7409        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7410$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7411      fi
7412      # Try to locate tool using the code snippet
7413      for ac_prog in echo
7414do
7415  # Extract the first word of "$ac_prog", so it can be a program name with args.
7416set dummy $ac_prog; ac_word=$2
7417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7418$as_echo_n "checking for $ac_word... " >&6; }
7419if ${ac_cv_path_ECHO+:} false; then :
7420  $as_echo_n "(cached) " >&6
7421else
7422  case $ECHO in
7423  [\\/]* | ?:[\\/]*)
7424  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7425  ;;
7426  *)
7427  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7428for as_dir in $PATH
7429do
7430  IFS=$as_save_IFS
7431  test -z "$as_dir" && as_dir=.
7432    for ac_exec_ext in '' $ac_executable_extensions; do
7433  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7434    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7435    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7436    break 2
7437  fi
7438done
7439  done
7440IFS=$as_save_IFS
7441
7442  ;;
7443esac
7444fi
7445ECHO=$ac_cv_path_ECHO
7446if test -n "$ECHO"; then
7447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7448$as_echo "$ECHO" >&6; }
7449else
7450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7451$as_echo "no" >&6; }
7452fi
7453
7454
7455  test -n "$ECHO" && break
7456done
7457
7458    else
7459      # If it succeeded, then it was overridden by the user. We will use it
7460      # for the tool.
7461
7462      # First remove it from the list of overridden variables, so we can test
7463      # for unknown variables in the end.
7464      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7465
7466      # Check if we try to supply an empty value
7467      if test "x$ECHO" = x; then
7468        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7469$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7470        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7471$as_echo_n "checking for ECHO... " >&6; }
7472        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7473$as_echo "disabled" >&6; }
7474      else
7475        # Check if the provided tool contains a complete path.
7476        tool_specified="$ECHO"
7477        tool_basename="${tool_specified##*/}"
7478        if test "x$tool_basename" = "x$tool_specified"; then
7479          # A command without a complete path is provided, search $PATH.
7480          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7481$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7482          # Extract the first word of "$tool_basename", so it can be a program name with args.
7483set dummy $tool_basename; ac_word=$2
7484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7485$as_echo_n "checking for $ac_word... " >&6; }
7486if ${ac_cv_path_ECHO+:} false; then :
7487  $as_echo_n "(cached) " >&6
7488else
7489  case $ECHO in
7490  [\\/]* | ?:[\\/]*)
7491  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7492  ;;
7493  *)
7494  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7495for as_dir in $PATH
7496do
7497  IFS=$as_save_IFS
7498  test -z "$as_dir" && as_dir=.
7499    for ac_exec_ext in '' $ac_executable_extensions; do
7500  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7501    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7502    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7503    break 2
7504  fi
7505done
7506  done
7507IFS=$as_save_IFS
7508
7509  ;;
7510esac
7511fi
7512ECHO=$ac_cv_path_ECHO
7513if test -n "$ECHO"; then
7514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7515$as_echo "$ECHO" >&6; }
7516else
7517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7518$as_echo "no" >&6; }
7519fi
7520
7521
7522          if test "x$ECHO" = x; then
7523            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7524          fi
7525        else
7526          # Otherwise we believe it is a complete path. Use it as it is.
7527          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7528$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7529          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7530$as_echo_n "checking for ECHO... " >&6; }
7531          if test ! -x "$tool_specified"; then
7532            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7533$as_echo "not found" >&6; }
7534            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7535          fi
7536          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7537$as_echo "$tool_specified" >&6; }
7538        fi
7539      fi
7540    fi
7541
7542  fi
7543
7544
7545
7546  if test "x$ECHO" = x; then
7547    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7548  fi
7549
7550
7551
7552
7553
7554  # Publish this variable in the help.
7555
7556
7557  if [ -z "${EXPR+x}" ]; then
7558    # The variable is not set by user, try to locate tool using the code snippet
7559    for ac_prog in expr
7560do
7561  # Extract the first word of "$ac_prog", so it can be a program name with args.
7562set dummy $ac_prog; ac_word=$2
7563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7564$as_echo_n "checking for $ac_word... " >&6; }
7565if ${ac_cv_path_EXPR+:} false; then :
7566  $as_echo_n "(cached) " >&6
7567else
7568  case $EXPR in
7569  [\\/]* | ?:[\\/]*)
7570  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7571  ;;
7572  *)
7573  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7574for as_dir in $PATH
7575do
7576  IFS=$as_save_IFS
7577  test -z "$as_dir" && as_dir=.
7578    for ac_exec_ext in '' $ac_executable_extensions; do
7579  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7580    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7581    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7582    break 2
7583  fi
7584done
7585  done
7586IFS=$as_save_IFS
7587
7588  ;;
7589esac
7590fi
7591EXPR=$ac_cv_path_EXPR
7592if test -n "$EXPR"; then
7593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7594$as_echo "$EXPR" >&6; }
7595else
7596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7597$as_echo "no" >&6; }
7598fi
7599
7600
7601  test -n "$EXPR" && break
7602done
7603
7604  else
7605    # The variable is set, but is it from the command line or the environment?
7606
7607    # Try to remove the string !EXPR! from our list.
7608    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7609    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7610      # If it failed, the variable was not from the command line. Ignore it,
7611      # but warn the user (except for BASH, which is always set by the calling BASH).
7612      if test "xEXPR" != xBASH; then
7613        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7614$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7615      fi
7616      # Try to locate tool using the code snippet
7617      for ac_prog in expr
7618do
7619  # Extract the first word of "$ac_prog", so it can be a program name with args.
7620set dummy $ac_prog; ac_word=$2
7621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7622$as_echo_n "checking for $ac_word... " >&6; }
7623if ${ac_cv_path_EXPR+:} false; then :
7624  $as_echo_n "(cached) " >&6
7625else
7626  case $EXPR in
7627  [\\/]* | ?:[\\/]*)
7628  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7629  ;;
7630  *)
7631  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7632for as_dir in $PATH
7633do
7634  IFS=$as_save_IFS
7635  test -z "$as_dir" && as_dir=.
7636    for ac_exec_ext in '' $ac_executable_extensions; do
7637  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7638    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7639    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7640    break 2
7641  fi
7642done
7643  done
7644IFS=$as_save_IFS
7645
7646  ;;
7647esac
7648fi
7649EXPR=$ac_cv_path_EXPR
7650if test -n "$EXPR"; then
7651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7652$as_echo "$EXPR" >&6; }
7653else
7654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7655$as_echo "no" >&6; }
7656fi
7657
7658
7659  test -n "$EXPR" && break
7660done
7661
7662    else
7663      # If it succeeded, then it was overridden by the user. We will use it
7664      # for the tool.
7665
7666      # First remove it from the list of overridden variables, so we can test
7667      # for unknown variables in the end.
7668      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7669
7670      # Check if we try to supply an empty value
7671      if test "x$EXPR" = x; then
7672        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7673$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7674        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7675$as_echo_n "checking for EXPR... " >&6; }
7676        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7677$as_echo "disabled" >&6; }
7678      else
7679        # Check if the provided tool contains a complete path.
7680        tool_specified="$EXPR"
7681        tool_basename="${tool_specified##*/}"
7682        if test "x$tool_basename" = "x$tool_specified"; then
7683          # A command without a complete path is provided, search $PATH.
7684          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7685$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7686          # Extract the first word of "$tool_basename", so it can be a program name with args.
7687set dummy $tool_basename; ac_word=$2
7688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7689$as_echo_n "checking for $ac_word... " >&6; }
7690if ${ac_cv_path_EXPR+:} false; then :
7691  $as_echo_n "(cached) " >&6
7692else
7693  case $EXPR in
7694  [\\/]* | ?:[\\/]*)
7695  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7696  ;;
7697  *)
7698  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7699for as_dir in $PATH
7700do
7701  IFS=$as_save_IFS
7702  test -z "$as_dir" && as_dir=.
7703    for ac_exec_ext in '' $ac_executable_extensions; do
7704  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7705    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7706    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7707    break 2
7708  fi
7709done
7710  done
7711IFS=$as_save_IFS
7712
7713  ;;
7714esac
7715fi
7716EXPR=$ac_cv_path_EXPR
7717if test -n "$EXPR"; then
7718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7719$as_echo "$EXPR" >&6; }
7720else
7721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7722$as_echo "no" >&6; }
7723fi
7724
7725
7726          if test "x$EXPR" = x; then
7727            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7728          fi
7729        else
7730          # Otherwise we believe it is a complete path. Use it as it is.
7731          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7732$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7733          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7734$as_echo_n "checking for EXPR... " >&6; }
7735          if test ! -x "$tool_specified"; then
7736            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7737$as_echo "not found" >&6; }
7738            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7739          fi
7740          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7741$as_echo "$tool_specified" >&6; }
7742        fi
7743      fi
7744    fi
7745
7746  fi
7747
7748
7749
7750  if test "x$EXPR" = x; then
7751    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7752  fi
7753
7754
7755
7756
7757
7758  # Publish this variable in the help.
7759
7760
7761  if [ -z "${FILE+x}" ]; then
7762    # The variable is not set by user, try to locate tool using the code snippet
7763    for ac_prog in file
7764do
7765  # Extract the first word of "$ac_prog", so it can be a program name with args.
7766set dummy $ac_prog; ac_word=$2
7767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7768$as_echo_n "checking for $ac_word... " >&6; }
7769if ${ac_cv_path_FILE+:} false; then :
7770  $as_echo_n "(cached) " >&6
7771else
7772  case $FILE in
7773  [\\/]* | ?:[\\/]*)
7774  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7775  ;;
7776  *)
7777  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7778for as_dir in $PATH
7779do
7780  IFS=$as_save_IFS
7781  test -z "$as_dir" && as_dir=.
7782    for ac_exec_ext in '' $ac_executable_extensions; do
7783  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7784    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7785    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7786    break 2
7787  fi
7788done
7789  done
7790IFS=$as_save_IFS
7791
7792  ;;
7793esac
7794fi
7795FILE=$ac_cv_path_FILE
7796if test -n "$FILE"; then
7797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7798$as_echo "$FILE" >&6; }
7799else
7800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7801$as_echo "no" >&6; }
7802fi
7803
7804
7805  test -n "$FILE" && break
7806done
7807
7808  else
7809    # The variable is set, but is it from the command line or the environment?
7810
7811    # Try to remove the string !FILE! from our list.
7812    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7813    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7814      # If it failed, the variable was not from the command line. Ignore it,
7815      # but warn the user (except for BASH, which is always set by the calling BASH).
7816      if test "xFILE" != xBASH; then
7817        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7818$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7819      fi
7820      # Try to locate tool using the code snippet
7821      for ac_prog in file
7822do
7823  # Extract the first word of "$ac_prog", so it can be a program name with args.
7824set dummy $ac_prog; ac_word=$2
7825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7826$as_echo_n "checking for $ac_word... " >&6; }
7827if ${ac_cv_path_FILE+:} false; then :
7828  $as_echo_n "(cached) " >&6
7829else
7830  case $FILE in
7831  [\\/]* | ?:[\\/]*)
7832  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7833  ;;
7834  *)
7835  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7836for as_dir in $PATH
7837do
7838  IFS=$as_save_IFS
7839  test -z "$as_dir" && as_dir=.
7840    for ac_exec_ext in '' $ac_executable_extensions; do
7841  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7842    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7843    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7844    break 2
7845  fi
7846done
7847  done
7848IFS=$as_save_IFS
7849
7850  ;;
7851esac
7852fi
7853FILE=$ac_cv_path_FILE
7854if test -n "$FILE"; then
7855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7856$as_echo "$FILE" >&6; }
7857else
7858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7859$as_echo "no" >&6; }
7860fi
7861
7862
7863  test -n "$FILE" && break
7864done
7865
7866    else
7867      # If it succeeded, then it was overridden by the user. We will use it
7868      # for the tool.
7869
7870      # First remove it from the list of overridden variables, so we can test
7871      # for unknown variables in the end.
7872      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7873
7874      # Check if we try to supply an empty value
7875      if test "x$FILE" = x; then
7876        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7877$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7878        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7879$as_echo_n "checking for FILE... " >&6; }
7880        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7881$as_echo "disabled" >&6; }
7882      else
7883        # Check if the provided tool contains a complete path.
7884        tool_specified="$FILE"
7885        tool_basename="${tool_specified##*/}"
7886        if test "x$tool_basename" = "x$tool_specified"; then
7887          # A command without a complete path is provided, search $PATH.
7888          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7889$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7890          # Extract the first word of "$tool_basename", so it can be a program name with args.
7891set dummy $tool_basename; ac_word=$2
7892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7893$as_echo_n "checking for $ac_word... " >&6; }
7894if ${ac_cv_path_FILE+:} false; then :
7895  $as_echo_n "(cached) " >&6
7896else
7897  case $FILE in
7898  [\\/]* | ?:[\\/]*)
7899  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7900  ;;
7901  *)
7902  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7903for as_dir in $PATH
7904do
7905  IFS=$as_save_IFS
7906  test -z "$as_dir" && as_dir=.
7907    for ac_exec_ext in '' $ac_executable_extensions; do
7908  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7909    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7910    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7911    break 2
7912  fi
7913done
7914  done
7915IFS=$as_save_IFS
7916
7917  ;;
7918esac
7919fi
7920FILE=$ac_cv_path_FILE
7921if test -n "$FILE"; then
7922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7923$as_echo "$FILE" >&6; }
7924else
7925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7926$as_echo "no" >&6; }
7927fi
7928
7929
7930          if test "x$FILE" = x; then
7931            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7932          fi
7933        else
7934          # Otherwise we believe it is a complete path. Use it as it is.
7935          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7936$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7937          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7938$as_echo_n "checking for FILE... " >&6; }
7939          if test ! -x "$tool_specified"; then
7940            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7941$as_echo "not found" >&6; }
7942            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7943          fi
7944          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7945$as_echo "$tool_specified" >&6; }
7946        fi
7947      fi
7948    fi
7949
7950  fi
7951
7952
7953
7954  if test "x$FILE" = x; then
7955    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7956  fi
7957
7958
7959
7960
7961
7962  # Publish this variable in the help.
7963
7964
7965  if [ -z "${FIND+x}" ]; then
7966    # The variable is not set by user, try to locate tool using the code snippet
7967    for ac_prog in find
7968do
7969  # Extract the first word of "$ac_prog", so it can be a program name with args.
7970set dummy $ac_prog; ac_word=$2
7971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7972$as_echo_n "checking for $ac_word... " >&6; }
7973if ${ac_cv_path_FIND+:} false; then :
7974  $as_echo_n "(cached) " >&6
7975else
7976  case $FIND in
7977  [\\/]* | ?:[\\/]*)
7978  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7979  ;;
7980  *)
7981  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7982for as_dir in $PATH
7983do
7984  IFS=$as_save_IFS
7985  test -z "$as_dir" && as_dir=.
7986    for ac_exec_ext in '' $ac_executable_extensions; do
7987  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7988    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7989    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7990    break 2
7991  fi
7992done
7993  done
7994IFS=$as_save_IFS
7995
7996  ;;
7997esac
7998fi
7999FIND=$ac_cv_path_FIND
8000if test -n "$FIND"; then
8001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8002$as_echo "$FIND" >&6; }
8003else
8004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8005$as_echo "no" >&6; }
8006fi
8007
8008
8009  test -n "$FIND" && break
8010done
8011
8012  else
8013    # The variable is set, but is it from the command line or the environment?
8014
8015    # Try to remove the string !FIND! from our list.
8016    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8017    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8018      # If it failed, the variable was not from the command line. Ignore it,
8019      # but warn the user (except for BASH, which is always set by the calling BASH).
8020      if test "xFIND" != xBASH; then
8021        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8022$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8023      fi
8024      # Try to locate tool using the code snippet
8025      for ac_prog in find
8026do
8027  # Extract the first word of "$ac_prog", so it can be a program name with args.
8028set dummy $ac_prog; ac_word=$2
8029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8030$as_echo_n "checking for $ac_word... " >&6; }
8031if ${ac_cv_path_FIND+:} false; then :
8032  $as_echo_n "(cached) " >&6
8033else
8034  case $FIND in
8035  [\\/]* | ?:[\\/]*)
8036  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8037  ;;
8038  *)
8039  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8040for as_dir in $PATH
8041do
8042  IFS=$as_save_IFS
8043  test -z "$as_dir" && as_dir=.
8044    for ac_exec_ext in '' $ac_executable_extensions; do
8045  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8046    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8047    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8048    break 2
8049  fi
8050done
8051  done
8052IFS=$as_save_IFS
8053
8054  ;;
8055esac
8056fi
8057FIND=$ac_cv_path_FIND
8058if test -n "$FIND"; then
8059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8060$as_echo "$FIND" >&6; }
8061else
8062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8063$as_echo "no" >&6; }
8064fi
8065
8066
8067  test -n "$FIND" && break
8068done
8069
8070    else
8071      # If it succeeded, then it was overridden by the user. We will use it
8072      # for the tool.
8073
8074      # First remove it from the list of overridden variables, so we can test
8075      # for unknown variables in the end.
8076      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8077
8078      # Check if we try to supply an empty value
8079      if test "x$FIND" = x; then
8080        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8081$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8082        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8083$as_echo_n "checking for FIND... " >&6; }
8084        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8085$as_echo "disabled" >&6; }
8086      else
8087        # Check if the provided tool contains a complete path.
8088        tool_specified="$FIND"
8089        tool_basename="${tool_specified##*/}"
8090        if test "x$tool_basename" = "x$tool_specified"; then
8091          # A command without a complete path is provided, search $PATH.
8092          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8093$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8094          # Extract the first word of "$tool_basename", so it can be a program name with args.
8095set dummy $tool_basename; ac_word=$2
8096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8097$as_echo_n "checking for $ac_word... " >&6; }
8098if ${ac_cv_path_FIND+:} false; then :
8099  $as_echo_n "(cached) " >&6
8100else
8101  case $FIND in
8102  [\\/]* | ?:[\\/]*)
8103  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8104  ;;
8105  *)
8106  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8107for as_dir in $PATH
8108do
8109  IFS=$as_save_IFS
8110  test -z "$as_dir" && as_dir=.
8111    for ac_exec_ext in '' $ac_executable_extensions; do
8112  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8113    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8114    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8115    break 2
8116  fi
8117done
8118  done
8119IFS=$as_save_IFS
8120
8121  ;;
8122esac
8123fi
8124FIND=$ac_cv_path_FIND
8125if test -n "$FIND"; then
8126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8127$as_echo "$FIND" >&6; }
8128else
8129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8130$as_echo "no" >&6; }
8131fi
8132
8133
8134          if test "x$FIND" = x; then
8135            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8136          fi
8137        else
8138          # Otherwise we believe it is a complete path. Use it as it is.
8139          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8140$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8141          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8142$as_echo_n "checking for FIND... " >&6; }
8143          if test ! -x "$tool_specified"; then
8144            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8145$as_echo "not found" >&6; }
8146            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8147          fi
8148          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8149$as_echo "$tool_specified" >&6; }
8150        fi
8151      fi
8152    fi
8153
8154  fi
8155
8156
8157
8158  if test "x$FIND" = x; then
8159    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8160  fi
8161
8162
8163
8164
8165
8166  # Publish this variable in the help.
8167
8168
8169  if [ -z "${HEAD+x}" ]; then
8170    # The variable is not set by user, try to locate tool using the code snippet
8171    for ac_prog in head
8172do
8173  # Extract the first word of "$ac_prog", so it can be a program name with args.
8174set dummy $ac_prog; ac_word=$2
8175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8176$as_echo_n "checking for $ac_word... " >&6; }
8177if ${ac_cv_path_HEAD+:} false; then :
8178  $as_echo_n "(cached) " >&6
8179else
8180  case $HEAD in
8181  [\\/]* | ?:[\\/]*)
8182  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8183  ;;
8184  *)
8185  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8186for as_dir in $PATH
8187do
8188  IFS=$as_save_IFS
8189  test -z "$as_dir" && as_dir=.
8190    for ac_exec_ext in '' $ac_executable_extensions; do
8191  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8192    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8193    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8194    break 2
8195  fi
8196done
8197  done
8198IFS=$as_save_IFS
8199
8200  ;;
8201esac
8202fi
8203HEAD=$ac_cv_path_HEAD
8204if test -n "$HEAD"; then
8205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8206$as_echo "$HEAD" >&6; }
8207else
8208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8209$as_echo "no" >&6; }
8210fi
8211
8212
8213  test -n "$HEAD" && break
8214done
8215
8216  else
8217    # The variable is set, but is it from the command line or the environment?
8218
8219    # Try to remove the string !HEAD! from our list.
8220    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8221    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8222      # If it failed, the variable was not from the command line. Ignore it,
8223      # but warn the user (except for BASH, which is always set by the calling BASH).
8224      if test "xHEAD" != xBASH; then
8225        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8226$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8227      fi
8228      # Try to locate tool using the code snippet
8229      for ac_prog in head
8230do
8231  # Extract the first word of "$ac_prog", so it can be a program name with args.
8232set dummy $ac_prog; ac_word=$2
8233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8234$as_echo_n "checking for $ac_word... " >&6; }
8235if ${ac_cv_path_HEAD+:} false; then :
8236  $as_echo_n "(cached) " >&6
8237else
8238  case $HEAD in
8239  [\\/]* | ?:[\\/]*)
8240  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8241  ;;
8242  *)
8243  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8244for as_dir in $PATH
8245do
8246  IFS=$as_save_IFS
8247  test -z "$as_dir" && as_dir=.
8248    for ac_exec_ext in '' $ac_executable_extensions; do
8249  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8250    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8251    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8252    break 2
8253  fi
8254done
8255  done
8256IFS=$as_save_IFS
8257
8258  ;;
8259esac
8260fi
8261HEAD=$ac_cv_path_HEAD
8262if test -n "$HEAD"; then
8263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8264$as_echo "$HEAD" >&6; }
8265else
8266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8267$as_echo "no" >&6; }
8268fi
8269
8270
8271  test -n "$HEAD" && break
8272done
8273
8274    else
8275      # If it succeeded, then it was overridden by the user. We will use it
8276      # for the tool.
8277
8278      # First remove it from the list of overridden variables, so we can test
8279      # for unknown variables in the end.
8280      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8281
8282      # Check if we try to supply an empty value
8283      if test "x$HEAD" = x; then
8284        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8285$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8286        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8287$as_echo_n "checking for HEAD... " >&6; }
8288        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8289$as_echo "disabled" >&6; }
8290      else
8291        # Check if the provided tool contains a complete path.
8292        tool_specified="$HEAD"
8293        tool_basename="${tool_specified##*/}"
8294        if test "x$tool_basename" = "x$tool_specified"; then
8295          # A command without a complete path is provided, search $PATH.
8296          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8297$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8298          # Extract the first word of "$tool_basename", so it can be a program name with args.
8299set dummy $tool_basename; ac_word=$2
8300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8301$as_echo_n "checking for $ac_word... " >&6; }
8302if ${ac_cv_path_HEAD+:} false; then :
8303  $as_echo_n "(cached) " >&6
8304else
8305  case $HEAD in
8306  [\\/]* | ?:[\\/]*)
8307  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8308  ;;
8309  *)
8310  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8311for as_dir in $PATH
8312do
8313  IFS=$as_save_IFS
8314  test -z "$as_dir" && as_dir=.
8315    for ac_exec_ext in '' $ac_executable_extensions; do
8316  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8317    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8318    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8319    break 2
8320  fi
8321done
8322  done
8323IFS=$as_save_IFS
8324
8325  ;;
8326esac
8327fi
8328HEAD=$ac_cv_path_HEAD
8329if test -n "$HEAD"; then
8330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8331$as_echo "$HEAD" >&6; }
8332else
8333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8334$as_echo "no" >&6; }
8335fi
8336
8337
8338          if test "x$HEAD" = x; then
8339            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8340          fi
8341        else
8342          # Otherwise we believe it is a complete path. Use it as it is.
8343          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8344$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8345          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8346$as_echo_n "checking for HEAD... " >&6; }
8347          if test ! -x "$tool_specified"; then
8348            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8349$as_echo "not found" >&6; }
8350            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8351          fi
8352          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8353$as_echo "$tool_specified" >&6; }
8354        fi
8355      fi
8356    fi
8357
8358  fi
8359
8360
8361
8362  if test "x$HEAD" = x; then
8363    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8364  fi
8365
8366
8367
8368
8369
8370  # Publish this variable in the help.
8371
8372
8373  if [ -z "${LN+x}" ]; then
8374    # The variable is not set by user, try to locate tool using the code snippet
8375    for ac_prog in ln
8376do
8377  # Extract the first word of "$ac_prog", so it can be a program name with args.
8378set dummy $ac_prog; ac_word=$2
8379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8380$as_echo_n "checking for $ac_word... " >&6; }
8381if ${ac_cv_path_LN+:} false; then :
8382  $as_echo_n "(cached) " >&6
8383else
8384  case $LN in
8385  [\\/]* | ?:[\\/]*)
8386  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8387  ;;
8388  *)
8389  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8390for as_dir in $PATH
8391do
8392  IFS=$as_save_IFS
8393  test -z "$as_dir" && as_dir=.
8394    for ac_exec_ext in '' $ac_executable_extensions; do
8395  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8396    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8397    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8398    break 2
8399  fi
8400done
8401  done
8402IFS=$as_save_IFS
8403
8404  ;;
8405esac
8406fi
8407LN=$ac_cv_path_LN
8408if test -n "$LN"; then
8409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8410$as_echo "$LN" >&6; }
8411else
8412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8413$as_echo "no" >&6; }
8414fi
8415
8416
8417  test -n "$LN" && break
8418done
8419
8420  else
8421    # The variable is set, but is it from the command line or the environment?
8422
8423    # Try to remove the string !LN! from our list.
8424    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8425    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8426      # If it failed, the variable was not from the command line. Ignore it,
8427      # but warn the user (except for BASH, which is always set by the calling BASH).
8428      if test "xLN" != xBASH; then
8429        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8430$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8431      fi
8432      # Try to locate tool using the code snippet
8433      for ac_prog in ln
8434do
8435  # Extract the first word of "$ac_prog", so it can be a program name with args.
8436set dummy $ac_prog; ac_word=$2
8437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8438$as_echo_n "checking for $ac_word... " >&6; }
8439if ${ac_cv_path_LN+:} false; then :
8440  $as_echo_n "(cached) " >&6
8441else
8442  case $LN in
8443  [\\/]* | ?:[\\/]*)
8444  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8445  ;;
8446  *)
8447  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8448for as_dir in $PATH
8449do
8450  IFS=$as_save_IFS
8451  test -z "$as_dir" && as_dir=.
8452    for ac_exec_ext in '' $ac_executable_extensions; do
8453  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8454    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8455    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8456    break 2
8457  fi
8458done
8459  done
8460IFS=$as_save_IFS
8461
8462  ;;
8463esac
8464fi
8465LN=$ac_cv_path_LN
8466if test -n "$LN"; then
8467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8468$as_echo "$LN" >&6; }
8469else
8470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8471$as_echo "no" >&6; }
8472fi
8473
8474
8475  test -n "$LN" && break
8476done
8477
8478    else
8479      # If it succeeded, then it was overridden by the user. We will use it
8480      # for the tool.
8481
8482      # First remove it from the list of overridden variables, so we can test
8483      # for unknown variables in the end.
8484      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8485
8486      # Check if we try to supply an empty value
8487      if test "x$LN" = x; then
8488        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8489$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8490        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8491$as_echo_n "checking for LN... " >&6; }
8492        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8493$as_echo "disabled" >&6; }
8494      else
8495        # Check if the provided tool contains a complete path.
8496        tool_specified="$LN"
8497        tool_basename="${tool_specified##*/}"
8498        if test "x$tool_basename" = "x$tool_specified"; then
8499          # A command without a complete path is provided, search $PATH.
8500          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8501$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8502          # Extract the first word of "$tool_basename", so it can be a program name with args.
8503set dummy $tool_basename; ac_word=$2
8504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8505$as_echo_n "checking for $ac_word... " >&6; }
8506if ${ac_cv_path_LN+:} false; then :
8507  $as_echo_n "(cached) " >&6
8508else
8509  case $LN in
8510  [\\/]* | ?:[\\/]*)
8511  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8512  ;;
8513  *)
8514  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8515for as_dir in $PATH
8516do
8517  IFS=$as_save_IFS
8518  test -z "$as_dir" && as_dir=.
8519    for ac_exec_ext in '' $ac_executable_extensions; do
8520  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8521    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8522    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8523    break 2
8524  fi
8525done
8526  done
8527IFS=$as_save_IFS
8528
8529  ;;
8530esac
8531fi
8532LN=$ac_cv_path_LN
8533if test -n "$LN"; then
8534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8535$as_echo "$LN" >&6; }
8536else
8537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8538$as_echo "no" >&6; }
8539fi
8540
8541
8542          if test "x$LN" = x; then
8543            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8544          fi
8545        else
8546          # Otherwise we believe it is a complete path. Use it as it is.
8547          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
8548$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
8549          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8550$as_echo_n "checking for LN... " >&6; }
8551          if test ! -x "$tool_specified"; then
8552            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8553$as_echo "not found" >&6; }
8554            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
8555          fi
8556          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8557$as_echo "$tool_specified" >&6; }
8558        fi
8559      fi
8560    fi
8561
8562  fi
8563
8564
8565
8566  if test "x$LN" = x; then
8567    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
8568  fi
8569
8570
8571
8572
8573
8574  # Publish this variable in the help.
8575
8576
8577  if [ -z "${LS+x}" ]; then
8578    # The variable is not set by user, try to locate tool using the code snippet
8579    for ac_prog in ls
8580do
8581  # Extract the first word of "$ac_prog", so it can be a program name with args.
8582set dummy $ac_prog; ac_word=$2
8583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8584$as_echo_n "checking for $ac_word... " >&6; }
8585if ${ac_cv_path_LS+:} false; then :
8586  $as_echo_n "(cached) " >&6
8587else
8588  case $LS in
8589  [\\/]* | ?:[\\/]*)
8590  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8591  ;;
8592  *)
8593  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8594for as_dir in $PATH
8595do
8596  IFS=$as_save_IFS
8597  test -z "$as_dir" && as_dir=.
8598    for ac_exec_ext in '' $ac_executable_extensions; do
8599  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8600    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8601    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8602    break 2
8603  fi
8604done
8605  done
8606IFS=$as_save_IFS
8607
8608  ;;
8609esac
8610fi
8611LS=$ac_cv_path_LS
8612if test -n "$LS"; then
8613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8614$as_echo "$LS" >&6; }
8615else
8616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8617$as_echo "no" >&6; }
8618fi
8619
8620
8621  test -n "$LS" && break
8622done
8623
8624  else
8625    # The variable is set, but is it from the command line or the environment?
8626
8627    # Try to remove the string !LS! from our list.
8628    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
8629    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8630      # If it failed, the variable was not from the command line. Ignore it,
8631      # but warn the user (except for BASH, which is always set by the calling BASH).
8632      if test "xLS" != xBASH; then
8633        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
8634$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
8635      fi
8636      # Try to locate tool using the code snippet
8637      for ac_prog in ls
8638do
8639  # Extract the first word of "$ac_prog", so it can be a program name with args.
8640set dummy $ac_prog; ac_word=$2
8641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8642$as_echo_n "checking for $ac_word... " >&6; }
8643if ${ac_cv_path_LS+:} false; then :
8644  $as_echo_n "(cached) " >&6
8645else
8646  case $LS in
8647  [\\/]* | ?:[\\/]*)
8648  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8649  ;;
8650  *)
8651  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8652for as_dir in $PATH
8653do
8654  IFS=$as_save_IFS
8655  test -z "$as_dir" && as_dir=.
8656    for ac_exec_ext in '' $ac_executable_extensions; do
8657  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8658    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8659    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8660    break 2
8661  fi
8662done
8663  done
8664IFS=$as_save_IFS
8665
8666  ;;
8667esac
8668fi
8669LS=$ac_cv_path_LS
8670if test -n "$LS"; then
8671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8672$as_echo "$LS" >&6; }
8673else
8674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8675$as_echo "no" >&6; }
8676fi
8677
8678
8679  test -n "$LS" && break
8680done
8681
8682    else
8683      # If it succeeded, then it was overridden by the user. We will use it
8684      # for the tool.
8685
8686      # First remove it from the list of overridden variables, so we can test
8687      # for unknown variables in the end.
8688      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8689
8690      # Check if we try to supply an empty value
8691      if test "x$LS" = x; then
8692        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
8693$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
8694        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8695$as_echo_n "checking for LS... " >&6; }
8696        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8697$as_echo "disabled" >&6; }
8698      else
8699        # Check if the provided tool contains a complete path.
8700        tool_specified="$LS"
8701        tool_basename="${tool_specified##*/}"
8702        if test "x$tool_basename" = "x$tool_specified"; then
8703          # A command without a complete path is provided, search $PATH.
8704          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
8705$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
8706          # Extract the first word of "$tool_basename", so it can be a program name with args.
8707set dummy $tool_basename; ac_word=$2
8708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8709$as_echo_n "checking for $ac_word... " >&6; }
8710if ${ac_cv_path_LS+:} false; then :
8711  $as_echo_n "(cached) " >&6
8712else
8713  case $LS in
8714  [\\/]* | ?:[\\/]*)
8715  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8716  ;;
8717  *)
8718  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8719for as_dir in $PATH
8720do
8721  IFS=$as_save_IFS
8722  test -z "$as_dir" && as_dir=.
8723    for ac_exec_ext in '' $ac_executable_extensions; do
8724  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8725    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8726    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8727    break 2
8728  fi
8729done
8730  done
8731IFS=$as_save_IFS
8732
8733  ;;
8734esac
8735fi
8736LS=$ac_cv_path_LS
8737if test -n "$LS"; then
8738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8739$as_echo "$LS" >&6; }
8740else
8741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8742$as_echo "no" >&6; }
8743fi
8744
8745
8746          if test "x$LS" = x; then
8747            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8748          fi
8749        else
8750          # Otherwise we believe it is a complete path. Use it as it is.
8751          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
8752$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
8753          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8754$as_echo_n "checking for LS... " >&6; }
8755          if test ! -x "$tool_specified"; then
8756            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8757$as_echo "not found" >&6; }
8758            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
8759          fi
8760          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8761$as_echo "$tool_specified" >&6; }
8762        fi
8763      fi
8764    fi
8765
8766  fi
8767
8768
8769
8770  if test "x$LS" = x; then
8771    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
8772  fi
8773
8774
8775
8776
8777
8778  # Publish this variable in the help.
8779
8780
8781  if [ -z "${MKDIR+x}" ]; then
8782    # The variable is not set by user, try to locate tool using the code snippet
8783    for ac_prog in mkdir
8784do
8785  # Extract the first word of "$ac_prog", so it can be a program name with args.
8786set dummy $ac_prog; ac_word=$2
8787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8788$as_echo_n "checking for $ac_word... " >&6; }
8789if ${ac_cv_path_MKDIR+:} false; then :
8790  $as_echo_n "(cached) " >&6
8791else
8792  case $MKDIR in
8793  [\\/]* | ?:[\\/]*)
8794  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8795  ;;
8796  *)
8797  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8798for as_dir in $PATH
8799do
8800  IFS=$as_save_IFS
8801  test -z "$as_dir" && as_dir=.
8802    for ac_exec_ext in '' $ac_executable_extensions; do
8803  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8804    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8805    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8806    break 2
8807  fi
8808done
8809  done
8810IFS=$as_save_IFS
8811
8812  ;;
8813esac
8814fi
8815MKDIR=$ac_cv_path_MKDIR
8816if test -n "$MKDIR"; then
8817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8818$as_echo "$MKDIR" >&6; }
8819else
8820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8821$as_echo "no" >&6; }
8822fi
8823
8824
8825  test -n "$MKDIR" && break
8826done
8827
8828  else
8829    # The variable is set, but is it from the command line or the environment?
8830
8831    # Try to remove the string !MKDIR! from our list.
8832    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
8833    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8834      # If it failed, the variable was not from the command line. Ignore it,
8835      # but warn the user (except for BASH, which is always set by the calling BASH).
8836      if test "xMKDIR" != xBASH; then
8837        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
8838$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
8839      fi
8840      # Try to locate tool using the code snippet
8841      for ac_prog in mkdir
8842do
8843  # Extract the first word of "$ac_prog", so it can be a program name with args.
8844set dummy $ac_prog; ac_word=$2
8845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8846$as_echo_n "checking for $ac_word... " >&6; }
8847if ${ac_cv_path_MKDIR+:} false; then :
8848  $as_echo_n "(cached) " >&6
8849else
8850  case $MKDIR in
8851  [\\/]* | ?:[\\/]*)
8852  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8853  ;;
8854  *)
8855  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8856for as_dir in $PATH
8857do
8858  IFS=$as_save_IFS
8859  test -z "$as_dir" && as_dir=.
8860    for ac_exec_ext in '' $ac_executable_extensions; do
8861  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8862    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8863    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8864    break 2
8865  fi
8866done
8867  done
8868IFS=$as_save_IFS
8869
8870  ;;
8871esac
8872fi
8873MKDIR=$ac_cv_path_MKDIR
8874if test -n "$MKDIR"; then
8875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8876$as_echo "$MKDIR" >&6; }
8877else
8878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8879$as_echo "no" >&6; }
8880fi
8881
8882
8883  test -n "$MKDIR" && break
8884done
8885
8886    else
8887      # If it succeeded, then it was overridden by the user. We will use it
8888      # for the tool.
8889
8890      # First remove it from the list of overridden variables, so we can test
8891      # for unknown variables in the end.
8892      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8893
8894      # Check if we try to supply an empty value
8895      if test "x$MKDIR" = x; then
8896        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
8897$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
8898        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8899$as_echo_n "checking for MKDIR... " >&6; }
8900        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8901$as_echo "disabled" >&6; }
8902      else
8903        # Check if the provided tool contains a complete path.
8904        tool_specified="$MKDIR"
8905        tool_basename="${tool_specified##*/}"
8906        if test "x$tool_basename" = "x$tool_specified"; then
8907          # A command without a complete path is provided, search $PATH.
8908          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8909$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8910          # Extract the first word of "$tool_basename", so it can be a program name with args.
8911set dummy $tool_basename; ac_word=$2
8912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8913$as_echo_n "checking for $ac_word... " >&6; }
8914if ${ac_cv_path_MKDIR+:} false; then :
8915  $as_echo_n "(cached) " >&6
8916else
8917  case $MKDIR in
8918  [\\/]* | ?:[\\/]*)
8919  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8920  ;;
8921  *)
8922  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8923for as_dir in $PATH
8924do
8925  IFS=$as_save_IFS
8926  test -z "$as_dir" && as_dir=.
8927    for ac_exec_ext in '' $ac_executable_extensions; do
8928  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8929    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8930    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8931    break 2
8932  fi
8933done
8934  done
8935IFS=$as_save_IFS
8936
8937  ;;
8938esac
8939fi
8940MKDIR=$ac_cv_path_MKDIR
8941if test -n "$MKDIR"; then
8942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8943$as_echo "$MKDIR" >&6; }
8944else
8945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8946$as_echo "no" >&6; }
8947fi
8948
8949
8950          if test "x$MKDIR" = x; then
8951            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8952          fi
8953        else
8954          # Otherwise we believe it is a complete path. Use it as it is.
8955          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8956$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8957          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8958$as_echo_n "checking for MKDIR... " >&6; }
8959          if test ! -x "$tool_specified"; then
8960            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8961$as_echo "not found" >&6; }
8962            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8963          fi
8964          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8965$as_echo "$tool_specified" >&6; }
8966        fi
8967      fi
8968    fi
8969
8970  fi
8971
8972
8973
8974  if test "x$MKDIR" = x; then
8975    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8976  fi
8977
8978
8979
8980
8981
8982  # Publish this variable in the help.
8983
8984
8985  if [ -z "${MKTEMP+x}" ]; then
8986    # The variable is not set by user, try to locate tool using the code snippet
8987    for ac_prog in mktemp
8988do
8989  # Extract the first word of "$ac_prog", so it can be a program name with args.
8990set dummy $ac_prog; ac_word=$2
8991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8992$as_echo_n "checking for $ac_word... " >&6; }
8993if ${ac_cv_path_MKTEMP+:} false; then :
8994  $as_echo_n "(cached) " >&6
8995else
8996  case $MKTEMP in
8997  [\\/]* | ?:[\\/]*)
8998  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8999  ;;
9000  *)
9001  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9002for as_dir in $PATH
9003do
9004  IFS=$as_save_IFS
9005  test -z "$as_dir" && as_dir=.
9006    for ac_exec_ext in '' $ac_executable_extensions; do
9007  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9008    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9009    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9010    break 2
9011  fi
9012done
9013  done
9014IFS=$as_save_IFS
9015
9016  ;;
9017esac
9018fi
9019MKTEMP=$ac_cv_path_MKTEMP
9020if test -n "$MKTEMP"; then
9021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9022$as_echo "$MKTEMP" >&6; }
9023else
9024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9025$as_echo "no" >&6; }
9026fi
9027
9028
9029  test -n "$MKTEMP" && break
9030done
9031
9032  else
9033    # The variable is set, but is it from the command line or the environment?
9034
9035    # Try to remove the string !MKTEMP! from our list.
9036    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9037    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9038      # If it failed, the variable was not from the command line. Ignore it,
9039      # but warn the user (except for BASH, which is always set by the calling BASH).
9040      if test "xMKTEMP" != xBASH; then
9041        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9042$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9043      fi
9044      # Try to locate tool using the code snippet
9045      for ac_prog in mktemp
9046do
9047  # Extract the first word of "$ac_prog", so it can be a program name with args.
9048set dummy $ac_prog; ac_word=$2
9049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9050$as_echo_n "checking for $ac_word... " >&6; }
9051if ${ac_cv_path_MKTEMP+:} false; then :
9052  $as_echo_n "(cached) " >&6
9053else
9054  case $MKTEMP in
9055  [\\/]* | ?:[\\/]*)
9056  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9057  ;;
9058  *)
9059  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9060for as_dir in $PATH
9061do
9062  IFS=$as_save_IFS
9063  test -z "$as_dir" && as_dir=.
9064    for ac_exec_ext in '' $ac_executable_extensions; do
9065  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9066    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9067    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9068    break 2
9069  fi
9070done
9071  done
9072IFS=$as_save_IFS
9073
9074  ;;
9075esac
9076fi
9077MKTEMP=$ac_cv_path_MKTEMP
9078if test -n "$MKTEMP"; then
9079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9080$as_echo "$MKTEMP" >&6; }
9081else
9082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9083$as_echo "no" >&6; }
9084fi
9085
9086
9087  test -n "$MKTEMP" && break
9088done
9089
9090    else
9091      # If it succeeded, then it was overridden by the user. We will use it
9092      # for the tool.
9093
9094      # First remove it from the list of overridden variables, so we can test
9095      # for unknown variables in the end.
9096      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9097
9098      # Check if we try to supply an empty value
9099      if test "x$MKTEMP" = x; then
9100        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9101$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9102        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9103$as_echo_n "checking for MKTEMP... " >&6; }
9104        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9105$as_echo "disabled" >&6; }
9106      else
9107        # Check if the provided tool contains a complete path.
9108        tool_specified="$MKTEMP"
9109        tool_basename="${tool_specified##*/}"
9110        if test "x$tool_basename" = "x$tool_specified"; then
9111          # A command without a complete path is provided, search $PATH.
9112          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9113$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9114          # Extract the first word of "$tool_basename", so it can be a program name with args.
9115set dummy $tool_basename; ac_word=$2
9116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9117$as_echo_n "checking for $ac_word... " >&6; }
9118if ${ac_cv_path_MKTEMP+:} false; then :
9119  $as_echo_n "(cached) " >&6
9120else
9121  case $MKTEMP in
9122  [\\/]* | ?:[\\/]*)
9123  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9124  ;;
9125  *)
9126  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9127for as_dir in $PATH
9128do
9129  IFS=$as_save_IFS
9130  test -z "$as_dir" && as_dir=.
9131    for ac_exec_ext in '' $ac_executable_extensions; do
9132  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9133    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9134    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9135    break 2
9136  fi
9137done
9138  done
9139IFS=$as_save_IFS
9140
9141  ;;
9142esac
9143fi
9144MKTEMP=$ac_cv_path_MKTEMP
9145if test -n "$MKTEMP"; then
9146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9147$as_echo "$MKTEMP" >&6; }
9148else
9149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9150$as_echo "no" >&6; }
9151fi
9152
9153
9154          if test "x$MKTEMP" = x; then
9155            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9156          fi
9157        else
9158          # Otherwise we believe it is a complete path. Use it as it is.
9159          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9160$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9161          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9162$as_echo_n "checking for MKTEMP... " >&6; }
9163          if test ! -x "$tool_specified"; then
9164            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9165$as_echo "not found" >&6; }
9166            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9167          fi
9168          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9169$as_echo "$tool_specified" >&6; }
9170        fi
9171      fi
9172    fi
9173
9174  fi
9175
9176
9177
9178  if test "x$MKTEMP" = x; then
9179    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9180  fi
9181
9182
9183
9184
9185
9186  # Publish this variable in the help.
9187
9188
9189  if [ -z "${MV+x}" ]; then
9190    # The variable is not set by user, try to locate tool using the code snippet
9191    for ac_prog in mv
9192do
9193  # Extract the first word of "$ac_prog", so it can be a program name with args.
9194set dummy $ac_prog; ac_word=$2
9195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9196$as_echo_n "checking for $ac_word... " >&6; }
9197if ${ac_cv_path_MV+:} false; then :
9198  $as_echo_n "(cached) " >&6
9199else
9200  case $MV in
9201  [\\/]* | ?:[\\/]*)
9202  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9203  ;;
9204  *)
9205  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9206for as_dir in $PATH
9207do
9208  IFS=$as_save_IFS
9209  test -z "$as_dir" && as_dir=.
9210    for ac_exec_ext in '' $ac_executable_extensions; do
9211  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9212    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9213    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9214    break 2
9215  fi
9216done
9217  done
9218IFS=$as_save_IFS
9219
9220  ;;
9221esac
9222fi
9223MV=$ac_cv_path_MV
9224if test -n "$MV"; then
9225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9226$as_echo "$MV" >&6; }
9227else
9228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9229$as_echo "no" >&6; }
9230fi
9231
9232
9233  test -n "$MV" && break
9234done
9235
9236  else
9237    # The variable is set, but is it from the command line or the environment?
9238
9239    # Try to remove the string !MV! from our list.
9240    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9241    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9242      # If it failed, the variable was not from the command line. Ignore it,
9243      # but warn the user (except for BASH, which is always set by the calling BASH).
9244      if test "xMV" != xBASH; then
9245        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9246$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9247      fi
9248      # Try to locate tool using the code snippet
9249      for ac_prog in mv
9250do
9251  # Extract the first word of "$ac_prog", so it can be a program name with args.
9252set dummy $ac_prog; ac_word=$2
9253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9254$as_echo_n "checking for $ac_word... " >&6; }
9255if ${ac_cv_path_MV+:} false; then :
9256  $as_echo_n "(cached) " >&6
9257else
9258  case $MV in
9259  [\\/]* | ?:[\\/]*)
9260  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9261  ;;
9262  *)
9263  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9264for as_dir in $PATH
9265do
9266  IFS=$as_save_IFS
9267  test -z "$as_dir" && as_dir=.
9268    for ac_exec_ext in '' $ac_executable_extensions; do
9269  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9270    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9271    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9272    break 2
9273  fi
9274done
9275  done
9276IFS=$as_save_IFS
9277
9278  ;;
9279esac
9280fi
9281MV=$ac_cv_path_MV
9282if test -n "$MV"; then
9283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9284$as_echo "$MV" >&6; }
9285else
9286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9287$as_echo "no" >&6; }
9288fi
9289
9290
9291  test -n "$MV" && break
9292done
9293
9294    else
9295      # If it succeeded, then it was overridden by the user. We will use it
9296      # for the tool.
9297
9298      # First remove it from the list of overridden variables, so we can test
9299      # for unknown variables in the end.
9300      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9301
9302      # Check if we try to supply an empty value
9303      if test "x$MV" = x; then
9304        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9305$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9306        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9307$as_echo_n "checking for MV... " >&6; }
9308        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9309$as_echo "disabled" >&6; }
9310      else
9311        # Check if the provided tool contains a complete path.
9312        tool_specified="$MV"
9313        tool_basename="${tool_specified##*/}"
9314        if test "x$tool_basename" = "x$tool_specified"; then
9315          # A command without a complete path is provided, search $PATH.
9316          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9317$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9318          # Extract the first word of "$tool_basename", so it can be a program name with args.
9319set dummy $tool_basename; ac_word=$2
9320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9321$as_echo_n "checking for $ac_word... " >&6; }
9322if ${ac_cv_path_MV+:} false; then :
9323  $as_echo_n "(cached) " >&6
9324else
9325  case $MV in
9326  [\\/]* | ?:[\\/]*)
9327  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9328  ;;
9329  *)
9330  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9331for as_dir in $PATH
9332do
9333  IFS=$as_save_IFS
9334  test -z "$as_dir" && as_dir=.
9335    for ac_exec_ext in '' $ac_executable_extensions; do
9336  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9337    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9338    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9339    break 2
9340  fi
9341done
9342  done
9343IFS=$as_save_IFS
9344
9345  ;;
9346esac
9347fi
9348MV=$ac_cv_path_MV
9349if test -n "$MV"; then
9350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9351$as_echo "$MV" >&6; }
9352else
9353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9354$as_echo "no" >&6; }
9355fi
9356
9357
9358          if test "x$MV" = x; then
9359            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9360          fi
9361        else
9362          # Otherwise we believe it is a complete path. Use it as it is.
9363          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9364$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9365          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9366$as_echo_n "checking for MV... " >&6; }
9367          if test ! -x "$tool_specified"; then
9368            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9369$as_echo "not found" >&6; }
9370            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9371          fi
9372          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9373$as_echo "$tool_specified" >&6; }
9374        fi
9375      fi
9376    fi
9377
9378  fi
9379
9380
9381
9382  if test "x$MV" = x; then
9383    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9384  fi
9385
9386
9387
9388
9389
9390  # Publish this variable in the help.
9391
9392
9393  if [ -z "${NAWK+x}" ]; then
9394    # The variable is not set by user, try to locate tool using the code snippet
9395    for ac_prog in nawk gawk awk
9396do
9397  # Extract the first word of "$ac_prog", so it can be a program name with args.
9398set dummy $ac_prog; ac_word=$2
9399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9400$as_echo_n "checking for $ac_word... " >&6; }
9401if ${ac_cv_path_NAWK+:} false; then :
9402  $as_echo_n "(cached) " >&6
9403else
9404  case $NAWK in
9405  [\\/]* | ?:[\\/]*)
9406  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9407  ;;
9408  *)
9409  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9410for as_dir in $PATH
9411do
9412  IFS=$as_save_IFS
9413  test -z "$as_dir" && as_dir=.
9414    for ac_exec_ext in '' $ac_executable_extensions; do
9415  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9416    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9417    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9418    break 2
9419  fi
9420done
9421  done
9422IFS=$as_save_IFS
9423
9424  ;;
9425esac
9426fi
9427NAWK=$ac_cv_path_NAWK
9428if test -n "$NAWK"; then
9429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9430$as_echo "$NAWK" >&6; }
9431else
9432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9433$as_echo "no" >&6; }
9434fi
9435
9436
9437  test -n "$NAWK" && break
9438done
9439
9440  else
9441    # The variable is set, but is it from the command line or the environment?
9442
9443    # Try to remove the string !NAWK! from our list.
9444    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9445    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9446      # If it failed, the variable was not from the command line. Ignore it,
9447      # but warn the user (except for BASH, which is always set by the calling BASH).
9448      if test "xNAWK" != xBASH; then
9449        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9450$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9451      fi
9452      # Try to locate tool using the code snippet
9453      for ac_prog in nawk gawk awk
9454do
9455  # Extract the first word of "$ac_prog", so it can be a program name with args.
9456set dummy $ac_prog; ac_word=$2
9457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9458$as_echo_n "checking for $ac_word... " >&6; }
9459if ${ac_cv_path_NAWK+:} false; then :
9460  $as_echo_n "(cached) " >&6
9461else
9462  case $NAWK in
9463  [\\/]* | ?:[\\/]*)
9464  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9465  ;;
9466  *)
9467  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9468for as_dir in $PATH
9469do
9470  IFS=$as_save_IFS
9471  test -z "$as_dir" && as_dir=.
9472    for ac_exec_ext in '' $ac_executable_extensions; do
9473  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9474    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9475    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9476    break 2
9477  fi
9478done
9479  done
9480IFS=$as_save_IFS
9481
9482  ;;
9483esac
9484fi
9485NAWK=$ac_cv_path_NAWK
9486if test -n "$NAWK"; then
9487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9488$as_echo "$NAWK" >&6; }
9489else
9490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9491$as_echo "no" >&6; }
9492fi
9493
9494
9495  test -n "$NAWK" && break
9496done
9497
9498    else
9499      # If it succeeded, then it was overridden by the user. We will use it
9500      # for the tool.
9501
9502      # First remove it from the list of overridden variables, so we can test
9503      # for unknown variables in the end.
9504      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9505
9506      # Check if we try to supply an empty value
9507      if test "x$NAWK" = x; then
9508        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9509$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9510        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9511$as_echo_n "checking for NAWK... " >&6; }
9512        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9513$as_echo "disabled" >&6; }
9514      else
9515        # Check if the provided tool contains a complete path.
9516        tool_specified="$NAWK"
9517        tool_basename="${tool_specified##*/}"
9518        if test "x$tool_basename" = "x$tool_specified"; then
9519          # A command without a complete path is provided, search $PATH.
9520          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
9521$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
9522          # Extract the first word of "$tool_basename", so it can be a program name with args.
9523set dummy $tool_basename; ac_word=$2
9524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9525$as_echo_n "checking for $ac_word... " >&6; }
9526if ${ac_cv_path_NAWK+:} false; then :
9527  $as_echo_n "(cached) " >&6
9528else
9529  case $NAWK in
9530  [\\/]* | ?:[\\/]*)
9531  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9532  ;;
9533  *)
9534  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9535for as_dir in $PATH
9536do
9537  IFS=$as_save_IFS
9538  test -z "$as_dir" && as_dir=.
9539    for ac_exec_ext in '' $ac_executable_extensions; do
9540  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9541    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9542    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9543    break 2
9544  fi
9545done
9546  done
9547IFS=$as_save_IFS
9548
9549  ;;
9550esac
9551fi
9552NAWK=$ac_cv_path_NAWK
9553if test -n "$NAWK"; then
9554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9555$as_echo "$NAWK" >&6; }
9556else
9557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9558$as_echo "no" >&6; }
9559fi
9560
9561
9562          if test "x$NAWK" = x; then
9563            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9564          fi
9565        else
9566          # Otherwise we believe it is a complete path. Use it as it is.
9567          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
9568$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
9569          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9570$as_echo_n "checking for NAWK... " >&6; }
9571          if test ! -x "$tool_specified"; then
9572            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9573$as_echo "not found" >&6; }
9574            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
9575          fi
9576          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9577$as_echo "$tool_specified" >&6; }
9578        fi
9579      fi
9580    fi
9581
9582  fi
9583
9584
9585
9586  if test "x$NAWK" = x; then
9587    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
9588  fi
9589
9590
9591
9592
9593
9594  # Publish this variable in the help.
9595
9596
9597  if [ -z "${PRINTF+x}" ]; then
9598    # The variable is not set by user, try to locate tool using the code snippet
9599    for ac_prog in printf
9600do
9601  # Extract the first word of "$ac_prog", so it can be a program name with args.
9602set dummy $ac_prog; ac_word=$2
9603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9604$as_echo_n "checking for $ac_word... " >&6; }
9605if ${ac_cv_path_PRINTF+:} false; then :
9606  $as_echo_n "(cached) " >&6
9607else
9608  case $PRINTF in
9609  [\\/]* | ?:[\\/]*)
9610  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9611  ;;
9612  *)
9613  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9614for as_dir in $PATH
9615do
9616  IFS=$as_save_IFS
9617  test -z "$as_dir" && as_dir=.
9618    for ac_exec_ext in '' $ac_executable_extensions; do
9619  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9620    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9621    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9622    break 2
9623  fi
9624done
9625  done
9626IFS=$as_save_IFS
9627
9628  ;;
9629esac
9630fi
9631PRINTF=$ac_cv_path_PRINTF
9632if test -n "$PRINTF"; then
9633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9634$as_echo "$PRINTF" >&6; }
9635else
9636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9637$as_echo "no" >&6; }
9638fi
9639
9640
9641  test -n "$PRINTF" && break
9642done
9643
9644  else
9645    # The variable is set, but is it from the command line or the environment?
9646
9647    # Try to remove the string !PRINTF! from our list.
9648    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
9649    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9650      # If it failed, the variable was not from the command line. Ignore it,
9651      # but warn the user (except for BASH, which is always set by the calling BASH).
9652      if test "xPRINTF" != xBASH; then
9653        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
9654$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
9655      fi
9656      # Try to locate tool using the code snippet
9657      for ac_prog in printf
9658do
9659  # Extract the first word of "$ac_prog", so it can be a program name with args.
9660set dummy $ac_prog; ac_word=$2
9661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9662$as_echo_n "checking for $ac_word... " >&6; }
9663if ${ac_cv_path_PRINTF+:} false; then :
9664  $as_echo_n "(cached) " >&6
9665else
9666  case $PRINTF in
9667  [\\/]* | ?:[\\/]*)
9668  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9669  ;;
9670  *)
9671  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9672for as_dir in $PATH
9673do
9674  IFS=$as_save_IFS
9675  test -z "$as_dir" && as_dir=.
9676    for ac_exec_ext in '' $ac_executable_extensions; do
9677  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9678    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9679    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9680    break 2
9681  fi
9682done
9683  done
9684IFS=$as_save_IFS
9685
9686  ;;
9687esac
9688fi
9689PRINTF=$ac_cv_path_PRINTF
9690if test -n "$PRINTF"; then
9691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9692$as_echo "$PRINTF" >&6; }
9693else
9694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9695$as_echo "no" >&6; }
9696fi
9697
9698
9699  test -n "$PRINTF" && break
9700done
9701
9702    else
9703      # If it succeeded, then it was overridden by the user. We will use it
9704      # for the tool.
9705
9706      # First remove it from the list of overridden variables, so we can test
9707      # for unknown variables in the end.
9708      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9709
9710      # Check if we try to supply an empty value
9711      if test "x$PRINTF" = x; then
9712        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
9713$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
9714        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9715$as_echo_n "checking for PRINTF... " >&6; }
9716        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9717$as_echo "disabled" >&6; }
9718      else
9719        # Check if the provided tool contains a complete path.
9720        tool_specified="$PRINTF"
9721        tool_basename="${tool_specified##*/}"
9722        if test "x$tool_basename" = "x$tool_specified"; then
9723          # A command without a complete path is provided, search $PATH.
9724          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
9725$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
9726          # Extract the first word of "$tool_basename", so it can be a program name with args.
9727set dummy $tool_basename; ac_word=$2
9728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9729$as_echo_n "checking for $ac_word... " >&6; }
9730if ${ac_cv_path_PRINTF+:} false; then :
9731  $as_echo_n "(cached) " >&6
9732else
9733  case $PRINTF in
9734  [\\/]* | ?:[\\/]*)
9735  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9736  ;;
9737  *)
9738  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9739for as_dir in $PATH
9740do
9741  IFS=$as_save_IFS
9742  test -z "$as_dir" && as_dir=.
9743    for ac_exec_ext in '' $ac_executable_extensions; do
9744  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9745    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9746    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9747    break 2
9748  fi
9749done
9750  done
9751IFS=$as_save_IFS
9752
9753  ;;
9754esac
9755fi
9756PRINTF=$ac_cv_path_PRINTF
9757if test -n "$PRINTF"; then
9758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9759$as_echo "$PRINTF" >&6; }
9760else
9761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9762$as_echo "no" >&6; }
9763fi
9764
9765
9766          if test "x$PRINTF" = x; then
9767            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9768          fi
9769        else
9770          # Otherwise we believe it is a complete path. Use it as it is.
9771          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
9772$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
9773          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9774$as_echo_n "checking for PRINTF... " >&6; }
9775          if test ! -x "$tool_specified"; then
9776            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9777$as_echo "not found" >&6; }
9778            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
9779          fi
9780          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9781$as_echo "$tool_specified" >&6; }
9782        fi
9783      fi
9784    fi
9785
9786  fi
9787
9788
9789
9790  if test "x$PRINTF" = x; then
9791    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
9792  fi
9793
9794
9795
9796
9797
9798  # Publish this variable in the help.
9799
9800
9801  if [ -z "${RM+x}" ]; then
9802    # The variable is not set by user, try to locate tool using the code snippet
9803    for ac_prog in rm
9804do
9805  # Extract the first word of "$ac_prog", so it can be a program name with args.
9806set dummy $ac_prog; ac_word=$2
9807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9808$as_echo_n "checking for $ac_word... " >&6; }
9809if ${ac_cv_path_RM+:} false; then :
9810  $as_echo_n "(cached) " >&6
9811else
9812  case $RM in
9813  [\\/]* | ?:[\\/]*)
9814  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9815  ;;
9816  *)
9817  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9818for as_dir in $PATH
9819do
9820  IFS=$as_save_IFS
9821  test -z "$as_dir" && as_dir=.
9822    for ac_exec_ext in '' $ac_executable_extensions; do
9823  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9824    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9825    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9826    break 2
9827  fi
9828done
9829  done
9830IFS=$as_save_IFS
9831
9832  ;;
9833esac
9834fi
9835RM=$ac_cv_path_RM
9836if test -n "$RM"; then
9837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9838$as_echo "$RM" >&6; }
9839else
9840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9841$as_echo "no" >&6; }
9842fi
9843
9844
9845  test -n "$RM" && break
9846done
9847
9848  else
9849    # The variable is set, but is it from the command line or the environment?
9850
9851    # Try to remove the string !RM! from our list.
9852    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
9853    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9854      # If it failed, the variable was not from the command line. Ignore it,
9855      # but warn the user (except for BASH, which is always set by the calling BASH).
9856      if test "xRM" != xBASH; then
9857        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
9858$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
9859      fi
9860      # Try to locate tool using the code snippet
9861      for ac_prog in rm
9862do
9863  # Extract the first word of "$ac_prog", so it can be a program name with args.
9864set dummy $ac_prog; ac_word=$2
9865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9866$as_echo_n "checking for $ac_word... " >&6; }
9867if ${ac_cv_path_RM+:} false; then :
9868  $as_echo_n "(cached) " >&6
9869else
9870  case $RM in
9871  [\\/]* | ?:[\\/]*)
9872  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9873  ;;
9874  *)
9875  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9876for as_dir in $PATH
9877do
9878  IFS=$as_save_IFS
9879  test -z "$as_dir" && as_dir=.
9880    for ac_exec_ext in '' $ac_executable_extensions; do
9881  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9882    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9883    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9884    break 2
9885  fi
9886done
9887  done
9888IFS=$as_save_IFS
9889
9890  ;;
9891esac
9892fi
9893RM=$ac_cv_path_RM
9894if test -n "$RM"; then
9895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9896$as_echo "$RM" >&6; }
9897else
9898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9899$as_echo "no" >&6; }
9900fi
9901
9902
9903  test -n "$RM" && break
9904done
9905
9906    else
9907      # If it succeeded, then it was overridden by the user. We will use it
9908      # for the tool.
9909
9910      # First remove it from the list of overridden variables, so we can test
9911      # for unknown variables in the end.
9912      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9913
9914      # Check if we try to supply an empty value
9915      if test "x$RM" = x; then
9916        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
9917$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
9918        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9919$as_echo_n "checking for RM... " >&6; }
9920        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9921$as_echo "disabled" >&6; }
9922      else
9923        # Check if the provided tool contains a complete path.
9924        tool_specified="$RM"
9925        tool_basename="${tool_specified##*/}"
9926        if test "x$tool_basename" = "x$tool_specified"; then
9927          # A command without a complete path is provided, search $PATH.
9928          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9929$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9930          # Extract the first word of "$tool_basename", so it can be a program name with args.
9931set dummy $tool_basename; ac_word=$2
9932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9933$as_echo_n "checking for $ac_word... " >&6; }
9934if ${ac_cv_path_RM+:} false; then :
9935  $as_echo_n "(cached) " >&6
9936else
9937  case $RM in
9938  [\\/]* | ?:[\\/]*)
9939  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9940  ;;
9941  *)
9942  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9943for as_dir in $PATH
9944do
9945  IFS=$as_save_IFS
9946  test -z "$as_dir" && as_dir=.
9947    for ac_exec_ext in '' $ac_executable_extensions; do
9948  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9949    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9950    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9951    break 2
9952  fi
9953done
9954  done
9955IFS=$as_save_IFS
9956
9957  ;;
9958esac
9959fi
9960RM=$ac_cv_path_RM
9961if test -n "$RM"; then
9962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9963$as_echo "$RM" >&6; }
9964else
9965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9966$as_echo "no" >&6; }
9967fi
9968
9969
9970          if test "x$RM" = x; then
9971            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9972          fi
9973        else
9974          # Otherwise we believe it is a complete path. Use it as it is.
9975          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9976$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9977          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9978$as_echo_n "checking for RM... " >&6; }
9979          if test ! -x "$tool_specified"; then
9980            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9981$as_echo "not found" >&6; }
9982            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9983          fi
9984          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9985$as_echo "$tool_specified" >&6; }
9986        fi
9987      fi
9988    fi
9989
9990  fi
9991
9992
9993
9994  if test "x$RM" = x; then
9995    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9996  fi
9997
9998
9999
10000
10001
10002  # Publish this variable in the help.
10003
10004
10005  if [ -z "${RMDIR+x}" ]; then
10006    # The variable is not set by user, try to locate tool using the code snippet
10007    for ac_prog in rmdir
10008do
10009  # Extract the first word of "$ac_prog", so it can be a program name with args.
10010set dummy $ac_prog; ac_word=$2
10011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10012$as_echo_n "checking for $ac_word... " >&6; }
10013if ${ac_cv_path_RMDIR+:} false; then :
10014  $as_echo_n "(cached) " >&6
10015else
10016  case $RMDIR in
10017  [\\/]* | ?:[\\/]*)
10018  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10019  ;;
10020  *)
10021  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10022for as_dir in $PATH
10023do
10024  IFS=$as_save_IFS
10025  test -z "$as_dir" && as_dir=.
10026    for ac_exec_ext in '' $ac_executable_extensions; do
10027  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10028    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10029    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10030    break 2
10031  fi
10032done
10033  done
10034IFS=$as_save_IFS
10035
10036  ;;
10037esac
10038fi
10039RMDIR=$ac_cv_path_RMDIR
10040if test -n "$RMDIR"; then
10041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10042$as_echo "$RMDIR" >&6; }
10043else
10044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10045$as_echo "no" >&6; }
10046fi
10047
10048
10049  test -n "$RMDIR" && break
10050done
10051
10052  else
10053    # The variable is set, but is it from the command line or the environment?
10054
10055    # Try to remove the string !RMDIR! from our list.
10056    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10057    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10058      # If it failed, the variable was not from the command line. Ignore it,
10059      # but warn the user (except for BASH, which is always set by the calling BASH).
10060      if test "xRMDIR" != xBASH; then
10061        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10062$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10063      fi
10064      # Try to locate tool using the code snippet
10065      for ac_prog in rmdir
10066do
10067  # Extract the first word of "$ac_prog", so it can be a program name with args.
10068set dummy $ac_prog; ac_word=$2
10069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10070$as_echo_n "checking for $ac_word... " >&6; }
10071if ${ac_cv_path_RMDIR+:} false; then :
10072  $as_echo_n "(cached) " >&6
10073else
10074  case $RMDIR in
10075  [\\/]* | ?:[\\/]*)
10076  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10077  ;;
10078  *)
10079  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10080for as_dir in $PATH
10081do
10082  IFS=$as_save_IFS
10083  test -z "$as_dir" && as_dir=.
10084    for ac_exec_ext in '' $ac_executable_extensions; do
10085  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10086    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10087    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10088    break 2
10089  fi
10090done
10091  done
10092IFS=$as_save_IFS
10093
10094  ;;
10095esac
10096fi
10097RMDIR=$ac_cv_path_RMDIR
10098if test -n "$RMDIR"; then
10099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10100$as_echo "$RMDIR" >&6; }
10101else
10102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10103$as_echo "no" >&6; }
10104fi
10105
10106
10107  test -n "$RMDIR" && break
10108done
10109
10110    else
10111      # If it succeeded, then it was overridden by the user. We will use it
10112      # for the tool.
10113
10114      # First remove it from the list of overridden variables, so we can test
10115      # for unknown variables in the end.
10116      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10117
10118      # Check if we try to supply an empty value
10119      if test "x$RMDIR" = x; then
10120        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10121$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10122        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10123$as_echo_n "checking for RMDIR... " >&6; }
10124        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10125$as_echo "disabled" >&6; }
10126      else
10127        # Check if the provided tool contains a complete path.
10128        tool_specified="$RMDIR"
10129        tool_basename="${tool_specified##*/}"
10130        if test "x$tool_basename" = "x$tool_specified"; then
10131          # A command without a complete path is provided, search $PATH.
10132          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10133$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10134          # Extract the first word of "$tool_basename", so it can be a program name with args.
10135set dummy $tool_basename; ac_word=$2
10136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10137$as_echo_n "checking for $ac_word... " >&6; }
10138if ${ac_cv_path_RMDIR+:} false; then :
10139  $as_echo_n "(cached) " >&6
10140else
10141  case $RMDIR in
10142  [\\/]* | ?:[\\/]*)
10143  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10144  ;;
10145  *)
10146  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10147for as_dir in $PATH
10148do
10149  IFS=$as_save_IFS
10150  test -z "$as_dir" && as_dir=.
10151    for ac_exec_ext in '' $ac_executable_extensions; do
10152  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10153    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10154    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10155    break 2
10156  fi
10157done
10158  done
10159IFS=$as_save_IFS
10160
10161  ;;
10162esac
10163fi
10164RMDIR=$ac_cv_path_RMDIR
10165if test -n "$RMDIR"; then
10166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10167$as_echo "$RMDIR" >&6; }
10168else
10169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10170$as_echo "no" >&6; }
10171fi
10172
10173
10174          if test "x$RMDIR" = x; then
10175            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10176          fi
10177        else
10178          # Otherwise we believe it is a complete path. Use it as it is.
10179          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10180$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10181          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10182$as_echo_n "checking for RMDIR... " >&6; }
10183          if test ! -x "$tool_specified"; then
10184            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10185$as_echo "not found" >&6; }
10186            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10187          fi
10188          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10189$as_echo "$tool_specified" >&6; }
10190        fi
10191      fi
10192    fi
10193
10194  fi
10195
10196
10197
10198  if test "x$RMDIR" = x; then
10199    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10200  fi
10201
10202
10203
10204
10205
10206  # Publish this variable in the help.
10207
10208
10209  if [ -z "${SH+x}" ]; then
10210    # The variable is not set by user, try to locate tool using the code snippet
10211    for ac_prog in sh
10212do
10213  # Extract the first word of "$ac_prog", so it can be a program name with args.
10214set dummy $ac_prog; ac_word=$2
10215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10216$as_echo_n "checking for $ac_word... " >&6; }
10217if ${ac_cv_path_SH+:} false; then :
10218  $as_echo_n "(cached) " >&6
10219else
10220  case $SH in
10221  [\\/]* | ?:[\\/]*)
10222  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10223  ;;
10224  *)
10225  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10226for as_dir in $PATH
10227do
10228  IFS=$as_save_IFS
10229  test -z "$as_dir" && as_dir=.
10230    for ac_exec_ext in '' $ac_executable_extensions; do
10231  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10232    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10233    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10234    break 2
10235  fi
10236done
10237  done
10238IFS=$as_save_IFS
10239
10240  ;;
10241esac
10242fi
10243SH=$ac_cv_path_SH
10244if test -n "$SH"; then
10245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10246$as_echo "$SH" >&6; }
10247else
10248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10249$as_echo "no" >&6; }
10250fi
10251
10252
10253  test -n "$SH" && break
10254done
10255
10256  else
10257    # The variable is set, but is it from the command line or the environment?
10258
10259    # Try to remove the string !SH! from our list.
10260    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10261    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10262      # If it failed, the variable was not from the command line. Ignore it,
10263      # but warn the user (except for BASH, which is always set by the calling BASH).
10264      if test "xSH" != xBASH; then
10265        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10266$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10267      fi
10268      # Try to locate tool using the code snippet
10269      for ac_prog in sh
10270do
10271  # Extract the first word of "$ac_prog", so it can be a program name with args.
10272set dummy $ac_prog; ac_word=$2
10273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10274$as_echo_n "checking for $ac_word... " >&6; }
10275if ${ac_cv_path_SH+:} false; then :
10276  $as_echo_n "(cached) " >&6
10277else
10278  case $SH in
10279  [\\/]* | ?:[\\/]*)
10280  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10281  ;;
10282  *)
10283  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10284for as_dir in $PATH
10285do
10286  IFS=$as_save_IFS
10287  test -z "$as_dir" && as_dir=.
10288    for ac_exec_ext in '' $ac_executable_extensions; do
10289  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10290    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10291    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10292    break 2
10293  fi
10294done
10295  done
10296IFS=$as_save_IFS
10297
10298  ;;
10299esac
10300fi
10301SH=$ac_cv_path_SH
10302if test -n "$SH"; then
10303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10304$as_echo "$SH" >&6; }
10305else
10306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10307$as_echo "no" >&6; }
10308fi
10309
10310
10311  test -n "$SH" && break
10312done
10313
10314    else
10315      # If it succeeded, then it was overridden by the user. We will use it
10316      # for the tool.
10317
10318      # First remove it from the list of overridden variables, so we can test
10319      # for unknown variables in the end.
10320      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10321
10322      # Check if we try to supply an empty value
10323      if test "x$SH" = x; then
10324        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10325$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10326        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10327$as_echo_n "checking for SH... " >&6; }
10328        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10329$as_echo "disabled" >&6; }
10330      else
10331        # Check if the provided tool contains a complete path.
10332        tool_specified="$SH"
10333        tool_basename="${tool_specified##*/}"
10334        if test "x$tool_basename" = "x$tool_specified"; then
10335          # A command without a complete path is provided, search $PATH.
10336          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10337$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10338          # Extract the first word of "$tool_basename", so it can be a program name with args.
10339set dummy $tool_basename; ac_word=$2
10340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10341$as_echo_n "checking for $ac_word... " >&6; }
10342if ${ac_cv_path_SH+:} false; then :
10343  $as_echo_n "(cached) " >&6
10344else
10345  case $SH in
10346  [\\/]* | ?:[\\/]*)
10347  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10348  ;;
10349  *)
10350  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10351for as_dir in $PATH
10352do
10353  IFS=$as_save_IFS
10354  test -z "$as_dir" && as_dir=.
10355    for ac_exec_ext in '' $ac_executable_extensions; do
10356  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10357    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10358    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10359    break 2
10360  fi
10361done
10362  done
10363IFS=$as_save_IFS
10364
10365  ;;
10366esac
10367fi
10368SH=$ac_cv_path_SH
10369if test -n "$SH"; then
10370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10371$as_echo "$SH" >&6; }
10372else
10373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10374$as_echo "no" >&6; }
10375fi
10376
10377
10378          if test "x$SH" = x; then
10379            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10380          fi
10381        else
10382          # Otherwise we believe it is a complete path. Use it as it is.
10383          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10384$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10385          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10386$as_echo_n "checking for SH... " >&6; }
10387          if test ! -x "$tool_specified"; then
10388            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10389$as_echo "not found" >&6; }
10390            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10391          fi
10392          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10393$as_echo "$tool_specified" >&6; }
10394        fi
10395      fi
10396    fi
10397
10398  fi
10399
10400
10401
10402  if test "x$SH" = x; then
10403    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10404  fi
10405
10406
10407
10408
10409
10410  # Publish this variable in the help.
10411
10412
10413  if [ -z "${SORT+x}" ]; then
10414    # The variable is not set by user, try to locate tool using the code snippet
10415    for ac_prog in sort
10416do
10417  # Extract the first word of "$ac_prog", so it can be a program name with args.
10418set dummy $ac_prog; ac_word=$2
10419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10420$as_echo_n "checking for $ac_word... " >&6; }
10421if ${ac_cv_path_SORT+:} false; then :
10422  $as_echo_n "(cached) " >&6
10423else
10424  case $SORT in
10425  [\\/]* | ?:[\\/]*)
10426  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10427  ;;
10428  *)
10429  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10430for as_dir in $PATH
10431do
10432  IFS=$as_save_IFS
10433  test -z "$as_dir" && as_dir=.
10434    for ac_exec_ext in '' $ac_executable_extensions; do
10435  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10436    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10437    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10438    break 2
10439  fi
10440done
10441  done
10442IFS=$as_save_IFS
10443
10444  ;;
10445esac
10446fi
10447SORT=$ac_cv_path_SORT
10448if test -n "$SORT"; then
10449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10450$as_echo "$SORT" >&6; }
10451else
10452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10453$as_echo "no" >&6; }
10454fi
10455
10456
10457  test -n "$SORT" && break
10458done
10459
10460  else
10461    # The variable is set, but is it from the command line or the environment?
10462
10463    # Try to remove the string !SORT! from our list.
10464    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10465    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10466      # If it failed, the variable was not from the command line. Ignore it,
10467      # but warn the user (except for BASH, which is always set by the calling BASH).
10468      if test "xSORT" != xBASH; then
10469        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10470$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10471      fi
10472      # Try to locate tool using the code snippet
10473      for ac_prog in sort
10474do
10475  # Extract the first word of "$ac_prog", so it can be a program name with args.
10476set dummy $ac_prog; ac_word=$2
10477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10478$as_echo_n "checking for $ac_word... " >&6; }
10479if ${ac_cv_path_SORT+:} false; then :
10480  $as_echo_n "(cached) " >&6
10481else
10482  case $SORT in
10483  [\\/]* | ?:[\\/]*)
10484  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10485  ;;
10486  *)
10487  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10488for as_dir in $PATH
10489do
10490  IFS=$as_save_IFS
10491  test -z "$as_dir" && as_dir=.
10492    for ac_exec_ext in '' $ac_executable_extensions; do
10493  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10494    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10495    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10496    break 2
10497  fi
10498done
10499  done
10500IFS=$as_save_IFS
10501
10502  ;;
10503esac
10504fi
10505SORT=$ac_cv_path_SORT
10506if test -n "$SORT"; then
10507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10508$as_echo "$SORT" >&6; }
10509else
10510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10511$as_echo "no" >&6; }
10512fi
10513
10514
10515  test -n "$SORT" && break
10516done
10517
10518    else
10519      # If it succeeded, then it was overridden by the user. We will use it
10520      # for the tool.
10521
10522      # First remove it from the list of overridden variables, so we can test
10523      # for unknown variables in the end.
10524      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10525
10526      # Check if we try to supply an empty value
10527      if test "x$SORT" = x; then
10528        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
10529$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
10530        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10531$as_echo_n "checking for SORT... " >&6; }
10532        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10533$as_echo "disabled" >&6; }
10534      else
10535        # Check if the provided tool contains a complete path.
10536        tool_specified="$SORT"
10537        tool_basename="${tool_specified##*/}"
10538        if test "x$tool_basename" = "x$tool_specified"; then
10539          # A command without a complete path is provided, search $PATH.
10540          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
10541$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
10542          # Extract the first word of "$tool_basename", so it can be a program name with args.
10543set dummy $tool_basename; ac_word=$2
10544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10545$as_echo_n "checking for $ac_word... " >&6; }
10546if ${ac_cv_path_SORT+:} false; then :
10547  $as_echo_n "(cached) " >&6
10548else
10549  case $SORT in
10550  [\\/]* | ?:[\\/]*)
10551  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10552  ;;
10553  *)
10554  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10555for as_dir in $PATH
10556do
10557  IFS=$as_save_IFS
10558  test -z "$as_dir" && as_dir=.
10559    for ac_exec_ext in '' $ac_executable_extensions; do
10560  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10561    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10562    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10563    break 2
10564  fi
10565done
10566  done
10567IFS=$as_save_IFS
10568
10569  ;;
10570esac
10571fi
10572SORT=$ac_cv_path_SORT
10573if test -n "$SORT"; then
10574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10575$as_echo "$SORT" >&6; }
10576else
10577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10578$as_echo "no" >&6; }
10579fi
10580
10581
10582          if test "x$SORT" = x; then
10583            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10584          fi
10585        else
10586          # Otherwise we believe it is a complete path. Use it as it is.
10587          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
10588$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
10589          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10590$as_echo_n "checking for SORT... " >&6; }
10591          if test ! -x "$tool_specified"; then
10592            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10593$as_echo "not found" >&6; }
10594            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
10595          fi
10596          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10597$as_echo "$tool_specified" >&6; }
10598        fi
10599      fi
10600    fi
10601
10602  fi
10603
10604
10605
10606  if test "x$SORT" = x; then
10607    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
10608  fi
10609
10610
10611
10612
10613
10614  # Publish this variable in the help.
10615
10616
10617  if [ -z "${TAIL+x}" ]; then
10618    # The variable is not set by user, try to locate tool using the code snippet
10619    for ac_prog in tail
10620do
10621  # Extract the first word of "$ac_prog", so it can be a program name with args.
10622set dummy $ac_prog; ac_word=$2
10623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10624$as_echo_n "checking for $ac_word... " >&6; }
10625if ${ac_cv_path_TAIL+:} false; then :
10626  $as_echo_n "(cached) " >&6
10627else
10628  case $TAIL in
10629  [\\/]* | ?:[\\/]*)
10630  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10631  ;;
10632  *)
10633  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10634for as_dir in $PATH
10635do
10636  IFS=$as_save_IFS
10637  test -z "$as_dir" && as_dir=.
10638    for ac_exec_ext in '' $ac_executable_extensions; do
10639  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10640    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10641    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10642    break 2
10643  fi
10644done
10645  done
10646IFS=$as_save_IFS
10647
10648  ;;
10649esac
10650fi
10651TAIL=$ac_cv_path_TAIL
10652if test -n "$TAIL"; then
10653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10654$as_echo "$TAIL" >&6; }
10655else
10656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10657$as_echo "no" >&6; }
10658fi
10659
10660
10661  test -n "$TAIL" && break
10662done
10663
10664  else
10665    # The variable is set, but is it from the command line or the environment?
10666
10667    # Try to remove the string !TAIL! from our list.
10668    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
10669    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10670      # If it failed, the variable was not from the command line. Ignore it,
10671      # but warn the user (except for BASH, which is always set by the calling BASH).
10672      if test "xTAIL" != xBASH; then
10673        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
10674$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
10675      fi
10676      # Try to locate tool using the code snippet
10677      for ac_prog in tail
10678do
10679  # Extract the first word of "$ac_prog", so it can be a program name with args.
10680set dummy $ac_prog; ac_word=$2
10681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10682$as_echo_n "checking for $ac_word... " >&6; }
10683if ${ac_cv_path_TAIL+:} false; then :
10684  $as_echo_n "(cached) " >&6
10685else
10686  case $TAIL in
10687  [\\/]* | ?:[\\/]*)
10688  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10689  ;;
10690  *)
10691  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10692for as_dir in $PATH
10693do
10694  IFS=$as_save_IFS
10695  test -z "$as_dir" && as_dir=.
10696    for ac_exec_ext in '' $ac_executable_extensions; do
10697  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10698    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10699    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10700    break 2
10701  fi
10702done
10703  done
10704IFS=$as_save_IFS
10705
10706  ;;
10707esac
10708fi
10709TAIL=$ac_cv_path_TAIL
10710if test -n "$TAIL"; then
10711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10712$as_echo "$TAIL" >&6; }
10713else
10714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10715$as_echo "no" >&6; }
10716fi
10717
10718
10719  test -n "$TAIL" && break
10720done
10721
10722    else
10723      # If it succeeded, then it was overridden by the user. We will use it
10724      # for the tool.
10725
10726      # First remove it from the list of overridden variables, so we can test
10727      # for unknown variables in the end.
10728      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10729
10730      # Check if we try to supply an empty value
10731      if test "x$TAIL" = x; then
10732        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
10733$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
10734        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10735$as_echo_n "checking for TAIL... " >&6; }
10736        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10737$as_echo "disabled" >&6; }
10738      else
10739        # Check if the provided tool contains a complete path.
10740        tool_specified="$TAIL"
10741        tool_basename="${tool_specified##*/}"
10742        if test "x$tool_basename" = "x$tool_specified"; then
10743          # A command without a complete path is provided, search $PATH.
10744          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
10745$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
10746          # Extract the first word of "$tool_basename", so it can be a program name with args.
10747set dummy $tool_basename; ac_word=$2
10748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10749$as_echo_n "checking for $ac_word... " >&6; }
10750if ${ac_cv_path_TAIL+:} false; then :
10751  $as_echo_n "(cached) " >&6
10752else
10753  case $TAIL in
10754  [\\/]* | ?:[\\/]*)
10755  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10756  ;;
10757  *)
10758  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10759for as_dir in $PATH
10760do
10761  IFS=$as_save_IFS
10762  test -z "$as_dir" && as_dir=.
10763    for ac_exec_ext in '' $ac_executable_extensions; do
10764  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10765    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10766    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10767    break 2
10768  fi
10769done
10770  done
10771IFS=$as_save_IFS
10772
10773  ;;
10774esac
10775fi
10776TAIL=$ac_cv_path_TAIL
10777if test -n "$TAIL"; then
10778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10779$as_echo "$TAIL" >&6; }
10780else
10781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10782$as_echo "no" >&6; }
10783fi
10784
10785
10786          if test "x$TAIL" = x; then
10787            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10788          fi
10789        else
10790          # Otherwise we believe it is a complete path. Use it as it is.
10791          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
10792$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
10793          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10794$as_echo_n "checking for TAIL... " >&6; }
10795          if test ! -x "$tool_specified"; then
10796            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10797$as_echo "not found" >&6; }
10798            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
10799          fi
10800          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10801$as_echo "$tool_specified" >&6; }
10802        fi
10803      fi
10804    fi
10805
10806  fi
10807
10808
10809
10810  if test "x$TAIL" = x; then
10811    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
10812  fi
10813
10814
10815
10816
10817
10818  # Publish this variable in the help.
10819
10820
10821  if [ -z "${TAR+x}" ]; then
10822    # The variable is not set by user, try to locate tool using the code snippet
10823    for ac_prog in tar
10824do
10825  # Extract the first word of "$ac_prog", so it can be a program name with args.
10826set dummy $ac_prog; ac_word=$2
10827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10828$as_echo_n "checking for $ac_word... " >&6; }
10829if ${ac_cv_path_TAR+:} false; then :
10830  $as_echo_n "(cached) " >&6
10831else
10832  case $TAR in
10833  [\\/]* | ?:[\\/]*)
10834  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10835  ;;
10836  *)
10837  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10838for as_dir in $PATH
10839do
10840  IFS=$as_save_IFS
10841  test -z "$as_dir" && as_dir=.
10842    for ac_exec_ext in '' $ac_executable_extensions; do
10843  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10844    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10845    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10846    break 2
10847  fi
10848done
10849  done
10850IFS=$as_save_IFS
10851
10852  ;;
10853esac
10854fi
10855TAR=$ac_cv_path_TAR
10856if test -n "$TAR"; then
10857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10858$as_echo "$TAR" >&6; }
10859else
10860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10861$as_echo "no" >&6; }
10862fi
10863
10864
10865  test -n "$TAR" && break
10866done
10867
10868  else
10869    # The variable is set, but is it from the command line or the environment?
10870
10871    # Try to remove the string !TAR! from our list.
10872    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
10873    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10874      # If it failed, the variable was not from the command line. Ignore it,
10875      # but warn the user (except for BASH, which is always set by the calling BASH).
10876      if test "xTAR" != xBASH; then
10877        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
10878$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
10879      fi
10880      # Try to locate tool using the code snippet
10881      for ac_prog in tar
10882do
10883  # Extract the first word of "$ac_prog", so it can be a program name with args.
10884set dummy $ac_prog; ac_word=$2
10885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10886$as_echo_n "checking for $ac_word... " >&6; }
10887if ${ac_cv_path_TAR+:} false; then :
10888  $as_echo_n "(cached) " >&6
10889else
10890  case $TAR in
10891  [\\/]* | ?:[\\/]*)
10892  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10893  ;;
10894  *)
10895  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10896for as_dir in $PATH
10897do
10898  IFS=$as_save_IFS
10899  test -z "$as_dir" && as_dir=.
10900    for ac_exec_ext in '' $ac_executable_extensions; do
10901  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10902    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10903    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10904    break 2
10905  fi
10906done
10907  done
10908IFS=$as_save_IFS
10909
10910  ;;
10911esac
10912fi
10913TAR=$ac_cv_path_TAR
10914if test -n "$TAR"; then
10915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10916$as_echo "$TAR" >&6; }
10917else
10918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10919$as_echo "no" >&6; }
10920fi
10921
10922
10923  test -n "$TAR" && break
10924done
10925
10926    else
10927      # If it succeeded, then it was overridden by the user. We will use it
10928      # for the tool.
10929
10930      # First remove it from the list of overridden variables, so we can test
10931      # for unknown variables in the end.
10932      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10933
10934      # Check if we try to supply an empty value
10935      if test "x$TAR" = x; then
10936        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
10937$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
10938        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10939$as_echo_n "checking for TAR... " >&6; }
10940        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10941$as_echo "disabled" >&6; }
10942      else
10943        # Check if the provided tool contains a complete path.
10944        tool_specified="$TAR"
10945        tool_basename="${tool_specified##*/}"
10946        if test "x$tool_basename" = "x$tool_specified"; then
10947          # A command without a complete path is provided, search $PATH.
10948          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
10949$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
10950          # Extract the first word of "$tool_basename", so it can be a program name with args.
10951set dummy $tool_basename; ac_word=$2
10952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10953$as_echo_n "checking for $ac_word... " >&6; }
10954if ${ac_cv_path_TAR+:} false; then :
10955  $as_echo_n "(cached) " >&6
10956else
10957  case $TAR in
10958  [\\/]* | ?:[\\/]*)
10959  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10960  ;;
10961  *)
10962  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10963for as_dir in $PATH
10964do
10965  IFS=$as_save_IFS
10966  test -z "$as_dir" && as_dir=.
10967    for ac_exec_ext in '' $ac_executable_extensions; do
10968  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10969    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10970    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10971    break 2
10972  fi
10973done
10974  done
10975IFS=$as_save_IFS
10976
10977  ;;
10978esac
10979fi
10980TAR=$ac_cv_path_TAR
10981if test -n "$TAR"; then
10982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10983$as_echo "$TAR" >&6; }
10984else
10985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10986$as_echo "no" >&6; }
10987fi
10988
10989
10990          if test "x$TAR" = x; then
10991            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10992          fi
10993        else
10994          # Otherwise we believe it is a complete path. Use it as it is.
10995          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
10996$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
10997          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10998$as_echo_n "checking for TAR... " >&6; }
10999          if test ! -x "$tool_specified"; then
11000            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11001$as_echo "not found" >&6; }
11002            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11003          fi
11004          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11005$as_echo "$tool_specified" >&6; }
11006        fi
11007      fi
11008    fi
11009
11010  fi
11011
11012
11013
11014  if test "x$TAR" = x; then
11015    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11016  fi
11017
11018
11019
11020
11021
11022  # Publish this variable in the help.
11023
11024
11025  if [ -z "${TEE+x}" ]; then
11026    # The variable is not set by user, try to locate tool using the code snippet
11027    for ac_prog in tee
11028do
11029  # Extract the first word of "$ac_prog", so it can be a program name with args.
11030set dummy $ac_prog; ac_word=$2
11031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11032$as_echo_n "checking for $ac_word... " >&6; }
11033if ${ac_cv_path_TEE+:} false; then :
11034  $as_echo_n "(cached) " >&6
11035else
11036  case $TEE in
11037  [\\/]* | ?:[\\/]*)
11038  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11039  ;;
11040  *)
11041  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11042for as_dir in $PATH
11043do
11044  IFS=$as_save_IFS
11045  test -z "$as_dir" && as_dir=.
11046    for ac_exec_ext in '' $ac_executable_extensions; do
11047  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11048    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11049    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11050    break 2
11051  fi
11052done
11053  done
11054IFS=$as_save_IFS
11055
11056  ;;
11057esac
11058fi
11059TEE=$ac_cv_path_TEE
11060if test -n "$TEE"; then
11061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11062$as_echo "$TEE" >&6; }
11063else
11064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11065$as_echo "no" >&6; }
11066fi
11067
11068
11069  test -n "$TEE" && break
11070done
11071
11072  else
11073    # The variable is set, but is it from the command line or the environment?
11074
11075    # Try to remove the string !TEE! from our list.
11076    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11077    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11078      # If it failed, the variable was not from the command line. Ignore it,
11079      # but warn the user (except for BASH, which is always set by the calling BASH).
11080      if test "xTEE" != xBASH; then
11081        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11082$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11083      fi
11084      # Try to locate tool using the code snippet
11085      for ac_prog in tee
11086do
11087  # Extract the first word of "$ac_prog", so it can be a program name with args.
11088set dummy $ac_prog; ac_word=$2
11089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11090$as_echo_n "checking for $ac_word... " >&6; }
11091if ${ac_cv_path_TEE+:} false; then :
11092  $as_echo_n "(cached) " >&6
11093else
11094  case $TEE in
11095  [\\/]* | ?:[\\/]*)
11096  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11097  ;;
11098  *)
11099  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11100for as_dir in $PATH
11101do
11102  IFS=$as_save_IFS
11103  test -z "$as_dir" && as_dir=.
11104    for ac_exec_ext in '' $ac_executable_extensions; do
11105  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11106    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11107    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11108    break 2
11109  fi
11110done
11111  done
11112IFS=$as_save_IFS
11113
11114  ;;
11115esac
11116fi
11117TEE=$ac_cv_path_TEE
11118if test -n "$TEE"; then
11119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11120$as_echo "$TEE" >&6; }
11121else
11122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11123$as_echo "no" >&6; }
11124fi
11125
11126
11127  test -n "$TEE" && break
11128done
11129
11130    else
11131      # If it succeeded, then it was overridden by the user. We will use it
11132      # for the tool.
11133
11134      # First remove it from the list of overridden variables, so we can test
11135      # for unknown variables in the end.
11136      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11137
11138      # Check if we try to supply an empty value
11139      if test "x$TEE" = x; then
11140        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11141$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11142        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11143$as_echo_n "checking for TEE... " >&6; }
11144        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11145$as_echo "disabled" >&6; }
11146      else
11147        # Check if the provided tool contains a complete path.
11148        tool_specified="$TEE"
11149        tool_basename="${tool_specified##*/}"
11150        if test "x$tool_basename" = "x$tool_specified"; then
11151          # A command without a complete path is provided, search $PATH.
11152          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11153$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11154          # Extract the first word of "$tool_basename", so it can be a program name with args.
11155set dummy $tool_basename; ac_word=$2
11156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11157$as_echo_n "checking for $ac_word... " >&6; }
11158if ${ac_cv_path_TEE+:} false; then :
11159  $as_echo_n "(cached) " >&6
11160else
11161  case $TEE in
11162  [\\/]* | ?:[\\/]*)
11163  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11164  ;;
11165  *)
11166  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11167for as_dir in $PATH
11168do
11169  IFS=$as_save_IFS
11170  test -z "$as_dir" && as_dir=.
11171    for ac_exec_ext in '' $ac_executable_extensions; do
11172  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11173    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11174    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11175    break 2
11176  fi
11177done
11178  done
11179IFS=$as_save_IFS
11180
11181  ;;
11182esac
11183fi
11184TEE=$ac_cv_path_TEE
11185if test -n "$TEE"; then
11186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11187$as_echo "$TEE" >&6; }
11188else
11189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11190$as_echo "no" >&6; }
11191fi
11192
11193
11194          if test "x$TEE" = x; then
11195            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11196          fi
11197        else
11198          # Otherwise we believe it is a complete path. Use it as it is.
11199          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11200$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11201          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11202$as_echo_n "checking for TEE... " >&6; }
11203          if test ! -x "$tool_specified"; then
11204            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11205$as_echo "not found" >&6; }
11206            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11207          fi
11208          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11209$as_echo "$tool_specified" >&6; }
11210        fi
11211      fi
11212    fi
11213
11214  fi
11215
11216
11217
11218  if test "x$TEE" = x; then
11219    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11220  fi
11221
11222
11223
11224
11225
11226  # Publish this variable in the help.
11227
11228
11229  if [ -z "${TOUCH+x}" ]; then
11230    # The variable is not set by user, try to locate tool using the code snippet
11231    for ac_prog in touch
11232do
11233  # Extract the first word of "$ac_prog", so it can be a program name with args.
11234set dummy $ac_prog; ac_word=$2
11235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11236$as_echo_n "checking for $ac_word... " >&6; }
11237if ${ac_cv_path_TOUCH+:} false; then :
11238  $as_echo_n "(cached) " >&6
11239else
11240  case $TOUCH in
11241  [\\/]* | ?:[\\/]*)
11242  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11243  ;;
11244  *)
11245  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11246for as_dir in $PATH
11247do
11248  IFS=$as_save_IFS
11249  test -z "$as_dir" && as_dir=.
11250    for ac_exec_ext in '' $ac_executable_extensions; do
11251  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11252    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11253    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11254    break 2
11255  fi
11256done
11257  done
11258IFS=$as_save_IFS
11259
11260  ;;
11261esac
11262fi
11263TOUCH=$ac_cv_path_TOUCH
11264if test -n "$TOUCH"; then
11265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11266$as_echo "$TOUCH" >&6; }
11267else
11268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11269$as_echo "no" >&6; }
11270fi
11271
11272
11273  test -n "$TOUCH" && break
11274done
11275
11276  else
11277    # The variable is set, but is it from the command line or the environment?
11278
11279    # Try to remove the string !TOUCH! from our list.
11280    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11281    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11282      # If it failed, the variable was not from the command line. Ignore it,
11283      # but warn the user (except for BASH, which is always set by the calling BASH).
11284      if test "xTOUCH" != xBASH; then
11285        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11286$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11287      fi
11288      # Try to locate tool using the code snippet
11289      for ac_prog in touch
11290do
11291  # Extract the first word of "$ac_prog", so it can be a program name with args.
11292set dummy $ac_prog; ac_word=$2
11293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11294$as_echo_n "checking for $ac_word... " >&6; }
11295if ${ac_cv_path_TOUCH+:} false; then :
11296  $as_echo_n "(cached) " >&6
11297else
11298  case $TOUCH in
11299  [\\/]* | ?:[\\/]*)
11300  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11301  ;;
11302  *)
11303  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11304for as_dir in $PATH
11305do
11306  IFS=$as_save_IFS
11307  test -z "$as_dir" && as_dir=.
11308    for ac_exec_ext in '' $ac_executable_extensions; do
11309  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11310    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11311    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11312    break 2
11313  fi
11314done
11315  done
11316IFS=$as_save_IFS
11317
11318  ;;
11319esac
11320fi
11321TOUCH=$ac_cv_path_TOUCH
11322if test -n "$TOUCH"; then
11323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11324$as_echo "$TOUCH" >&6; }
11325else
11326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11327$as_echo "no" >&6; }
11328fi
11329
11330
11331  test -n "$TOUCH" && break
11332done
11333
11334    else
11335      # If it succeeded, then it was overridden by the user. We will use it
11336      # for the tool.
11337
11338      # First remove it from the list of overridden variables, so we can test
11339      # for unknown variables in the end.
11340      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11341
11342      # Check if we try to supply an empty value
11343      if test "x$TOUCH" = x; then
11344        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11345$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11346        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11347$as_echo_n "checking for TOUCH... " >&6; }
11348        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11349$as_echo "disabled" >&6; }
11350      else
11351        # Check if the provided tool contains a complete path.
11352        tool_specified="$TOUCH"
11353        tool_basename="${tool_specified##*/}"
11354        if test "x$tool_basename" = "x$tool_specified"; then
11355          # A command without a complete path is provided, search $PATH.
11356          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11357$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11358          # Extract the first word of "$tool_basename", so it can be a program name with args.
11359set dummy $tool_basename; ac_word=$2
11360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11361$as_echo_n "checking for $ac_word... " >&6; }
11362if ${ac_cv_path_TOUCH+:} false; then :
11363  $as_echo_n "(cached) " >&6
11364else
11365  case $TOUCH in
11366  [\\/]* | ?:[\\/]*)
11367  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11368  ;;
11369  *)
11370  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11371for as_dir in $PATH
11372do
11373  IFS=$as_save_IFS
11374  test -z "$as_dir" && as_dir=.
11375    for ac_exec_ext in '' $ac_executable_extensions; do
11376  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11377    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11378    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11379    break 2
11380  fi
11381done
11382  done
11383IFS=$as_save_IFS
11384
11385  ;;
11386esac
11387fi
11388TOUCH=$ac_cv_path_TOUCH
11389if test -n "$TOUCH"; then
11390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11391$as_echo "$TOUCH" >&6; }
11392else
11393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11394$as_echo "no" >&6; }
11395fi
11396
11397
11398          if test "x$TOUCH" = x; then
11399            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11400          fi
11401        else
11402          # Otherwise we believe it is a complete path. Use it as it is.
11403          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11404$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11405          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11406$as_echo_n "checking for TOUCH... " >&6; }
11407          if test ! -x "$tool_specified"; then
11408            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11409$as_echo "not found" >&6; }
11410            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11411          fi
11412          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11413$as_echo "$tool_specified" >&6; }
11414        fi
11415      fi
11416    fi
11417
11418  fi
11419
11420
11421
11422  if test "x$TOUCH" = x; then
11423    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11424  fi
11425
11426
11427
11428
11429
11430  # Publish this variable in the help.
11431
11432
11433  if [ -z "${TR+x}" ]; then
11434    # The variable is not set by user, try to locate tool using the code snippet
11435    for ac_prog in tr
11436do
11437  # Extract the first word of "$ac_prog", so it can be a program name with args.
11438set dummy $ac_prog; ac_word=$2
11439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11440$as_echo_n "checking for $ac_word... " >&6; }
11441if ${ac_cv_path_TR+:} false; then :
11442  $as_echo_n "(cached) " >&6
11443else
11444  case $TR in
11445  [\\/]* | ?:[\\/]*)
11446  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11447  ;;
11448  *)
11449  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11450for as_dir in $PATH
11451do
11452  IFS=$as_save_IFS
11453  test -z "$as_dir" && as_dir=.
11454    for ac_exec_ext in '' $ac_executable_extensions; do
11455  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11456    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11457    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11458    break 2
11459  fi
11460done
11461  done
11462IFS=$as_save_IFS
11463
11464  ;;
11465esac
11466fi
11467TR=$ac_cv_path_TR
11468if test -n "$TR"; then
11469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11470$as_echo "$TR" >&6; }
11471else
11472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11473$as_echo "no" >&6; }
11474fi
11475
11476
11477  test -n "$TR" && break
11478done
11479
11480  else
11481    # The variable is set, but is it from the command line or the environment?
11482
11483    # Try to remove the string !TR! from our list.
11484    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11485    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11486      # If it failed, the variable was not from the command line. Ignore it,
11487      # but warn the user (except for BASH, which is always set by the calling BASH).
11488      if test "xTR" != xBASH; then
11489        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11490$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11491      fi
11492      # Try to locate tool using the code snippet
11493      for ac_prog in tr
11494do
11495  # Extract the first word of "$ac_prog", so it can be a program name with args.
11496set dummy $ac_prog; ac_word=$2
11497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11498$as_echo_n "checking for $ac_word... " >&6; }
11499if ${ac_cv_path_TR+:} false; then :
11500  $as_echo_n "(cached) " >&6
11501else
11502  case $TR in
11503  [\\/]* | ?:[\\/]*)
11504  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11505  ;;
11506  *)
11507  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11508for as_dir in $PATH
11509do
11510  IFS=$as_save_IFS
11511  test -z "$as_dir" && as_dir=.
11512    for ac_exec_ext in '' $ac_executable_extensions; do
11513  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11514    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11515    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11516    break 2
11517  fi
11518done
11519  done
11520IFS=$as_save_IFS
11521
11522  ;;
11523esac
11524fi
11525TR=$ac_cv_path_TR
11526if test -n "$TR"; then
11527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11528$as_echo "$TR" >&6; }
11529else
11530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11531$as_echo "no" >&6; }
11532fi
11533
11534
11535  test -n "$TR" && break
11536done
11537
11538    else
11539      # If it succeeded, then it was overridden by the user. We will use it
11540      # for the tool.
11541
11542      # First remove it from the list of overridden variables, so we can test
11543      # for unknown variables in the end.
11544      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11545
11546      # Check if we try to supply an empty value
11547      if test "x$TR" = x; then
11548        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
11549$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
11550        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11551$as_echo_n "checking for TR... " >&6; }
11552        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11553$as_echo "disabled" >&6; }
11554      else
11555        # Check if the provided tool contains a complete path.
11556        tool_specified="$TR"
11557        tool_basename="${tool_specified##*/}"
11558        if test "x$tool_basename" = "x$tool_specified"; then
11559          # A command without a complete path is provided, search $PATH.
11560          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
11561$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
11562          # Extract the first word of "$tool_basename", so it can be a program name with args.
11563set dummy $tool_basename; ac_word=$2
11564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11565$as_echo_n "checking for $ac_word... " >&6; }
11566if ${ac_cv_path_TR+:} false; then :
11567  $as_echo_n "(cached) " >&6
11568else
11569  case $TR in
11570  [\\/]* | ?:[\\/]*)
11571  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11572  ;;
11573  *)
11574  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11575for as_dir in $PATH
11576do
11577  IFS=$as_save_IFS
11578  test -z "$as_dir" && as_dir=.
11579    for ac_exec_ext in '' $ac_executable_extensions; do
11580  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11581    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11582    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11583    break 2
11584  fi
11585done
11586  done
11587IFS=$as_save_IFS
11588
11589  ;;
11590esac
11591fi
11592TR=$ac_cv_path_TR
11593if test -n "$TR"; then
11594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11595$as_echo "$TR" >&6; }
11596else
11597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11598$as_echo "no" >&6; }
11599fi
11600
11601
11602          if test "x$TR" = x; then
11603            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11604          fi
11605        else
11606          # Otherwise we believe it is a complete path. Use it as it is.
11607          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
11608$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
11609          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11610$as_echo_n "checking for TR... " >&6; }
11611          if test ! -x "$tool_specified"; then
11612            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11613$as_echo "not found" >&6; }
11614            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
11615          fi
11616          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11617$as_echo "$tool_specified" >&6; }
11618        fi
11619      fi
11620    fi
11621
11622  fi
11623
11624
11625
11626  if test "x$TR" = x; then
11627    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
11628  fi
11629
11630
11631
11632
11633
11634  # Publish this variable in the help.
11635
11636
11637  if [ -z "${UNAME+x}" ]; then
11638    # The variable is not set by user, try to locate tool using the code snippet
11639    for ac_prog in uname
11640do
11641  # Extract the first word of "$ac_prog", so it can be a program name with args.
11642set dummy $ac_prog; ac_word=$2
11643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11644$as_echo_n "checking for $ac_word... " >&6; }
11645if ${ac_cv_path_UNAME+:} false; then :
11646  $as_echo_n "(cached) " >&6
11647else
11648  case $UNAME in
11649  [\\/]* | ?:[\\/]*)
11650  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11651  ;;
11652  *)
11653  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11654for as_dir in $PATH
11655do
11656  IFS=$as_save_IFS
11657  test -z "$as_dir" && as_dir=.
11658    for ac_exec_ext in '' $ac_executable_extensions; do
11659  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11660    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11661    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11662    break 2
11663  fi
11664done
11665  done
11666IFS=$as_save_IFS
11667
11668  ;;
11669esac
11670fi
11671UNAME=$ac_cv_path_UNAME
11672if test -n "$UNAME"; then
11673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11674$as_echo "$UNAME" >&6; }
11675else
11676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11677$as_echo "no" >&6; }
11678fi
11679
11680
11681  test -n "$UNAME" && break
11682done
11683
11684  else
11685    # The variable is set, but is it from the command line or the environment?
11686
11687    # Try to remove the string !UNAME! from our list.
11688    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
11689    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11690      # If it failed, the variable was not from the command line. Ignore it,
11691      # but warn the user (except for BASH, which is always set by the calling BASH).
11692      if test "xUNAME" != xBASH; then
11693        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
11694$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
11695      fi
11696      # Try to locate tool using the code snippet
11697      for ac_prog in uname
11698do
11699  # Extract the first word of "$ac_prog", so it can be a program name with args.
11700set dummy $ac_prog; ac_word=$2
11701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11702$as_echo_n "checking for $ac_word... " >&6; }
11703if ${ac_cv_path_UNAME+:} false; then :
11704  $as_echo_n "(cached) " >&6
11705else
11706  case $UNAME in
11707  [\\/]* | ?:[\\/]*)
11708  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11709  ;;
11710  *)
11711  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11712for as_dir in $PATH
11713do
11714  IFS=$as_save_IFS
11715  test -z "$as_dir" && as_dir=.
11716    for ac_exec_ext in '' $ac_executable_extensions; do
11717  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11718    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11719    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11720    break 2
11721  fi
11722done
11723  done
11724IFS=$as_save_IFS
11725
11726  ;;
11727esac
11728fi
11729UNAME=$ac_cv_path_UNAME
11730if test -n "$UNAME"; then
11731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11732$as_echo "$UNAME" >&6; }
11733else
11734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11735$as_echo "no" >&6; }
11736fi
11737
11738
11739  test -n "$UNAME" && break
11740done
11741
11742    else
11743      # If it succeeded, then it was overridden by the user. We will use it
11744      # for the tool.
11745
11746      # First remove it from the list of overridden variables, so we can test
11747      # for unknown variables in the end.
11748      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11749
11750      # Check if we try to supply an empty value
11751      if test "x$UNAME" = x; then
11752        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
11753$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
11754        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11755$as_echo_n "checking for UNAME... " >&6; }
11756        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11757$as_echo "disabled" >&6; }
11758      else
11759        # Check if the provided tool contains a complete path.
11760        tool_specified="$UNAME"
11761        tool_basename="${tool_specified##*/}"
11762        if test "x$tool_basename" = "x$tool_specified"; then
11763          # A command without a complete path is provided, search $PATH.
11764          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
11765$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
11766          # Extract the first word of "$tool_basename", so it can be a program name with args.
11767set dummy $tool_basename; ac_word=$2
11768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11769$as_echo_n "checking for $ac_word... " >&6; }
11770if ${ac_cv_path_UNAME+:} false; then :
11771  $as_echo_n "(cached) " >&6
11772else
11773  case $UNAME in
11774  [\\/]* | ?:[\\/]*)
11775  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11776  ;;
11777  *)
11778  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11779for as_dir in $PATH
11780do
11781  IFS=$as_save_IFS
11782  test -z "$as_dir" && as_dir=.
11783    for ac_exec_ext in '' $ac_executable_extensions; do
11784  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11785    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11786    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11787    break 2
11788  fi
11789done
11790  done
11791IFS=$as_save_IFS
11792
11793  ;;
11794esac
11795fi
11796UNAME=$ac_cv_path_UNAME
11797if test -n "$UNAME"; then
11798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11799$as_echo "$UNAME" >&6; }
11800else
11801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11802$as_echo "no" >&6; }
11803fi
11804
11805
11806          if test "x$UNAME" = x; then
11807            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11808          fi
11809        else
11810          # Otherwise we believe it is a complete path. Use it as it is.
11811          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
11812$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
11813          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11814$as_echo_n "checking for UNAME... " >&6; }
11815          if test ! -x "$tool_specified"; then
11816            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11817$as_echo "not found" >&6; }
11818            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
11819          fi
11820          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11821$as_echo "$tool_specified" >&6; }
11822        fi
11823      fi
11824    fi
11825
11826  fi
11827
11828
11829
11830  if test "x$UNAME" = x; then
11831    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
11832  fi
11833
11834
11835
11836
11837
11838  # Publish this variable in the help.
11839
11840
11841  if [ -z "${UNIQ+x}" ]; then
11842    # The variable is not set by user, try to locate tool using the code snippet
11843    for ac_prog in uniq
11844do
11845  # Extract the first word of "$ac_prog", so it can be a program name with args.
11846set dummy $ac_prog; ac_word=$2
11847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11848$as_echo_n "checking for $ac_word... " >&6; }
11849if ${ac_cv_path_UNIQ+:} false; then :
11850  $as_echo_n "(cached) " >&6
11851else
11852  case $UNIQ in
11853  [\\/]* | ?:[\\/]*)
11854  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11855  ;;
11856  *)
11857  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11858for as_dir in $PATH
11859do
11860  IFS=$as_save_IFS
11861  test -z "$as_dir" && as_dir=.
11862    for ac_exec_ext in '' $ac_executable_extensions; do
11863  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11864    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11865    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11866    break 2
11867  fi
11868done
11869  done
11870IFS=$as_save_IFS
11871
11872  ;;
11873esac
11874fi
11875UNIQ=$ac_cv_path_UNIQ
11876if test -n "$UNIQ"; then
11877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11878$as_echo "$UNIQ" >&6; }
11879else
11880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11881$as_echo "no" >&6; }
11882fi
11883
11884
11885  test -n "$UNIQ" && break
11886done
11887
11888  else
11889    # The variable is set, but is it from the command line or the environment?
11890
11891    # Try to remove the string !UNIQ! from our list.
11892    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
11893    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11894      # If it failed, the variable was not from the command line. Ignore it,
11895      # but warn the user (except for BASH, which is always set by the calling BASH).
11896      if test "xUNIQ" != xBASH; then
11897        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
11898$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
11899      fi
11900      # Try to locate tool using the code snippet
11901      for ac_prog in uniq
11902do
11903  # Extract the first word of "$ac_prog", so it can be a program name with args.
11904set dummy $ac_prog; ac_word=$2
11905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11906$as_echo_n "checking for $ac_word... " >&6; }
11907if ${ac_cv_path_UNIQ+:} false; then :
11908  $as_echo_n "(cached) " >&6
11909else
11910  case $UNIQ in
11911  [\\/]* | ?:[\\/]*)
11912  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11913  ;;
11914  *)
11915  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11916for as_dir in $PATH
11917do
11918  IFS=$as_save_IFS
11919  test -z "$as_dir" && as_dir=.
11920    for ac_exec_ext in '' $ac_executable_extensions; do
11921  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11922    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11923    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11924    break 2
11925  fi
11926done
11927  done
11928IFS=$as_save_IFS
11929
11930  ;;
11931esac
11932fi
11933UNIQ=$ac_cv_path_UNIQ
11934if test -n "$UNIQ"; then
11935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11936$as_echo "$UNIQ" >&6; }
11937else
11938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11939$as_echo "no" >&6; }
11940fi
11941
11942
11943  test -n "$UNIQ" && break
11944done
11945
11946    else
11947      # If it succeeded, then it was overridden by the user. We will use it
11948      # for the tool.
11949
11950      # First remove it from the list of overridden variables, so we can test
11951      # for unknown variables in the end.
11952      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11953
11954      # Check if we try to supply an empty value
11955      if test "x$UNIQ" = x; then
11956        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
11957$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
11958        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11959$as_echo_n "checking for UNIQ... " >&6; }
11960        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11961$as_echo "disabled" >&6; }
11962      else
11963        # Check if the provided tool contains a complete path.
11964        tool_specified="$UNIQ"
11965        tool_basename="${tool_specified##*/}"
11966        if test "x$tool_basename" = "x$tool_specified"; then
11967          # A command without a complete path is provided, search $PATH.
11968          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
11969$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
11970          # Extract the first word of "$tool_basename", so it can be a program name with args.
11971set dummy $tool_basename; ac_word=$2
11972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11973$as_echo_n "checking for $ac_word... " >&6; }
11974if ${ac_cv_path_UNIQ+:} false; then :
11975  $as_echo_n "(cached) " >&6
11976else
11977  case $UNIQ in
11978  [\\/]* | ?:[\\/]*)
11979  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11980  ;;
11981  *)
11982  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11983for as_dir in $PATH
11984do
11985  IFS=$as_save_IFS
11986  test -z "$as_dir" && as_dir=.
11987    for ac_exec_ext in '' $ac_executable_extensions; do
11988  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11989    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11990    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11991    break 2
11992  fi
11993done
11994  done
11995IFS=$as_save_IFS
11996
11997  ;;
11998esac
11999fi
12000UNIQ=$ac_cv_path_UNIQ
12001if test -n "$UNIQ"; then
12002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12003$as_echo "$UNIQ" >&6; }
12004else
12005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12006$as_echo "no" >&6; }
12007fi
12008
12009
12010          if test "x$UNIQ" = x; then
12011            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12012          fi
12013        else
12014          # Otherwise we believe it is a complete path. Use it as it is.
12015          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12016$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12017          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12018$as_echo_n "checking for UNIQ... " >&6; }
12019          if test ! -x "$tool_specified"; then
12020            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12021$as_echo "not found" >&6; }
12022            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12023          fi
12024          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12025$as_echo "$tool_specified" >&6; }
12026        fi
12027      fi
12028    fi
12029
12030  fi
12031
12032
12033
12034  if test "x$UNIQ" = x; then
12035    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12036  fi
12037
12038
12039
12040
12041
12042  # Publish this variable in the help.
12043
12044
12045  if [ -z "${WC+x}" ]; then
12046    # The variable is not set by user, try to locate tool using the code snippet
12047    for ac_prog in wc
12048do
12049  # Extract the first word of "$ac_prog", so it can be a program name with args.
12050set dummy $ac_prog; ac_word=$2
12051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12052$as_echo_n "checking for $ac_word... " >&6; }
12053if ${ac_cv_path_WC+:} false; then :
12054  $as_echo_n "(cached) " >&6
12055else
12056  case $WC in
12057  [\\/]* | ?:[\\/]*)
12058  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12059  ;;
12060  *)
12061  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12062for as_dir in $PATH
12063do
12064  IFS=$as_save_IFS
12065  test -z "$as_dir" && as_dir=.
12066    for ac_exec_ext in '' $ac_executable_extensions; do
12067  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12068    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12069    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12070    break 2
12071  fi
12072done
12073  done
12074IFS=$as_save_IFS
12075
12076  ;;
12077esac
12078fi
12079WC=$ac_cv_path_WC
12080if test -n "$WC"; then
12081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12082$as_echo "$WC" >&6; }
12083else
12084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12085$as_echo "no" >&6; }
12086fi
12087
12088
12089  test -n "$WC" && break
12090done
12091
12092  else
12093    # The variable is set, but is it from the command line or the environment?
12094
12095    # Try to remove the string !WC! from our list.
12096    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12097    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12098      # If it failed, the variable was not from the command line. Ignore it,
12099      # but warn the user (except for BASH, which is always set by the calling BASH).
12100      if test "xWC" != xBASH; then
12101        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12102$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12103      fi
12104      # Try to locate tool using the code snippet
12105      for ac_prog in wc
12106do
12107  # Extract the first word of "$ac_prog", so it can be a program name with args.
12108set dummy $ac_prog; ac_word=$2
12109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12110$as_echo_n "checking for $ac_word... " >&6; }
12111if ${ac_cv_path_WC+:} false; then :
12112  $as_echo_n "(cached) " >&6
12113else
12114  case $WC in
12115  [\\/]* | ?:[\\/]*)
12116  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12117  ;;
12118  *)
12119  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12120for as_dir in $PATH
12121do
12122  IFS=$as_save_IFS
12123  test -z "$as_dir" && as_dir=.
12124    for ac_exec_ext in '' $ac_executable_extensions; do
12125  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12126    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12127    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12128    break 2
12129  fi
12130done
12131  done
12132IFS=$as_save_IFS
12133
12134  ;;
12135esac
12136fi
12137WC=$ac_cv_path_WC
12138if test -n "$WC"; then
12139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12140$as_echo "$WC" >&6; }
12141else
12142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12143$as_echo "no" >&6; }
12144fi
12145
12146
12147  test -n "$WC" && break
12148done
12149
12150    else
12151      # If it succeeded, then it was overridden by the user. We will use it
12152      # for the tool.
12153
12154      # First remove it from the list of overridden variables, so we can test
12155      # for unknown variables in the end.
12156      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12157
12158      # Check if we try to supply an empty value
12159      if test "x$WC" = x; then
12160        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12161$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12162        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12163$as_echo_n "checking for WC... " >&6; }
12164        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12165$as_echo "disabled" >&6; }
12166      else
12167        # Check if the provided tool contains a complete path.
12168        tool_specified="$WC"
12169        tool_basename="${tool_specified##*/}"
12170        if test "x$tool_basename" = "x$tool_specified"; then
12171          # A command without a complete path is provided, search $PATH.
12172          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12173$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12174          # Extract the first word of "$tool_basename", so it can be a program name with args.
12175set dummy $tool_basename; ac_word=$2
12176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12177$as_echo_n "checking for $ac_word... " >&6; }
12178if ${ac_cv_path_WC+:} false; then :
12179  $as_echo_n "(cached) " >&6
12180else
12181  case $WC in
12182  [\\/]* | ?:[\\/]*)
12183  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12184  ;;
12185  *)
12186  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12187for as_dir in $PATH
12188do
12189  IFS=$as_save_IFS
12190  test -z "$as_dir" && as_dir=.
12191    for ac_exec_ext in '' $ac_executable_extensions; do
12192  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12193    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12194    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12195    break 2
12196  fi
12197done
12198  done
12199IFS=$as_save_IFS
12200
12201  ;;
12202esac
12203fi
12204WC=$ac_cv_path_WC
12205if test -n "$WC"; then
12206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12207$as_echo "$WC" >&6; }
12208else
12209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12210$as_echo "no" >&6; }
12211fi
12212
12213
12214          if test "x$WC" = x; then
12215            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12216          fi
12217        else
12218          # Otherwise we believe it is a complete path. Use it as it is.
12219          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12220$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12221          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12222$as_echo_n "checking for WC... " >&6; }
12223          if test ! -x "$tool_specified"; then
12224            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12225$as_echo "not found" >&6; }
12226            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12227          fi
12228          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12229$as_echo "$tool_specified" >&6; }
12230        fi
12231      fi
12232    fi
12233
12234  fi
12235
12236
12237
12238  if test "x$WC" = x; then
12239    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12240  fi
12241
12242
12243
12244
12245
12246  # Publish this variable in the help.
12247
12248
12249  if [ -z "${WHICH+x}" ]; then
12250    # The variable is not set by user, try to locate tool using the code snippet
12251    for ac_prog in which
12252do
12253  # Extract the first word of "$ac_prog", so it can be a program name with args.
12254set dummy $ac_prog; ac_word=$2
12255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12256$as_echo_n "checking for $ac_word... " >&6; }
12257if ${ac_cv_path_WHICH+:} false; then :
12258  $as_echo_n "(cached) " >&6
12259else
12260  case $WHICH in
12261  [\\/]* | ?:[\\/]*)
12262  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12263  ;;
12264  *)
12265  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12266for as_dir in $PATH
12267do
12268  IFS=$as_save_IFS
12269  test -z "$as_dir" && as_dir=.
12270    for ac_exec_ext in '' $ac_executable_extensions; do
12271  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12272    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12273    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12274    break 2
12275  fi
12276done
12277  done
12278IFS=$as_save_IFS
12279
12280  ;;
12281esac
12282fi
12283WHICH=$ac_cv_path_WHICH
12284if test -n "$WHICH"; then
12285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12286$as_echo "$WHICH" >&6; }
12287else
12288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12289$as_echo "no" >&6; }
12290fi
12291
12292
12293  test -n "$WHICH" && break
12294done
12295
12296  else
12297    # The variable is set, but is it from the command line or the environment?
12298
12299    # Try to remove the string !WHICH! from our list.
12300    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12301    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12302      # If it failed, the variable was not from the command line. Ignore it,
12303      # but warn the user (except for BASH, which is always set by the calling BASH).
12304      if test "xWHICH" != xBASH; then
12305        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12306$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12307      fi
12308      # Try to locate tool using the code snippet
12309      for ac_prog in which
12310do
12311  # Extract the first word of "$ac_prog", so it can be a program name with args.
12312set dummy $ac_prog; ac_word=$2
12313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12314$as_echo_n "checking for $ac_word... " >&6; }
12315if ${ac_cv_path_WHICH+:} false; then :
12316  $as_echo_n "(cached) " >&6
12317else
12318  case $WHICH in
12319  [\\/]* | ?:[\\/]*)
12320  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12321  ;;
12322  *)
12323  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12324for as_dir in $PATH
12325do
12326  IFS=$as_save_IFS
12327  test -z "$as_dir" && as_dir=.
12328    for ac_exec_ext in '' $ac_executable_extensions; do
12329  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12330    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12331    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12332    break 2
12333  fi
12334done
12335  done
12336IFS=$as_save_IFS
12337
12338  ;;
12339esac
12340fi
12341WHICH=$ac_cv_path_WHICH
12342if test -n "$WHICH"; then
12343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12344$as_echo "$WHICH" >&6; }
12345else
12346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12347$as_echo "no" >&6; }
12348fi
12349
12350
12351  test -n "$WHICH" && break
12352done
12353
12354    else
12355      # If it succeeded, then it was overridden by the user. We will use it
12356      # for the tool.
12357
12358      # First remove it from the list of overridden variables, so we can test
12359      # for unknown variables in the end.
12360      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12361
12362      # Check if we try to supply an empty value
12363      if test "x$WHICH" = x; then
12364        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12365$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12366        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12367$as_echo_n "checking for WHICH... " >&6; }
12368        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12369$as_echo "disabled" >&6; }
12370      else
12371        # Check if the provided tool contains a complete path.
12372        tool_specified="$WHICH"
12373        tool_basename="${tool_specified##*/}"
12374        if test "x$tool_basename" = "x$tool_specified"; then
12375          # A command without a complete path is provided, search $PATH.
12376          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12377$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12378          # Extract the first word of "$tool_basename", so it can be a program name with args.
12379set dummy $tool_basename; ac_word=$2
12380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12381$as_echo_n "checking for $ac_word... " >&6; }
12382if ${ac_cv_path_WHICH+:} false; then :
12383  $as_echo_n "(cached) " >&6
12384else
12385  case $WHICH in
12386  [\\/]* | ?:[\\/]*)
12387  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12388  ;;
12389  *)
12390  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12391for as_dir in $PATH
12392do
12393  IFS=$as_save_IFS
12394  test -z "$as_dir" && as_dir=.
12395    for ac_exec_ext in '' $ac_executable_extensions; do
12396  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12397    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12398    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12399    break 2
12400  fi
12401done
12402  done
12403IFS=$as_save_IFS
12404
12405  ;;
12406esac
12407fi
12408WHICH=$ac_cv_path_WHICH
12409if test -n "$WHICH"; then
12410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12411$as_echo "$WHICH" >&6; }
12412else
12413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12414$as_echo "no" >&6; }
12415fi
12416
12417
12418          if test "x$WHICH" = x; then
12419            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12420          fi
12421        else
12422          # Otherwise we believe it is a complete path. Use it as it is.
12423          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12424$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12425          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12426$as_echo_n "checking for WHICH... " >&6; }
12427          if test ! -x "$tool_specified"; then
12428            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12429$as_echo "not found" >&6; }
12430            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12431          fi
12432          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12433$as_echo "$tool_specified" >&6; }
12434        fi
12435      fi
12436    fi
12437
12438  fi
12439
12440
12441
12442  if test "x$WHICH" = x; then
12443    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12444  fi
12445
12446
12447
12448
12449
12450  # Publish this variable in the help.
12451
12452
12453  if [ -z "${XARGS+x}" ]; then
12454    # The variable is not set by user, try to locate tool using the code snippet
12455    for ac_prog in xargs
12456do
12457  # Extract the first word of "$ac_prog", so it can be a program name with args.
12458set dummy $ac_prog; ac_word=$2
12459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12460$as_echo_n "checking for $ac_word... " >&6; }
12461if ${ac_cv_path_XARGS+:} false; then :
12462  $as_echo_n "(cached) " >&6
12463else
12464  case $XARGS in
12465  [\\/]* | ?:[\\/]*)
12466  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12467  ;;
12468  *)
12469  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12470for as_dir in $PATH
12471do
12472  IFS=$as_save_IFS
12473  test -z "$as_dir" && as_dir=.
12474    for ac_exec_ext in '' $ac_executable_extensions; do
12475  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12476    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12477    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12478    break 2
12479  fi
12480done
12481  done
12482IFS=$as_save_IFS
12483
12484  ;;
12485esac
12486fi
12487XARGS=$ac_cv_path_XARGS
12488if test -n "$XARGS"; then
12489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12490$as_echo "$XARGS" >&6; }
12491else
12492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12493$as_echo "no" >&6; }
12494fi
12495
12496
12497  test -n "$XARGS" && break
12498done
12499
12500  else
12501    # The variable is set, but is it from the command line or the environment?
12502
12503    # Try to remove the string !XARGS! from our list.
12504    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12505    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12506      # If it failed, the variable was not from the command line. Ignore it,
12507      # but warn the user (except for BASH, which is always set by the calling BASH).
12508      if test "xXARGS" != xBASH; then
12509        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12510$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12511      fi
12512      # Try to locate tool using the code snippet
12513      for ac_prog in xargs
12514do
12515  # Extract the first word of "$ac_prog", so it can be a program name with args.
12516set dummy $ac_prog; ac_word=$2
12517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12518$as_echo_n "checking for $ac_word... " >&6; }
12519if ${ac_cv_path_XARGS+:} false; then :
12520  $as_echo_n "(cached) " >&6
12521else
12522  case $XARGS in
12523  [\\/]* | ?:[\\/]*)
12524  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12525  ;;
12526  *)
12527  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12528for as_dir in $PATH
12529do
12530  IFS=$as_save_IFS
12531  test -z "$as_dir" && as_dir=.
12532    for ac_exec_ext in '' $ac_executable_extensions; do
12533  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12534    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12535    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12536    break 2
12537  fi
12538done
12539  done
12540IFS=$as_save_IFS
12541
12542  ;;
12543esac
12544fi
12545XARGS=$ac_cv_path_XARGS
12546if test -n "$XARGS"; then
12547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12548$as_echo "$XARGS" >&6; }
12549else
12550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12551$as_echo "no" >&6; }
12552fi
12553
12554
12555  test -n "$XARGS" && break
12556done
12557
12558    else
12559      # If it succeeded, then it was overridden by the user. We will use it
12560      # for the tool.
12561
12562      # First remove it from the list of overridden variables, so we can test
12563      # for unknown variables in the end.
12564      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12565
12566      # Check if we try to supply an empty value
12567      if test "x$XARGS" = x; then
12568        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
12569$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
12570        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12571$as_echo_n "checking for XARGS... " >&6; }
12572        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12573$as_echo "disabled" >&6; }
12574      else
12575        # Check if the provided tool contains a complete path.
12576        tool_specified="$XARGS"
12577        tool_basename="${tool_specified##*/}"
12578        if test "x$tool_basename" = "x$tool_specified"; then
12579          # A command without a complete path is provided, search $PATH.
12580          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
12581$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
12582          # Extract the first word of "$tool_basename", so it can be a program name with args.
12583set dummy $tool_basename; ac_word=$2
12584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12585$as_echo_n "checking for $ac_word... " >&6; }
12586if ${ac_cv_path_XARGS+:} false; then :
12587  $as_echo_n "(cached) " >&6
12588else
12589  case $XARGS in
12590  [\\/]* | ?:[\\/]*)
12591  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12592  ;;
12593  *)
12594  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12595for as_dir in $PATH
12596do
12597  IFS=$as_save_IFS
12598  test -z "$as_dir" && as_dir=.
12599    for ac_exec_ext in '' $ac_executable_extensions; do
12600  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12601    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12602    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12603    break 2
12604  fi
12605done
12606  done
12607IFS=$as_save_IFS
12608
12609  ;;
12610esac
12611fi
12612XARGS=$ac_cv_path_XARGS
12613if test -n "$XARGS"; then
12614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12615$as_echo "$XARGS" >&6; }
12616else
12617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12618$as_echo "no" >&6; }
12619fi
12620
12621
12622          if test "x$XARGS" = x; then
12623            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12624          fi
12625        else
12626          # Otherwise we believe it is a complete path. Use it as it is.
12627          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
12628$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
12629          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12630$as_echo_n "checking for XARGS... " >&6; }
12631          if test ! -x "$tool_specified"; then
12632            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12633$as_echo "not found" >&6; }
12634            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
12635          fi
12636          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12637$as_echo "$tool_specified" >&6; }
12638        fi
12639      fi
12640    fi
12641
12642  fi
12643
12644
12645
12646  if test "x$XARGS" = x; then
12647    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
12648  fi
12649
12650
12651
12652  # Then required tools that require some special treatment.
12653
12654
12655  # Publish this variable in the help.
12656
12657
12658  if [ -z "${AWK+x}" ]; then
12659    # The variable is not set by user, try to locate tool using the code snippet
12660    for ac_prog in gawk mawk nawk awk
12661do
12662  # Extract the first word of "$ac_prog", so it can be a program name with args.
12663set dummy $ac_prog; ac_word=$2
12664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12665$as_echo_n "checking for $ac_word... " >&6; }
12666if ${ac_cv_prog_AWK+:} false; then :
12667  $as_echo_n "(cached) " >&6
12668else
12669  if test -n "$AWK"; then
12670  ac_cv_prog_AWK="$AWK" # Let the user override the test.
12671else
12672as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12673for as_dir in $PATH
12674do
12675  IFS=$as_save_IFS
12676  test -z "$as_dir" && as_dir=.
12677    for ac_exec_ext in '' $ac_executable_extensions; do
12678  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12679    ac_cv_prog_AWK="$ac_prog"
12680    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12681    break 2
12682  fi
12683done
12684  done
12685IFS=$as_save_IFS
12686
12687fi
12688fi
12689AWK=$ac_cv_prog_AWK
12690if test -n "$AWK"; then
12691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12692$as_echo "$AWK" >&6; }
12693else
12694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12695$as_echo "no" >&6; }
12696fi
12697
12698
12699  test -n "$AWK" && break
12700done
12701
12702  else
12703    # The variable is set, but is it from the command line or the environment?
12704
12705    # Try to remove the string !AWK! from our list.
12706    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
12707    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12708      # If it failed, the variable was not from the command line. Ignore it,
12709      # but warn the user (except for BASH, which is always set by the calling BASH).
12710      if test "xAWK" != xBASH; then
12711        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
12712$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
12713      fi
12714      # Try to locate tool using the code snippet
12715      for ac_prog in gawk mawk nawk awk
12716do
12717  # Extract the first word of "$ac_prog", so it can be a program name with args.
12718set dummy $ac_prog; ac_word=$2
12719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12720$as_echo_n "checking for $ac_word... " >&6; }
12721if ${ac_cv_prog_AWK+:} false; then :
12722  $as_echo_n "(cached) " >&6
12723else
12724  if test -n "$AWK"; then
12725  ac_cv_prog_AWK="$AWK" # Let the user override the test.
12726else
12727as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12728for as_dir in $PATH
12729do
12730  IFS=$as_save_IFS
12731  test -z "$as_dir" && as_dir=.
12732    for ac_exec_ext in '' $ac_executable_extensions; do
12733  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12734    ac_cv_prog_AWK="$ac_prog"
12735    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12736    break 2
12737  fi
12738done
12739  done
12740IFS=$as_save_IFS
12741
12742fi
12743fi
12744AWK=$ac_cv_prog_AWK
12745if test -n "$AWK"; then
12746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12747$as_echo "$AWK" >&6; }
12748else
12749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12750$as_echo "no" >&6; }
12751fi
12752
12753
12754  test -n "$AWK" && break
12755done
12756
12757    else
12758      # If it succeeded, then it was overridden by the user. We will use it
12759      # for the tool.
12760
12761      # First remove it from the list of overridden variables, so we can test
12762      # for unknown variables in the end.
12763      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12764
12765      # Check if we try to supply an empty value
12766      if test "x$AWK" = x; then
12767        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
12768$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
12769        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12770$as_echo_n "checking for AWK... " >&6; }
12771        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12772$as_echo "disabled" >&6; }
12773      else
12774        # Check if the provided tool contains a complete path.
12775        tool_specified="$AWK"
12776        tool_basename="${tool_specified##*/}"
12777        if test "x$tool_basename" = "x$tool_specified"; then
12778          # A command without a complete path is provided, search $PATH.
12779          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
12780$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
12781          # Extract the first word of "$tool_basename", so it can be a program name with args.
12782set dummy $tool_basename; ac_word=$2
12783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12784$as_echo_n "checking for $ac_word... " >&6; }
12785if ${ac_cv_path_AWK+:} false; then :
12786  $as_echo_n "(cached) " >&6
12787else
12788  case $AWK in
12789  [\\/]* | ?:[\\/]*)
12790  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
12791  ;;
12792  *)
12793  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12794for as_dir in $PATH
12795do
12796  IFS=$as_save_IFS
12797  test -z "$as_dir" && as_dir=.
12798    for ac_exec_ext in '' $ac_executable_extensions; do
12799  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12800    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
12801    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12802    break 2
12803  fi
12804done
12805  done
12806IFS=$as_save_IFS
12807
12808  ;;
12809esac
12810fi
12811AWK=$ac_cv_path_AWK
12812if test -n "$AWK"; then
12813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12814$as_echo "$AWK" >&6; }
12815else
12816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12817$as_echo "no" >&6; }
12818fi
12819
12820
12821          if test "x$AWK" = x; then
12822            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12823          fi
12824        else
12825          # Otherwise we believe it is a complete path. Use it as it is.
12826          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
12827$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
12828          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12829$as_echo_n "checking for AWK... " >&6; }
12830          if test ! -x "$tool_specified"; then
12831            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12832$as_echo "not found" >&6; }
12833            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
12834          fi
12835          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12836$as_echo "$tool_specified" >&6; }
12837        fi
12838      fi
12839    fi
12840
12841  fi
12842
12843
12844  if test "x$AWK" = x; then
12845    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
12846  fi
12847
12848
12849
12850
12851  # Publish this variable in the help.
12852
12853
12854  if [ -z "${GREP+x}" ]; then
12855    # The variable is not set by user, try to locate tool using the code snippet
12856    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12857$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12858if ${ac_cv_path_GREP+:} false; then :
12859  $as_echo_n "(cached) " >&6
12860else
12861  if test -z "$GREP"; then
12862  ac_path_GREP_found=false
12863  # Loop through the user's path and test for each of PROGNAME-LIST
12864  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12865for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12866do
12867  IFS=$as_save_IFS
12868  test -z "$as_dir" && as_dir=.
12869    for ac_prog in grep ggrep; do
12870    for ac_exec_ext in '' $ac_executable_extensions; do
12871      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12872      as_fn_executable_p "$ac_path_GREP" || continue
12873# Check for GNU ac_path_GREP and select it if it is found.
12874  # Check for GNU $ac_path_GREP
12875case `"$ac_path_GREP" --version 2>&1` in
12876*GNU*)
12877  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12878*)
12879  ac_count=0
12880  $as_echo_n 0123456789 >"conftest.in"
12881  while :
12882  do
12883    cat "conftest.in" "conftest.in" >"conftest.tmp"
12884    mv "conftest.tmp" "conftest.in"
12885    cp "conftest.in" "conftest.nl"
12886    $as_echo 'GREP' >> "conftest.nl"
12887    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12888    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12889    as_fn_arith $ac_count + 1 && ac_count=$as_val
12890    if test $ac_count -gt ${ac_path_GREP_max-0}; then
12891      # Best one so far, save it but keep looking for a better one
12892      ac_cv_path_GREP="$ac_path_GREP"
12893      ac_path_GREP_max=$ac_count
12894    fi
12895    # 10*(2^10) chars as input seems more than enough
12896    test $ac_count -gt 10 && break
12897  done
12898  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12899esac
12900
12901      $ac_path_GREP_found && break 3
12902    done
12903  done
12904  done
12905IFS=$as_save_IFS
12906  if test -z "$ac_cv_path_GREP"; then
12907    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12908  fi
12909else
12910  ac_cv_path_GREP=$GREP
12911fi
12912
12913fi
12914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12915$as_echo "$ac_cv_path_GREP" >&6; }
12916 GREP="$ac_cv_path_GREP"
12917
12918
12919  else
12920    # The variable is set, but is it from the command line or the environment?
12921
12922    # Try to remove the string !GREP! from our list.
12923    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
12924    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12925      # If it failed, the variable was not from the command line. Ignore it,
12926      # but warn the user (except for BASH, which is always set by the calling BASH).
12927      if test "xGREP" != xBASH; then
12928        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
12929$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
12930      fi
12931      # Try to locate tool using the code snippet
12932      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12933$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12934if ${ac_cv_path_GREP+:} false; then :
12935  $as_echo_n "(cached) " >&6
12936else
12937  if test -z "$GREP"; then
12938  ac_path_GREP_found=false
12939  # Loop through the user's path and test for each of PROGNAME-LIST
12940  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12941for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12942do
12943  IFS=$as_save_IFS
12944  test -z "$as_dir" && as_dir=.
12945    for ac_prog in grep ggrep; do
12946    for ac_exec_ext in '' $ac_executable_extensions; do
12947      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12948      as_fn_executable_p "$ac_path_GREP" || continue
12949# Check for GNU ac_path_GREP and select it if it is found.
12950  # Check for GNU $ac_path_GREP
12951case `"$ac_path_GREP" --version 2>&1` in
12952*GNU*)
12953  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12954*)
12955  ac_count=0
12956  $as_echo_n 0123456789 >"conftest.in"
12957  while :
12958  do
12959    cat "conftest.in" "conftest.in" >"conftest.tmp"
12960    mv "conftest.tmp" "conftest.in"
12961    cp "conftest.in" "conftest.nl"
12962    $as_echo 'GREP' >> "conftest.nl"
12963    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12964    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12965    as_fn_arith $ac_count + 1 && ac_count=$as_val
12966    if test $ac_count -gt ${ac_path_GREP_max-0}; then
12967      # Best one so far, save it but keep looking for a better one
12968      ac_cv_path_GREP="$ac_path_GREP"
12969      ac_path_GREP_max=$ac_count
12970    fi
12971    # 10*(2^10) chars as input seems more than enough
12972    test $ac_count -gt 10 && break
12973  done
12974  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12975esac
12976
12977      $ac_path_GREP_found && break 3
12978    done
12979  done
12980  done
12981IFS=$as_save_IFS
12982  if test -z "$ac_cv_path_GREP"; then
12983    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12984  fi
12985else
12986  ac_cv_path_GREP=$GREP
12987fi
12988
12989fi
12990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12991$as_echo "$ac_cv_path_GREP" >&6; }
12992 GREP="$ac_cv_path_GREP"
12993
12994
12995    else
12996      # If it succeeded, then it was overridden by the user. We will use it
12997      # for the tool.
12998
12999      # First remove it from the list of overridden variables, so we can test
13000      # for unknown variables in the end.
13001      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13002
13003      # Check if we try to supply an empty value
13004      if test "x$GREP" = x; then
13005        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13006$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13007        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13008$as_echo_n "checking for GREP... " >&6; }
13009        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13010$as_echo "disabled" >&6; }
13011      else
13012        # Check if the provided tool contains a complete path.
13013        tool_specified="$GREP"
13014        tool_basename="${tool_specified##*/}"
13015        if test "x$tool_basename" = "x$tool_specified"; then
13016          # A command without a complete path is provided, search $PATH.
13017          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13018$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13019          # Extract the first word of "$tool_basename", so it can be a program name with args.
13020set dummy $tool_basename; ac_word=$2
13021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13022$as_echo_n "checking for $ac_word... " >&6; }
13023if ${ac_cv_path_GREP+:} false; then :
13024  $as_echo_n "(cached) " >&6
13025else
13026  case $GREP in
13027  [\\/]* | ?:[\\/]*)
13028  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13029  ;;
13030  *)
13031  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13032for as_dir in $PATH
13033do
13034  IFS=$as_save_IFS
13035  test -z "$as_dir" && as_dir=.
13036    for ac_exec_ext in '' $ac_executable_extensions; do
13037  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13038    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13039    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13040    break 2
13041  fi
13042done
13043  done
13044IFS=$as_save_IFS
13045
13046  ;;
13047esac
13048fi
13049GREP=$ac_cv_path_GREP
13050if test -n "$GREP"; then
13051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13052$as_echo "$GREP" >&6; }
13053else
13054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13055$as_echo "no" >&6; }
13056fi
13057
13058
13059          if test "x$GREP" = x; then
13060            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13061          fi
13062        else
13063          # Otherwise we believe it is a complete path. Use it as it is.
13064          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13065$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13066          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13067$as_echo_n "checking for GREP... " >&6; }
13068          if test ! -x "$tool_specified"; then
13069            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13070$as_echo "not found" >&6; }
13071            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13072          fi
13073          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13074$as_echo "$tool_specified" >&6; }
13075        fi
13076      fi
13077    fi
13078
13079  fi
13080
13081
13082  if test "x$GREP" = x; then
13083    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13084  fi
13085
13086
13087
13088
13089  # Publish this variable in the help.
13090
13091
13092  if [ -z "${EGREP+x}" ]; then
13093    # The variable is not set by user, try to locate tool using the code snippet
13094    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13095$as_echo_n "checking for egrep... " >&6; }
13096if ${ac_cv_path_EGREP+:} false; then :
13097  $as_echo_n "(cached) " >&6
13098else
13099  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13100   then ac_cv_path_EGREP="$GREP -E"
13101   else
13102     if test -z "$EGREP"; then
13103  ac_path_EGREP_found=false
13104  # Loop through the user's path and test for each of PROGNAME-LIST
13105  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13106for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13107do
13108  IFS=$as_save_IFS
13109  test -z "$as_dir" && as_dir=.
13110    for ac_prog in egrep; do
13111    for ac_exec_ext in '' $ac_executable_extensions; do
13112      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13113      as_fn_executable_p "$ac_path_EGREP" || continue
13114# Check for GNU ac_path_EGREP and select it if it is found.
13115  # Check for GNU $ac_path_EGREP
13116case `"$ac_path_EGREP" --version 2>&1` in
13117*GNU*)
13118  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13119*)
13120  ac_count=0
13121  $as_echo_n 0123456789 >"conftest.in"
13122  while :
13123  do
13124    cat "conftest.in" "conftest.in" >"conftest.tmp"
13125    mv "conftest.tmp" "conftest.in"
13126    cp "conftest.in" "conftest.nl"
13127    $as_echo 'EGREP' >> "conftest.nl"
13128    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13129    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13130    as_fn_arith $ac_count + 1 && ac_count=$as_val
13131    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13132      # Best one so far, save it but keep looking for a better one
13133      ac_cv_path_EGREP="$ac_path_EGREP"
13134      ac_path_EGREP_max=$ac_count
13135    fi
13136    # 10*(2^10) chars as input seems more than enough
13137    test $ac_count -gt 10 && break
13138  done
13139  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13140esac
13141
13142      $ac_path_EGREP_found && break 3
13143    done
13144  done
13145  done
13146IFS=$as_save_IFS
13147  if test -z "$ac_cv_path_EGREP"; then
13148    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13149  fi
13150else
13151  ac_cv_path_EGREP=$EGREP
13152fi
13153
13154   fi
13155fi
13156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13157$as_echo "$ac_cv_path_EGREP" >&6; }
13158 EGREP="$ac_cv_path_EGREP"
13159
13160
13161  else
13162    # The variable is set, but is it from the command line or the environment?
13163
13164    # Try to remove the string !EGREP! from our list.
13165    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13166    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13167      # If it failed, the variable was not from the command line. Ignore it,
13168      # but warn the user (except for BASH, which is always set by the calling BASH).
13169      if test "xEGREP" != xBASH; then
13170        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13171$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13172      fi
13173      # Try to locate tool using the code snippet
13174      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13175$as_echo_n "checking for egrep... " >&6; }
13176if ${ac_cv_path_EGREP+:} false; then :
13177  $as_echo_n "(cached) " >&6
13178else
13179  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13180   then ac_cv_path_EGREP="$GREP -E"
13181   else
13182     if test -z "$EGREP"; then
13183  ac_path_EGREP_found=false
13184  # Loop through the user's path and test for each of PROGNAME-LIST
13185  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13186for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13187do
13188  IFS=$as_save_IFS
13189  test -z "$as_dir" && as_dir=.
13190    for ac_prog in egrep; do
13191    for ac_exec_ext in '' $ac_executable_extensions; do
13192      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13193      as_fn_executable_p "$ac_path_EGREP" || continue
13194# Check for GNU ac_path_EGREP and select it if it is found.
13195  # Check for GNU $ac_path_EGREP
13196case `"$ac_path_EGREP" --version 2>&1` in
13197*GNU*)
13198  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13199*)
13200  ac_count=0
13201  $as_echo_n 0123456789 >"conftest.in"
13202  while :
13203  do
13204    cat "conftest.in" "conftest.in" >"conftest.tmp"
13205    mv "conftest.tmp" "conftest.in"
13206    cp "conftest.in" "conftest.nl"
13207    $as_echo 'EGREP' >> "conftest.nl"
13208    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13209    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13210    as_fn_arith $ac_count + 1 && ac_count=$as_val
13211    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13212      # Best one so far, save it but keep looking for a better one
13213      ac_cv_path_EGREP="$ac_path_EGREP"
13214      ac_path_EGREP_max=$ac_count
13215    fi
13216    # 10*(2^10) chars as input seems more than enough
13217    test $ac_count -gt 10 && break
13218  done
13219  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13220esac
13221
13222      $ac_path_EGREP_found && break 3
13223    done
13224  done
13225  done
13226IFS=$as_save_IFS
13227  if test -z "$ac_cv_path_EGREP"; then
13228    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13229  fi
13230else
13231  ac_cv_path_EGREP=$EGREP
13232fi
13233
13234   fi
13235fi
13236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13237$as_echo "$ac_cv_path_EGREP" >&6; }
13238 EGREP="$ac_cv_path_EGREP"
13239
13240
13241    else
13242      # If it succeeded, then it was overridden by the user. We will use it
13243      # for the tool.
13244
13245      # First remove it from the list of overridden variables, so we can test
13246      # for unknown variables in the end.
13247      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13248
13249      # Check if we try to supply an empty value
13250      if test "x$EGREP" = x; then
13251        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13252$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13253        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13254$as_echo_n "checking for EGREP... " >&6; }
13255        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13256$as_echo "disabled" >&6; }
13257      else
13258        # Check if the provided tool contains a complete path.
13259        tool_specified="$EGREP"
13260        tool_basename="${tool_specified##*/}"
13261        if test "x$tool_basename" = "x$tool_specified"; then
13262          # A command without a complete path is provided, search $PATH.
13263          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13264$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13265          # Extract the first word of "$tool_basename", so it can be a program name with args.
13266set dummy $tool_basename; ac_word=$2
13267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13268$as_echo_n "checking for $ac_word... " >&6; }
13269if ${ac_cv_path_EGREP+:} false; then :
13270  $as_echo_n "(cached) " >&6
13271else
13272  case $EGREP in
13273  [\\/]* | ?:[\\/]*)
13274  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13275  ;;
13276  *)
13277  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13278for as_dir in $PATH
13279do
13280  IFS=$as_save_IFS
13281  test -z "$as_dir" && as_dir=.
13282    for ac_exec_ext in '' $ac_executable_extensions; do
13283  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13284    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13285    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13286    break 2
13287  fi
13288done
13289  done
13290IFS=$as_save_IFS
13291
13292  ;;
13293esac
13294fi
13295EGREP=$ac_cv_path_EGREP
13296if test -n "$EGREP"; then
13297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13298$as_echo "$EGREP" >&6; }
13299else
13300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13301$as_echo "no" >&6; }
13302fi
13303
13304
13305          if test "x$EGREP" = x; then
13306            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13307          fi
13308        else
13309          # Otherwise we believe it is a complete path. Use it as it is.
13310          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13311$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13312          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13313$as_echo_n "checking for EGREP... " >&6; }
13314          if test ! -x "$tool_specified"; then
13315            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13316$as_echo "not found" >&6; }
13317            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13318          fi
13319          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13320$as_echo "$tool_specified" >&6; }
13321        fi
13322      fi
13323    fi
13324
13325  fi
13326
13327
13328  if test "x$EGREP" = x; then
13329    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13330  fi
13331
13332
13333
13334
13335  # Publish this variable in the help.
13336
13337
13338  if [ -z "${FGREP+x}" ]; then
13339    # The variable is not set by user, try to locate tool using the code snippet
13340    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13341$as_echo_n "checking for fgrep... " >&6; }
13342if ${ac_cv_path_FGREP+:} false; then :
13343  $as_echo_n "(cached) " >&6
13344else
13345  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13346   then ac_cv_path_FGREP="$GREP -F"
13347   else
13348     if test -z "$FGREP"; then
13349  ac_path_FGREP_found=false
13350  # Loop through the user's path and test for each of PROGNAME-LIST
13351  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13352for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13353do
13354  IFS=$as_save_IFS
13355  test -z "$as_dir" && as_dir=.
13356    for ac_prog in fgrep; do
13357    for ac_exec_ext in '' $ac_executable_extensions; do
13358      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13359      as_fn_executable_p "$ac_path_FGREP" || continue
13360# Check for GNU ac_path_FGREP and select it if it is found.
13361  # Check for GNU $ac_path_FGREP
13362case `"$ac_path_FGREP" --version 2>&1` in
13363*GNU*)
13364  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13365*)
13366  ac_count=0
13367  $as_echo_n 0123456789 >"conftest.in"
13368  while :
13369  do
13370    cat "conftest.in" "conftest.in" >"conftest.tmp"
13371    mv "conftest.tmp" "conftest.in"
13372    cp "conftest.in" "conftest.nl"
13373    $as_echo 'FGREP' >> "conftest.nl"
13374    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13375    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13376    as_fn_arith $ac_count + 1 && ac_count=$as_val
13377    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13378      # Best one so far, save it but keep looking for a better one
13379      ac_cv_path_FGREP="$ac_path_FGREP"
13380      ac_path_FGREP_max=$ac_count
13381    fi
13382    # 10*(2^10) chars as input seems more than enough
13383    test $ac_count -gt 10 && break
13384  done
13385  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13386esac
13387
13388      $ac_path_FGREP_found && break 3
13389    done
13390  done
13391  done
13392IFS=$as_save_IFS
13393  if test -z "$ac_cv_path_FGREP"; then
13394    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13395  fi
13396else
13397  ac_cv_path_FGREP=$FGREP
13398fi
13399
13400   fi
13401fi
13402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13403$as_echo "$ac_cv_path_FGREP" >&6; }
13404 FGREP="$ac_cv_path_FGREP"
13405
13406
13407  else
13408    # The variable is set, but is it from the command line or the environment?
13409
13410    # Try to remove the string !FGREP! from our list.
13411    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13412    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13413      # If it failed, the variable was not from the command line. Ignore it,
13414      # but warn the user (except for BASH, which is always set by the calling BASH).
13415      if test "xFGREP" != xBASH; then
13416        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13417$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13418      fi
13419      # Try to locate tool using the code snippet
13420      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13421$as_echo_n "checking for fgrep... " >&6; }
13422if ${ac_cv_path_FGREP+:} false; then :
13423  $as_echo_n "(cached) " >&6
13424else
13425  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13426   then ac_cv_path_FGREP="$GREP -F"
13427   else
13428     if test -z "$FGREP"; then
13429  ac_path_FGREP_found=false
13430  # Loop through the user's path and test for each of PROGNAME-LIST
13431  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13432for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13433do
13434  IFS=$as_save_IFS
13435  test -z "$as_dir" && as_dir=.
13436    for ac_prog in fgrep; do
13437    for ac_exec_ext in '' $ac_executable_extensions; do
13438      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13439      as_fn_executable_p "$ac_path_FGREP" || continue
13440# Check for GNU ac_path_FGREP and select it if it is found.
13441  # Check for GNU $ac_path_FGREP
13442case `"$ac_path_FGREP" --version 2>&1` in
13443*GNU*)
13444  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13445*)
13446  ac_count=0
13447  $as_echo_n 0123456789 >"conftest.in"
13448  while :
13449  do
13450    cat "conftest.in" "conftest.in" >"conftest.tmp"
13451    mv "conftest.tmp" "conftest.in"
13452    cp "conftest.in" "conftest.nl"
13453    $as_echo 'FGREP' >> "conftest.nl"
13454    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13455    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13456    as_fn_arith $ac_count + 1 && ac_count=$as_val
13457    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13458      # Best one so far, save it but keep looking for a better one
13459      ac_cv_path_FGREP="$ac_path_FGREP"
13460      ac_path_FGREP_max=$ac_count
13461    fi
13462    # 10*(2^10) chars as input seems more than enough
13463    test $ac_count -gt 10 && break
13464  done
13465  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13466esac
13467
13468      $ac_path_FGREP_found && break 3
13469    done
13470  done
13471  done
13472IFS=$as_save_IFS
13473  if test -z "$ac_cv_path_FGREP"; then
13474    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13475  fi
13476else
13477  ac_cv_path_FGREP=$FGREP
13478fi
13479
13480   fi
13481fi
13482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13483$as_echo "$ac_cv_path_FGREP" >&6; }
13484 FGREP="$ac_cv_path_FGREP"
13485
13486
13487    else
13488      # If it succeeded, then it was overridden by the user. We will use it
13489      # for the tool.
13490
13491      # First remove it from the list of overridden variables, so we can test
13492      # for unknown variables in the end.
13493      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13494
13495      # Check if we try to supply an empty value
13496      if test "x$FGREP" = x; then
13497        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13498$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13499        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13500$as_echo_n "checking for FGREP... " >&6; }
13501        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13502$as_echo "disabled" >&6; }
13503      else
13504        # Check if the provided tool contains a complete path.
13505        tool_specified="$FGREP"
13506        tool_basename="${tool_specified##*/}"
13507        if test "x$tool_basename" = "x$tool_specified"; then
13508          # A command without a complete path is provided, search $PATH.
13509          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13510$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13511          # Extract the first word of "$tool_basename", so it can be a program name with args.
13512set dummy $tool_basename; ac_word=$2
13513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13514$as_echo_n "checking for $ac_word... " >&6; }
13515if ${ac_cv_path_FGREP+:} false; then :
13516  $as_echo_n "(cached) " >&6
13517else
13518  case $FGREP in
13519  [\\/]* | ?:[\\/]*)
13520  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
13521  ;;
13522  *)
13523  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13524for as_dir in $PATH
13525do
13526  IFS=$as_save_IFS
13527  test -z "$as_dir" && as_dir=.
13528    for ac_exec_ext in '' $ac_executable_extensions; do
13529  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13530    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
13531    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13532    break 2
13533  fi
13534done
13535  done
13536IFS=$as_save_IFS
13537
13538  ;;
13539esac
13540fi
13541FGREP=$ac_cv_path_FGREP
13542if test -n "$FGREP"; then
13543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
13544$as_echo "$FGREP" >&6; }
13545else
13546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13547$as_echo "no" >&6; }
13548fi
13549
13550
13551          if test "x$FGREP" = x; then
13552            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13553          fi
13554        else
13555          # Otherwise we believe it is a complete path. Use it as it is.
13556          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
13557$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
13558          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13559$as_echo_n "checking for FGREP... " >&6; }
13560          if test ! -x "$tool_specified"; then
13561            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13562$as_echo "not found" >&6; }
13563            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13564          fi
13565          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13566$as_echo "$tool_specified" >&6; }
13567        fi
13568      fi
13569    fi
13570
13571  fi
13572
13573
13574  if test "x$FGREP" = x; then
13575    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
13576  fi
13577
13578
13579
13580
13581  # Publish this variable in the help.
13582
13583
13584  if [ -z "${SED+x}" ]; then
13585    # The variable is not set by user, try to locate tool using the code snippet
13586    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13587$as_echo_n "checking for a sed that does not truncate output... " >&6; }
13588if ${ac_cv_path_SED+:} false; then :
13589  $as_echo_n "(cached) " >&6
13590else
13591            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13592     for ac_i in 1 2 3 4 5 6 7; do
13593       ac_script="$ac_script$as_nl$ac_script"
13594     done
13595     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13596     { ac_script=; unset ac_script;}
13597     if test -z "$SED"; then
13598  ac_path_SED_found=false
13599  # Loop through the user's path and test for each of PROGNAME-LIST
13600  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13601for as_dir in $PATH
13602do
13603  IFS=$as_save_IFS
13604  test -z "$as_dir" && as_dir=.
13605    for ac_prog in sed gsed; do
13606    for ac_exec_ext in '' $ac_executable_extensions; do
13607      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13608      as_fn_executable_p "$ac_path_SED" || continue
13609# Check for GNU ac_path_SED and select it if it is found.
13610  # Check for GNU $ac_path_SED
13611case `"$ac_path_SED" --version 2>&1` in
13612*GNU*)
13613  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13614*)
13615  ac_count=0
13616  $as_echo_n 0123456789 >"conftest.in"
13617  while :
13618  do
13619    cat "conftest.in" "conftest.in" >"conftest.tmp"
13620    mv "conftest.tmp" "conftest.in"
13621    cp "conftest.in" "conftest.nl"
13622    $as_echo '' >> "conftest.nl"
13623    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13624    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13625    as_fn_arith $ac_count + 1 && ac_count=$as_val
13626    if test $ac_count -gt ${ac_path_SED_max-0}; then
13627      # Best one so far, save it but keep looking for a better one
13628      ac_cv_path_SED="$ac_path_SED"
13629      ac_path_SED_max=$ac_count
13630    fi
13631    # 10*(2^10) chars as input seems more than enough
13632    test $ac_count -gt 10 && break
13633  done
13634  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13635esac
13636
13637      $ac_path_SED_found && break 3
13638    done
13639  done
13640  done
13641IFS=$as_save_IFS
13642  if test -z "$ac_cv_path_SED"; then
13643    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13644  fi
13645else
13646  ac_cv_path_SED=$SED
13647fi
13648
13649fi
13650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13651$as_echo "$ac_cv_path_SED" >&6; }
13652 SED="$ac_cv_path_SED"
13653  rm -f conftest.sed
13654
13655  else
13656    # The variable is set, but is it from the command line or the environment?
13657
13658    # Try to remove the string !SED! from our list.
13659    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
13660    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13661      # If it failed, the variable was not from the command line. Ignore it,
13662      # but warn the user (except for BASH, which is always set by the calling BASH).
13663      if test "xSED" != xBASH; then
13664        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
13665$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
13666      fi
13667      # Try to locate tool using the code snippet
13668      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13669$as_echo_n "checking for a sed that does not truncate output... " >&6; }
13670if ${ac_cv_path_SED+:} false; then :
13671  $as_echo_n "(cached) " >&6
13672else
13673            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13674     for ac_i in 1 2 3 4 5 6 7; do
13675       ac_script="$ac_script$as_nl$ac_script"
13676     done
13677     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13678     { ac_script=; unset ac_script;}
13679     if test -z "$SED"; then
13680  ac_path_SED_found=false
13681  # Loop through the user's path and test for each of PROGNAME-LIST
13682  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13683for as_dir in $PATH
13684do
13685  IFS=$as_save_IFS
13686  test -z "$as_dir" && as_dir=.
13687    for ac_prog in sed gsed; do
13688    for ac_exec_ext in '' $ac_executable_extensions; do
13689      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13690      as_fn_executable_p "$ac_path_SED" || continue
13691# Check for GNU ac_path_SED and select it if it is found.
13692  # Check for GNU $ac_path_SED
13693case `"$ac_path_SED" --version 2>&1` in
13694*GNU*)
13695  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13696*)
13697  ac_count=0
13698  $as_echo_n 0123456789 >"conftest.in"
13699  while :
13700  do
13701    cat "conftest.in" "conftest.in" >"conftest.tmp"
13702    mv "conftest.tmp" "conftest.in"
13703    cp "conftest.in" "conftest.nl"
13704    $as_echo '' >> "conftest.nl"
13705    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13706    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13707    as_fn_arith $ac_count + 1 && ac_count=$as_val
13708    if test $ac_count -gt ${ac_path_SED_max-0}; then
13709      # Best one so far, save it but keep looking for a better one
13710      ac_cv_path_SED="$ac_path_SED"
13711      ac_path_SED_max=$ac_count
13712    fi
13713    # 10*(2^10) chars as input seems more than enough
13714    test $ac_count -gt 10 && break
13715  done
13716  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13717esac
13718
13719      $ac_path_SED_found && break 3
13720    done
13721  done
13722  done
13723IFS=$as_save_IFS
13724  if test -z "$ac_cv_path_SED"; then
13725    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13726  fi
13727else
13728  ac_cv_path_SED=$SED
13729fi
13730
13731fi
13732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13733$as_echo "$ac_cv_path_SED" >&6; }
13734 SED="$ac_cv_path_SED"
13735  rm -f conftest.sed
13736
13737    else
13738      # If it succeeded, then it was overridden by the user. We will use it
13739      # for the tool.
13740
13741      # First remove it from the list of overridden variables, so we can test
13742      # for unknown variables in the end.
13743      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13744
13745      # Check if we try to supply an empty value
13746      if test "x$SED" = x; then
13747        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
13748$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
13749        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13750$as_echo_n "checking for SED... " >&6; }
13751        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13752$as_echo "disabled" >&6; }
13753      else
13754        # Check if the provided tool contains a complete path.
13755        tool_specified="$SED"
13756        tool_basename="${tool_specified##*/}"
13757        if test "x$tool_basename" = "x$tool_specified"; then
13758          # A command without a complete path is provided, search $PATH.
13759          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
13760$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
13761          # Extract the first word of "$tool_basename", so it can be a program name with args.
13762set dummy $tool_basename; ac_word=$2
13763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13764$as_echo_n "checking for $ac_word... " >&6; }
13765if ${ac_cv_path_SED+:} false; then :
13766  $as_echo_n "(cached) " >&6
13767else
13768  case $SED in
13769  [\\/]* | ?:[\\/]*)
13770  ac_cv_path_SED="$SED" # Let the user override the test with a path.
13771  ;;
13772  *)
13773  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13774for as_dir in $PATH
13775do
13776  IFS=$as_save_IFS
13777  test -z "$as_dir" && as_dir=.
13778    for ac_exec_ext in '' $ac_executable_extensions; do
13779  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13780    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
13781    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13782    break 2
13783  fi
13784done
13785  done
13786IFS=$as_save_IFS
13787
13788  ;;
13789esac
13790fi
13791SED=$ac_cv_path_SED
13792if test -n "$SED"; then
13793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
13794$as_echo "$SED" >&6; }
13795else
13796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13797$as_echo "no" >&6; }
13798fi
13799
13800
13801          if test "x$SED" = x; then
13802            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13803          fi
13804        else
13805          # Otherwise we believe it is a complete path. Use it as it is.
13806          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
13807$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
13808          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13809$as_echo_n "checking for SED... " >&6; }
13810          if test ! -x "$tool_specified"; then
13811            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13812$as_echo "not found" >&6; }
13813            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
13814          fi
13815          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13816$as_echo "$tool_specified" >&6; }
13817        fi
13818      fi
13819    fi
13820
13821  fi
13822
13823
13824  if test "x$SED" = x; then
13825    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
13826  fi
13827
13828
13829
13830  # Always force rm.
13831  RM="$RM -f"
13832
13833  # pwd behaves differently on various platforms and some don't support the -L flag.
13834  # Always use the bash builtin pwd to get uniform behavior.
13835  THEPWDCMD=pwd
13836
13837  # These are not required on all platforms
13838
13839
13840  # Publish this variable in the help.
13841
13842
13843  if [ -z "${CYGPATH+x}" ]; then
13844    # The variable is not set by user, try to locate tool using the code snippet
13845    for ac_prog in cygpath
13846do
13847  # Extract the first word of "$ac_prog", so it can be a program name with args.
13848set dummy $ac_prog; ac_word=$2
13849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13850$as_echo_n "checking for $ac_word... " >&6; }
13851if ${ac_cv_path_CYGPATH+:} false; then :
13852  $as_echo_n "(cached) " >&6
13853else
13854  case $CYGPATH in
13855  [\\/]* | ?:[\\/]*)
13856  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13857  ;;
13858  *)
13859  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13860for as_dir in $PATH
13861do
13862  IFS=$as_save_IFS
13863  test -z "$as_dir" && as_dir=.
13864    for ac_exec_ext in '' $ac_executable_extensions; do
13865  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13866    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13867    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13868    break 2
13869  fi
13870done
13871  done
13872IFS=$as_save_IFS
13873
13874  ;;
13875esac
13876fi
13877CYGPATH=$ac_cv_path_CYGPATH
13878if test -n "$CYGPATH"; then
13879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13880$as_echo "$CYGPATH" >&6; }
13881else
13882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13883$as_echo "no" >&6; }
13884fi
13885
13886
13887  test -n "$CYGPATH" && break
13888done
13889
13890  else
13891    # The variable is set, but is it from the command line or the environment?
13892
13893    # Try to remove the string !CYGPATH! from our list.
13894    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
13895    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13896      # If it failed, the variable was not from the command line. Ignore it,
13897      # but warn the user (except for BASH, which is always set by the calling BASH).
13898      if test "xCYGPATH" != xBASH; then
13899        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
13900$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
13901      fi
13902      # Try to locate tool using the code snippet
13903      for ac_prog in cygpath
13904do
13905  # Extract the first word of "$ac_prog", so it can be a program name with args.
13906set dummy $ac_prog; ac_word=$2
13907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13908$as_echo_n "checking for $ac_word... " >&6; }
13909if ${ac_cv_path_CYGPATH+:} false; then :
13910  $as_echo_n "(cached) " >&6
13911else
13912  case $CYGPATH in
13913  [\\/]* | ?:[\\/]*)
13914  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13915  ;;
13916  *)
13917  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13918for as_dir in $PATH
13919do
13920  IFS=$as_save_IFS
13921  test -z "$as_dir" && as_dir=.
13922    for ac_exec_ext in '' $ac_executable_extensions; do
13923  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13924    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13925    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13926    break 2
13927  fi
13928done
13929  done
13930IFS=$as_save_IFS
13931
13932  ;;
13933esac
13934fi
13935CYGPATH=$ac_cv_path_CYGPATH
13936if test -n "$CYGPATH"; then
13937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13938$as_echo "$CYGPATH" >&6; }
13939else
13940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13941$as_echo "no" >&6; }
13942fi
13943
13944
13945  test -n "$CYGPATH" && break
13946done
13947
13948    else
13949      # If it succeeded, then it was overridden by the user. We will use it
13950      # for the tool.
13951
13952      # First remove it from the list of overridden variables, so we can test
13953      # for unknown variables in the end.
13954      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13955
13956      # Check if we try to supply an empty value
13957      if test "x$CYGPATH" = x; then
13958        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
13959$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
13960        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13961$as_echo_n "checking for CYGPATH... " >&6; }
13962        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13963$as_echo "disabled" >&6; }
13964      else
13965        # Check if the provided tool contains a complete path.
13966        tool_specified="$CYGPATH"
13967        tool_basename="${tool_specified##*/}"
13968        if test "x$tool_basename" = "x$tool_specified"; then
13969          # A command without a complete path is provided, search $PATH.
13970          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
13971$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
13972          # Extract the first word of "$tool_basename", so it can be a program name with args.
13973set dummy $tool_basename; ac_word=$2
13974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13975$as_echo_n "checking for $ac_word... " >&6; }
13976if ${ac_cv_path_CYGPATH+:} false; then :
13977  $as_echo_n "(cached) " >&6
13978else
13979  case $CYGPATH in
13980  [\\/]* | ?:[\\/]*)
13981  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13982  ;;
13983  *)
13984  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13985for as_dir in $PATH
13986do
13987  IFS=$as_save_IFS
13988  test -z "$as_dir" && as_dir=.
13989    for ac_exec_ext in '' $ac_executable_extensions; do
13990  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13991    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13992    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13993    break 2
13994  fi
13995done
13996  done
13997IFS=$as_save_IFS
13998
13999  ;;
14000esac
14001fi
14002CYGPATH=$ac_cv_path_CYGPATH
14003if test -n "$CYGPATH"; then
14004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14005$as_echo "$CYGPATH" >&6; }
14006else
14007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14008$as_echo "no" >&6; }
14009fi
14010
14011
14012          if test "x$CYGPATH" = x; then
14013            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14014          fi
14015        else
14016          # Otherwise we believe it is a complete path. Use it as it is.
14017          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14018$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14019          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14020$as_echo_n "checking for CYGPATH... " >&6; }
14021          if test ! -x "$tool_specified"; then
14022            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14023$as_echo "not found" >&6; }
14024            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14025          fi
14026          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14027$as_echo "$tool_specified" >&6; }
14028        fi
14029      fi
14030    fi
14031
14032  fi
14033
14034
14035
14036
14037  # Publish this variable in the help.
14038
14039
14040  if [ -z "${READLINK+x}" ]; then
14041    # The variable is not set by user, try to locate tool using the code snippet
14042    for ac_prog in greadlink readlink
14043do
14044  # Extract the first word of "$ac_prog", so it can be a program name with args.
14045set dummy $ac_prog; ac_word=$2
14046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14047$as_echo_n "checking for $ac_word... " >&6; }
14048if ${ac_cv_path_READLINK+:} false; then :
14049  $as_echo_n "(cached) " >&6
14050else
14051  case $READLINK in
14052  [\\/]* | ?:[\\/]*)
14053  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14054  ;;
14055  *)
14056  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14057for as_dir in $PATH
14058do
14059  IFS=$as_save_IFS
14060  test -z "$as_dir" && as_dir=.
14061    for ac_exec_ext in '' $ac_executable_extensions; do
14062  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14063    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14064    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14065    break 2
14066  fi
14067done
14068  done
14069IFS=$as_save_IFS
14070
14071  ;;
14072esac
14073fi
14074READLINK=$ac_cv_path_READLINK
14075if test -n "$READLINK"; then
14076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14077$as_echo "$READLINK" >&6; }
14078else
14079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14080$as_echo "no" >&6; }
14081fi
14082
14083
14084  test -n "$READLINK" && break
14085done
14086
14087  else
14088    # The variable is set, but is it from the command line or the environment?
14089
14090    # Try to remove the string !READLINK! from our list.
14091    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14092    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14093      # If it failed, the variable was not from the command line. Ignore it,
14094      # but warn the user (except for BASH, which is always set by the calling BASH).
14095      if test "xREADLINK" != xBASH; then
14096        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14097$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14098      fi
14099      # Try to locate tool using the code snippet
14100      for ac_prog in greadlink readlink
14101do
14102  # Extract the first word of "$ac_prog", so it can be a program name with args.
14103set dummy $ac_prog; ac_word=$2
14104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14105$as_echo_n "checking for $ac_word... " >&6; }
14106if ${ac_cv_path_READLINK+:} false; then :
14107  $as_echo_n "(cached) " >&6
14108else
14109  case $READLINK in
14110  [\\/]* | ?:[\\/]*)
14111  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14112  ;;
14113  *)
14114  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14115for as_dir in $PATH
14116do
14117  IFS=$as_save_IFS
14118  test -z "$as_dir" && as_dir=.
14119    for ac_exec_ext in '' $ac_executable_extensions; do
14120  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14121    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14122    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14123    break 2
14124  fi
14125done
14126  done
14127IFS=$as_save_IFS
14128
14129  ;;
14130esac
14131fi
14132READLINK=$ac_cv_path_READLINK
14133if test -n "$READLINK"; then
14134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14135$as_echo "$READLINK" >&6; }
14136else
14137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14138$as_echo "no" >&6; }
14139fi
14140
14141
14142  test -n "$READLINK" && break
14143done
14144
14145    else
14146      # If it succeeded, then it was overridden by the user. We will use it
14147      # for the tool.
14148
14149      # First remove it from the list of overridden variables, so we can test
14150      # for unknown variables in the end.
14151      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14152
14153      # Check if we try to supply an empty value
14154      if test "x$READLINK" = x; then
14155        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14156$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14157        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14158$as_echo_n "checking for READLINK... " >&6; }
14159        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14160$as_echo "disabled" >&6; }
14161      else
14162        # Check if the provided tool contains a complete path.
14163        tool_specified="$READLINK"
14164        tool_basename="${tool_specified##*/}"
14165        if test "x$tool_basename" = "x$tool_specified"; then
14166          # A command without a complete path is provided, search $PATH.
14167          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14168$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14169          # Extract the first word of "$tool_basename", so it can be a program name with args.
14170set dummy $tool_basename; ac_word=$2
14171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14172$as_echo_n "checking for $ac_word... " >&6; }
14173if ${ac_cv_path_READLINK+:} false; then :
14174  $as_echo_n "(cached) " >&6
14175else
14176  case $READLINK in
14177  [\\/]* | ?:[\\/]*)
14178  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14179  ;;
14180  *)
14181  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14182for as_dir in $PATH
14183do
14184  IFS=$as_save_IFS
14185  test -z "$as_dir" && as_dir=.
14186    for ac_exec_ext in '' $ac_executable_extensions; do
14187  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14188    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14189    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14190    break 2
14191  fi
14192done
14193  done
14194IFS=$as_save_IFS
14195
14196  ;;
14197esac
14198fi
14199READLINK=$ac_cv_path_READLINK
14200if test -n "$READLINK"; then
14201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14202$as_echo "$READLINK" >&6; }
14203else
14204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14205$as_echo "no" >&6; }
14206fi
14207
14208
14209          if test "x$READLINK" = x; then
14210            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14211          fi
14212        else
14213          # Otherwise we believe it is a complete path. Use it as it is.
14214          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14215$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14216          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14217$as_echo_n "checking for READLINK... " >&6; }
14218          if test ! -x "$tool_specified"; then
14219            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14220$as_echo "not found" >&6; }
14221            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14222          fi
14223          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14224$as_echo "$tool_specified" >&6; }
14225        fi
14226      fi
14227    fi
14228
14229  fi
14230
14231
14232
14233
14234  # Publish this variable in the help.
14235
14236
14237  if [ -z "${DF+x}" ]; then
14238    # The variable is not set by user, try to locate tool using the code snippet
14239    for ac_prog in df
14240do
14241  # Extract the first word of "$ac_prog", so it can be a program name with args.
14242set dummy $ac_prog; ac_word=$2
14243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14244$as_echo_n "checking for $ac_word... " >&6; }
14245if ${ac_cv_path_DF+:} false; then :
14246  $as_echo_n "(cached) " >&6
14247else
14248  case $DF in
14249  [\\/]* | ?:[\\/]*)
14250  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14251  ;;
14252  *)
14253  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14254for as_dir in $PATH
14255do
14256  IFS=$as_save_IFS
14257  test -z "$as_dir" && as_dir=.
14258    for ac_exec_ext in '' $ac_executable_extensions; do
14259  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14260    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14261    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14262    break 2
14263  fi
14264done
14265  done
14266IFS=$as_save_IFS
14267
14268  ;;
14269esac
14270fi
14271DF=$ac_cv_path_DF
14272if test -n "$DF"; then
14273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14274$as_echo "$DF" >&6; }
14275else
14276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14277$as_echo "no" >&6; }
14278fi
14279
14280
14281  test -n "$DF" && break
14282done
14283
14284  else
14285    # The variable is set, but is it from the command line or the environment?
14286
14287    # Try to remove the string !DF! from our list.
14288    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14289    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14290      # If it failed, the variable was not from the command line. Ignore it,
14291      # but warn the user (except for BASH, which is always set by the calling BASH).
14292      if test "xDF" != xBASH; then
14293        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14294$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14295      fi
14296      # Try to locate tool using the code snippet
14297      for ac_prog in df
14298do
14299  # Extract the first word of "$ac_prog", so it can be a program name with args.
14300set dummy $ac_prog; ac_word=$2
14301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14302$as_echo_n "checking for $ac_word... " >&6; }
14303if ${ac_cv_path_DF+:} false; then :
14304  $as_echo_n "(cached) " >&6
14305else
14306  case $DF in
14307  [\\/]* | ?:[\\/]*)
14308  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14309  ;;
14310  *)
14311  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14312for as_dir in $PATH
14313do
14314  IFS=$as_save_IFS
14315  test -z "$as_dir" && as_dir=.
14316    for ac_exec_ext in '' $ac_executable_extensions; do
14317  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14318    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14319    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14320    break 2
14321  fi
14322done
14323  done
14324IFS=$as_save_IFS
14325
14326  ;;
14327esac
14328fi
14329DF=$ac_cv_path_DF
14330if test -n "$DF"; then
14331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14332$as_echo "$DF" >&6; }
14333else
14334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14335$as_echo "no" >&6; }
14336fi
14337
14338
14339  test -n "$DF" && break
14340done
14341
14342    else
14343      # If it succeeded, then it was overridden by the user. We will use it
14344      # for the tool.
14345
14346      # First remove it from the list of overridden variables, so we can test
14347      # for unknown variables in the end.
14348      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14349
14350      # Check if we try to supply an empty value
14351      if test "x$DF" = x; then
14352        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14353$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14354        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14355$as_echo_n "checking for DF... " >&6; }
14356        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14357$as_echo "disabled" >&6; }
14358      else
14359        # Check if the provided tool contains a complete path.
14360        tool_specified="$DF"
14361        tool_basename="${tool_specified##*/}"
14362        if test "x$tool_basename" = "x$tool_specified"; then
14363          # A command without a complete path is provided, search $PATH.
14364          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14365$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14366          # Extract the first word of "$tool_basename", so it can be a program name with args.
14367set dummy $tool_basename; ac_word=$2
14368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14369$as_echo_n "checking for $ac_word... " >&6; }
14370if ${ac_cv_path_DF+:} false; then :
14371  $as_echo_n "(cached) " >&6
14372else
14373  case $DF in
14374  [\\/]* | ?:[\\/]*)
14375  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14376  ;;
14377  *)
14378  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14379for as_dir in $PATH
14380do
14381  IFS=$as_save_IFS
14382  test -z "$as_dir" && as_dir=.
14383    for ac_exec_ext in '' $ac_executable_extensions; do
14384  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14385    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14386    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14387    break 2
14388  fi
14389done
14390  done
14391IFS=$as_save_IFS
14392
14393  ;;
14394esac
14395fi
14396DF=$ac_cv_path_DF
14397if test -n "$DF"; then
14398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14399$as_echo "$DF" >&6; }
14400else
14401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14402$as_echo "no" >&6; }
14403fi
14404
14405
14406          if test "x$DF" = x; then
14407            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14408          fi
14409        else
14410          # Otherwise we believe it is a complete path. Use it as it is.
14411          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14412$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14413          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14414$as_echo_n "checking for DF... " >&6; }
14415          if test ! -x "$tool_specified"; then
14416            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14417$as_echo "not found" >&6; }
14418            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14419          fi
14420          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14421$as_echo "$tool_specified" >&6; }
14422        fi
14423      fi
14424    fi
14425
14426  fi
14427
14428
14429
14430
14431  # Publish this variable in the help.
14432
14433
14434  if [ -z "${CPIO+x}" ]; then
14435    # The variable is not set by user, try to locate tool using the code snippet
14436    for ac_prog in cpio bsdcpio
14437do
14438  # Extract the first word of "$ac_prog", so it can be a program name with args.
14439set dummy $ac_prog; ac_word=$2
14440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14441$as_echo_n "checking for $ac_word... " >&6; }
14442if ${ac_cv_path_CPIO+:} false; then :
14443  $as_echo_n "(cached) " >&6
14444else
14445  case $CPIO in
14446  [\\/]* | ?:[\\/]*)
14447  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14448  ;;
14449  *)
14450  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14451for as_dir in $PATH
14452do
14453  IFS=$as_save_IFS
14454  test -z "$as_dir" && as_dir=.
14455    for ac_exec_ext in '' $ac_executable_extensions; do
14456  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14457    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14458    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14459    break 2
14460  fi
14461done
14462  done
14463IFS=$as_save_IFS
14464
14465  ;;
14466esac
14467fi
14468CPIO=$ac_cv_path_CPIO
14469if test -n "$CPIO"; then
14470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14471$as_echo "$CPIO" >&6; }
14472else
14473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14474$as_echo "no" >&6; }
14475fi
14476
14477
14478  test -n "$CPIO" && break
14479done
14480
14481  else
14482    # The variable is set, but is it from the command line or the environment?
14483
14484    # Try to remove the string !CPIO! from our list.
14485    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14486    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14487      # If it failed, the variable was not from the command line. Ignore it,
14488      # but warn the user (except for BASH, which is always set by the calling BASH).
14489      if test "xCPIO" != xBASH; then
14490        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14491$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14492      fi
14493      # Try to locate tool using the code snippet
14494      for ac_prog in cpio bsdcpio
14495do
14496  # Extract the first word of "$ac_prog", so it can be a program name with args.
14497set dummy $ac_prog; ac_word=$2
14498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14499$as_echo_n "checking for $ac_word... " >&6; }
14500if ${ac_cv_path_CPIO+:} false; then :
14501  $as_echo_n "(cached) " >&6
14502else
14503  case $CPIO in
14504  [\\/]* | ?:[\\/]*)
14505  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14506  ;;
14507  *)
14508  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14509for as_dir in $PATH
14510do
14511  IFS=$as_save_IFS
14512  test -z "$as_dir" && as_dir=.
14513    for ac_exec_ext in '' $ac_executable_extensions; do
14514  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14515    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14516    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14517    break 2
14518  fi
14519done
14520  done
14521IFS=$as_save_IFS
14522
14523  ;;
14524esac
14525fi
14526CPIO=$ac_cv_path_CPIO
14527if test -n "$CPIO"; then
14528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14529$as_echo "$CPIO" >&6; }
14530else
14531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14532$as_echo "no" >&6; }
14533fi
14534
14535
14536  test -n "$CPIO" && break
14537done
14538
14539    else
14540      # If it succeeded, then it was overridden by the user. We will use it
14541      # for the tool.
14542
14543      # First remove it from the list of overridden variables, so we can test
14544      # for unknown variables in the end.
14545      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14546
14547      # Check if we try to supply an empty value
14548      if test "x$CPIO" = x; then
14549        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
14550$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
14551        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14552$as_echo_n "checking for CPIO... " >&6; }
14553        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14554$as_echo "disabled" >&6; }
14555      else
14556        # Check if the provided tool contains a complete path.
14557        tool_specified="$CPIO"
14558        tool_basename="${tool_specified##*/}"
14559        if test "x$tool_basename" = "x$tool_specified"; then
14560          # A command without a complete path is provided, search $PATH.
14561          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
14562$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
14563          # Extract the first word of "$tool_basename", so it can be a program name with args.
14564set dummy $tool_basename; ac_word=$2
14565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14566$as_echo_n "checking for $ac_word... " >&6; }
14567if ${ac_cv_path_CPIO+:} false; then :
14568  $as_echo_n "(cached) " >&6
14569else
14570  case $CPIO in
14571  [\\/]* | ?:[\\/]*)
14572  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14573  ;;
14574  *)
14575  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14576for as_dir in $PATH
14577do
14578  IFS=$as_save_IFS
14579  test -z "$as_dir" && as_dir=.
14580    for ac_exec_ext in '' $ac_executable_extensions; do
14581  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14582    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14583    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14584    break 2
14585  fi
14586done
14587  done
14588IFS=$as_save_IFS
14589
14590  ;;
14591esac
14592fi
14593CPIO=$ac_cv_path_CPIO
14594if test -n "$CPIO"; then
14595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14596$as_echo "$CPIO" >&6; }
14597else
14598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14599$as_echo "no" >&6; }
14600fi
14601
14602
14603          if test "x$CPIO" = x; then
14604            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14605          fi
14606        else
14607          # Otherwise we believe it is a complete path. Use it as it is.
14608          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
14609$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
14610          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14611$as_echo_n "checking for CPIO... " >&6; }
14612          if test ! -x "$tool_specified"; then
14613            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14614$as_echo "not found" >&6; }
14615            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
14616          fi
14617          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14618$as_echo "$tool_specified" >&6; }
14619        fi
14620      fi
14621    fi
14622
14623  fi
14624
14625
14626
14627
14628  # Publish this variable in the help.
14629
14630
14631  if [ -z "${NICE+x}" ]; then
14632    # The variable is not set by user, try to locate tool using the code snippet
14633    for ac_prog in nice
14634do
14635  # Extract the first word of "$ac_prog", so it can be a program name with args.
14636set dummy $ac_prog; ac_word=$2
14637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14638$as_echo_n "checking for $ac_word... " >&6; }
14639if ${ac_cv_path_NICE+:} false; then :
14640  $as_echo_n "(cached) " >&6
14641else
14642  case $NICE in
14643  [\\/]* | ?:[\\/]*)
14644  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14645  ;;
14646  *)
14647  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14648for as_dir in $PATH
14649do
14650  IFS=$as_save_IFS
14651  test -z "$as_dir" && as_dir=.
14652    for ac_exec_ext in '' $ac_executable_extensions; do
14653  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14654    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14655    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14656    break 2
14657  fi
14658done
14659  done
14660IFS=$as_save_IFS
14661
14662  ;;
14663esac
14664fi
14665NICE=$ac_cv_path_NICE
14666if test -n "$NICE"; then
14667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14668$as_echo "$NICE" >&6; }
14669else
14670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14671$as_echo "no" >&6; }
14672fi
14673
14674
14675  test -n "$NICE" && break
14676done
14677
14678  else
14679    # The variable is set, but is it from the command line or the environment?
14680
14681    # Try to remove the string !NICE! from our list.
14682    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
14683    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14684      # If it failed, the variable was not from the command line. Ignore it,
14685      # but warn the user (except for BASH, which is always set by the calling BASH).
14686      if test "xNICE" != xBASH; then
14687        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
14688$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
14689      fi
14690      # Try to locate tool using the code snippet
14691      for ac_prog in nice
14692do
14693  # Extract the first word of "$ac_prog", so it can be a program name with args.
14694set dummy $ac_prog; ac_word=$2
14695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14696$as_echo_n "checking for $ac_word... " >&6; }
14697if ${ac_cv_path_NICE+:} false; then :
14698  $as_echo_n "(cached) " >&6
14699else
14700  case $NICE in
14701  [\\/]* | ?:[\\/]*)
14702  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14703  ;;
14704  *)
14705  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14706for as_dir in $PATH
14707do
14708  IFS=$as_save_IFS
14709  test -z "$as_dir" && as_dir=.
14710    for ac_exec_ext in '' $ac_executable_extensions; do
14711  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14712    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14713    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14714    break 2
14715  fi
14716done
14717  done
14718IFS=$as_save_IFS
14719
14720  ;;
14721esac
14722fi
14723NICE=$ac_cv_path_NICE
14724if test -n "$NICE"; then
14725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14726$as_echo "$NICE" >&6; }
14727else
14728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14729$as_echo "no" >&6; }
14730fi
14731
14732
14733  test -n "$NICE" && break
14734done
14735
14736    else
14737      # If it succeeded, then it was overridden by the user. We will use it
14738      # for the tool.
14739
14740      # First remove it from the list of overridden variables, so we can test
14741      # for unknown variables in the end.
14742      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14743
14744      # Check if we try to supply an empty value
14745      if test "x$NICE" = x; then
14746        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
14747$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
14748        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14749$as_echo_n "checking for NICE... " >&6; }
14750        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14751$as_echo "disabled" >&6; }
14752      else
14753        # Check if the provided tool contains a complete path.
14754        tool_specified="$NICE"
14755        tool_basename="${tool_specified##*/}"
14756        if test "x$tool_basename" = "x$tool_specified"; then
14757          # A command without a complete path is provided, search $PATH.
14758          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
14759$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
14760          # Extract the first word of "$tool_basename", so it can be a program name with args.
14761set dummy $tool_basename; ac_word=$2
14762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14763$as_echo_n "checking for $ac_word... " >&6; }
14764if ${ac_cv_path_NICE+:} false; then :
14765  $as_echo_n "(cached) " >&6
14766else
14767  case $NICE in
14768  [\\/]* | ?:[\\/]*)
14769  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14770  ;;
14771  *)
14772  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14773for as_dir in $PATH
14774do
14775  IFS=$as_save_IFS
14776  test -z "$as_dir" && as_dir=.
14777    for ac_exec_ext in '' $ac_executable_extensions; do
14778  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14779    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14780    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14781    break 2
14782  fi
14783done
14784  done
14785IFS=$as_save_IFS
14786
14787  ;;
14788esac
14789fi
14790NICE=$ac_cv_path_NICE
14791if test -n "$NICE"; then
14792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14793$as_echo "$NICE" >&6; }
14794else
14795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14796$as_echo "no" >&6; }
14797fi
14798
14799
14800          if test "x$NICE" = x; then
14801            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14802          fi
14803        else
14804          # Otherwise we believe it is a complete path. Use it as it is.
14805          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
14806$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
14807          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14808$as_echo_n "checking for NICE... " >&6; }
14809          if test ! -x "$tool_specified"; then
14810            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14811$as_echo "not found" >&6; }
14812            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
14813          fi
14814          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14815$as_echo "$tool_specified" >&6; }
14816        fi
14817      fi
14818    fi
14819
14820  fi
14821
14822
14823
14824
14825# Now we can determine OpenJDK build and target platforms. This is required to
14826# have early on.
14827# Make sure we can run config.sub.
14828$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
14829  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
14830
14831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
14832$as_echo_n "checking build system type... " >&6; }
14833if ${ac_cv_build+:} false; then :
14834  $as_echo_n "(cached) " >&6
14835else
14836  ac_build_alias=$build_alias
14837test "x$ac_build_alias" = x &&
14838  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
14839test "x$ac_build_alias" = x &&
14840  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
14841ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
14842  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
14843
14844fi
14845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
14846$as_echo "$ac_cv_build" >&6; }
14847case $ac_cv_build in
14848*-*-*) ;;
14849*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
14850esac
14851build=$ac_cv_build
14852ac_save_IFS=$IFS; IFS='-'
14853set x $ac_cv_build
14854shift
14855build_cpu=$1
14856build_vendor=$2
14857shift; shift
14858# Remember, the first character of IFS is used to create $*,
14859# except with old shells:
14860build_os=$*
14861IFS=$ac_save_IFS
14862case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
14863
14864
14865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
14866$as_echo_n "checking host system type... " >&6; }
14867if ${ac_cv_host+:} false; then :
14868  $as_echo_n "(cached) " >&6
14869else
14870  if test "x$host_alias" = x; then
14871  ac_cv_host=$ac_cv_build
14872else
14873  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
14874    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
14875fi
14876
14877fi
14878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
14879$as_echo "$ac_cv_host" >&6; }
14880case $ac_cv_host in
14881*-*-*) ;;
14882*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
14883esac
14884host=$ac_cv_host
14885ac_save_IFS=$IFS; IFS='-'
14886set x $ac_cv_host
14887shift
14888host_cpu=$1
14889host_vendor=$2
14890shift; shift
14891# Remember, the first character of IFS is used to create $*,
14892# except with old shells:
14893host_os=$*
14894IFS=$ac_save_IFS
14895case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
14896
14897
14898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
14899$as_echo_n "checking target system type... " >&6; }
14900if ${ac_cv_target+:} false; then :
14901  $as_echo_n "(cached) " >&6
14902else
14903  if test "x$target_alias" = x; then
14904  ac_cv_target=$ac_cv_host
14905else
14906  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
14907    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
14908fi
14909
14910fi
14911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
14912$as_echo "$ac_cv_target" >&6; }
14913case $ac_cv_target in
14914*-*-*) ;;
14915*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
14916esac
14917target=$ac_cv_target
14918ac_save_IFS=$IFS; IFS='-'
14919set x $ac_cv_target
14920shift
14921target_cpu=$1
14922target_vendor=$2
14923shift; shift
14924# Remember, the first character of IFS is used to create $*,
14925# except with old shells:
14926target_os=$*
14927IFS=$ac_save_IFS
14928case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
14929
14930
14931# The aliases save the names the user supplied, while $host etc.
14932# will get canonicalized.
14933test -n "$target_alias" &&
14934  test "$program_prefix$program_suffix$program_transform_name" = \
14935    NONENONEs,x,x, &&
14936  program_prefix=${target_alias}-
14937
14938  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
14939  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
14940  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
14941  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
14942  # to use the configure naming style.
14943
14944
14945
14946
14947
14948  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
14949  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
14950  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
14951  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
14952  OPENJDK_TARGET_AUTOCONF_NAME="$host"
14953  OPENJDK_BUILD_AUTOCONF_NAME="$build"
14954
14955
14956
14957  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14958
14959  case "$build_os" in
14960    *linux*)
14961      VAR_OS=linux
14962      VAR_OS_TYPE=unix
14963      ;;
14964    *solaris*)
14965      VAR_OS=solaris
14966      VAR_OS_TYPE=unix
14967      ;;
14968    *darwin*)
14969      VAR_OS=macosx
14970      VAR_OS_TYPE=unix
14971      ;;
14972    *bsd*)
14973      VAR_OS=bsd
14974      VAR_OS_TYPE=unix
14975      ;;
14976    *cygwin*)
14977      VAR_OS=windows
14978      VAR_OS_ENV=windows.cygwin
14979      ;;
14980    *mingw*)
14981      VAR_OS=windows
14982      VAR_OS_ENV=windows.msys
14983      ;;
14984    *aix*)
14985      VAR_OS=aix
14986      VAR_OS_TYPE=unix
14987      ;;
14988    *)
14989      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
14990      ;;
14991  esac
14992
14993
14994  # First argument is the cpu name from the trip/quad
14995  case "$build_cpu" in
14996    x86_64)
14997      VAR_CPU=x86_64
14998      VAR_CPU_ARCH=x86
14999      VAR_CPU_BITS=64
15000      VAR_CPU_ENDIAN=little
15001      ;;
15002    i?86)
15003      VAR_CPU=x86
15004      VAR_CPU_ARCH=x86
15005      VAR_CPU_BITS=32
15006      VAR_CPU_ENDIAN=little
15007      ;;
15008    arm*)
15009      VAR_CPU=arm
15010      VAR_CPU_ARCH=arm
15011      VAR_CPU_BITS=32
15012      VAR_CPU_ENDIAN=little
15013      ;;
15014    aarch64)
15015      VAR_CPU=aarch64
15016      VAR_CPU_ARCH=aarch64
15017      VAR_CPU_BITS=64
15018      VAR_CPU_ENDIAN=little
15019      ;;
15020    powerpc)
15021      VAR_CPU=ppc
15022      VAR_CPU_ARCH=ppc
15023      VAR_CPU_BITS=32
15024      VAR_CPU_ENDIAN=big
15025      ;;
15026    powerpc64)
15027      VAR_CPU=ppc64
15028      VAR_CPU_ARCH=ppc
15029      VAR_CPU_BITS=64
15030      VAR_CPU_ENDIAN=big
15031      ;;
15032    powerpc64le)
15033      VAR_CPU=ppc64le
15034      VAR_CPU_ARCH=ppc
15035      VAR_CPU_BITS=64
15036      VAR_CPU_ENDIAN=little
15037      ;;
15038    s390)
15039      VAR_CPU=s390
15040      VAR_CPU_ARCH=s390
15041      VAR_CPU_BITS=32
15042      VAR_CPU_ENDIAN=big
15043      ;;
15044    s390x)
15045      VAR_CPU=s390x
15046      VAR_CPU_ARCH=s390
15047      VAR_CPU_BITS=64
15048      VAR_CPU_ENDIAN=big
15049      ;;
15050    sparc)
15051      VAR_CPU=sparc
15052      VAR_CPU_ARCH=sparc
15053      VAR_CPU_BITS=32
15054      VAR_CPU_ENDIAN=big
15055      ;;
15056    sparcv9|sparc64)
15057      VAR_CPU=sparcv9
15058      VAR_CPU_ARCH=sparc
15059      VAR_CPU_BITS=64
15060      VAR_CPU_ENDIAN=big
15061      ;;
15062    *)
15063      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15064      ;;
15065  esac
15066
15067  # ..and setup our own variables. (Do this explicitely to facilitate searching)
15068  OPENJDK_BUILD_OS="$VAR_OS"
15069  if test "x$VAR_OS_TYPE" != x; then
15070    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15071  else
15072    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15073  fi
15074  if test "x$VAR_OS_ENV" != x; then
15075    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15076  else
15077    OPENJDK_BUILD_OS_ENV="$VAR_OS"
15078  fi
15079  OPENJDK_BUILD_CPU="$VAR_CPU"
15080  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15081  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15082  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15083
15084
15085
15086
15087
15088
15089
15090
15091  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15092$as_echo_n "checking openjdk-build os-cpu... " >&6; }
15093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15094$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15095
15096  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15097
15098  case "$host_os" in
15099    *linux*)
15100      VAR_OS=linux
15101      VAR_OS_TYPE=unix
15102      ;;
15103    *solaris*)
15104      VAR_OS=solaris
15105      VAR_OS_TYPE=unix
15106      ;;
15107    *darwin*)
15108      VAR_OS=macosx
15109      VAR_OS_TYPE=unix
15110      ;;
15111    *bsd*)
15112      VAR_OS=bsd
15113      VAR_OS_TYPE=unix
15114      ;;
15115    *cygwin*)
15116      VAR_OS=windows
15117      VAR_OS_ENV=windows.cygwin
15118      ;;
15119    *mingw*)
15120      VAR_OS=windows
15121      VAR_OS_ENV=windows.msys
15122      ;;
15123    *aix*)
15124      VAR_OS=aix
15125      VAR_OS_TYPE=unix
15126      ;;
15127    *)
15128      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15129      ;;
15130  esac
15131
15132
15133  # First argument is the cpu name from the trip/quad
15134  case "$host_cpu" in
15135    x86_64)
15136      VAR_CPU=x86_64
15137      VAR_CPU_ARCH=x86
15138      VAR_CPU_BITS=64
15139      VAR_CPU_ENDIAN=little
15140      ;;
15141    i?86)
15142      VAR_CPU=x86
15143      VAR_CPU_ARCH=x86
15144      VAR_CPU_BITS=32
15145      VAR_CPU_ENDIAN=little
15146      ;;
15147    arm*)
15148      VAR_CPU=arm
15149      VAR_CPU_ARCH=arm
15150      VAR_CPU_BITS=32
15151      VAR_CPU_ENDIAN=little
15152      ;;
15153    aarch64)
15154      VAR_CPU=aarch64
15155      VAR_CPU_ARCH=aarch64
15156      VAR_CPU_BITS=64
15157      VAR_CPU_ENDIAN=little
15158      ;;
15159    powerpc)
15160      VAR_CPU=ppc
15161      VAR_CPU_ARCH=ppc
15162      VAR_CPU_BITS=32
15163      VAR_CPU_ENDIAN=big
15164      ;;
15165    powerpc64)
15166      VAR_CPU=ppc64
15167      VAR_CPU_ARCH=ppc
15168      VAR_CPU_BITS=64
15169      VAR_CPU_ENDIAN=big
15170      ;;
15171    powerpc64le)
15172      VAR_CPU=ppc64le
15173      VAR_CPU_ARCH=ppc
15174      VAR_CPU_BITS=64
15175      VAR_CPU_ENDIAN=little
15176      ;;
15177    s390)
15178      VAR_CPU=s390
15179      VAR_CPU_ARCH=s390
15180      VAR_CPU_BITS=32
15181      VAR_CPU_ENDIAN=big
15182      ;;
15183    s390x)
15184      VAR_CPU=s390x
15185      VAR_CPU_ARCH=s390
15186      VAR_CPU_BITS=64
15187      VAR_CPU_ENDIAN=big
15188      ;;
15189    sparc)
15190      VAR_CPU=sparc
15191      VAR_CPU_ARCH=sparc
15192      VAR_CPU_BITS=32
15193      VAR_CPU_ENDIAN=big
15194      ;;
15195    sparcv9|sparc64)
15196      VAR_CPU=sparcv9
15197      VAR_CPU_ARCH=sparc
15198      VAR_CPU_BITS=64
15199      VAR_CPU_ENDIAN=big
15200      ;;
15201    *)
15202      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15203      ;;
15204  esac
15205
15206  # ... and setup our own variables. (Do this explicitely to facilitate searching)
15207  OPENJDK_TARGET_OS="$VAR_OS"
15208  if test "x$VAR_OS_TYPE" != x; then
15209    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15210  else
15211    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15212  fi
15213  if test "x$VAR_OS_ENV" != x; then
15214    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15215  else
15216    OPENJDK_TARGET_OS_ENV="$VAR_OS"
15217  fi
15218  OPENJDK_TARGET_CPU="$VAR_CPU"
15219  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15220  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15221  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15222
15223
15224
15225
15226
15227
15228
15229
15230  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15231$as_echo_n "checking openjdk-target os-cpu... " >&6; }
15232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15233$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15234
15235
15236
15237# Check whether --with-target-bits was given.
15238if test "${with_target_bits+set}" = set; then :
15239  withval=$with_target_bits;
15240fi
15241
15242
15243  # We have three types of compiles:
15244  # native  == normal compilation, target system == build system
15245  # cross   == traditional cross compilation, target system != build system; special toolchain needed
15246  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15247  #
15248  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15249    # We're doing a proper cross-compilation
15250    COMPILE_TYPE="cross"
15251  else
15252    COMPILE_TYPE="native"
15253  fi
15254
15255  if test "x$with_target_bits" != x; then
15256    if test "x$COMPILE_TYPE" = "xcross"; then
15257      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15258    fi
15259
15260    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15261      # A reduced build is requested
15262      COMPILE_TYPE="reduced"
15263      OPENJDK_TARGET_CPU_BITS=32
15264      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
15265        OPENJDK_TARGET_CPU=x86
15266      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
15267        OPENJDK_TARGET_CPU=sparc
15268      else
15269        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
15270      fi
15271    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15272      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
15273    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
15274      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
15275$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
15276    else
15277      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
15278    fi
15279  fi
15280
15281
15282  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
15283$as_echo_n "checking compilation type... " >&6; }
15284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
15285$as_echo "$COMPILE_TYPE" >&6; }
15286
15287
15288  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
15289    REQUIRED_OS_NAME=SunOS
15290    REQUIRED_OS_VERSION=5.10
15291  fi
15292  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
15293    REQUIRED_OS_NAME=Linux
15294    REQUIRED_OS_VERSION=2.6
15295  fi
15296  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15297    REQUIRED_OS_NAME=Windows
15298    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
15299      REQUIRED_OS_VERSION=5.2
15300    else
15301      REQUIRED_OS_VERSION=5.1
15302    fi
15303  fi
15304  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15305    REQUIRED_OS_NAME=Darwin
15306    REQUIRED_OS_VERSION=11.2
15307  fi
15308  if test "x$OPENJDK_TARGET_OS" = "xaix"; then
15309    REQUIRED_OS_NAME=AIX
15310    REQUIRED_OS_VERSION=7.1
15311  fi
15312
15313
15314
15315
15316
15317
15318  # Also store the legacy naming of the cpu.
15319  # Ie i586 and amd64 instead of x86 and x86_64
15320  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
15321  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15322    OPENJDK_TARGET_CPU_LEGACY="i586"
15323  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15324    # On all platforms except MacOSX replace x86_64 with amd64.
15325    OPENJDK_TARGET_CPU_LEGACY="amd64"
15326  fi
15327
15328
15329  # And the second legacy naming of the cpu.
15330  # Ie i386 and amd64 instead of x86 and x86_64.
15331  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
15332  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15333    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
15334  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15335    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
15336  fi
15337
15338
15339  # This is the name of the cpu (but using i386 and amd64 instead of
15340  # x86 and x86_64, respectively), preceeded by a /, to be used when
15341  # locating libraries. On macosx, it's empty, though.
15342  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
15343  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15344    OPENJDK_TARGET_CPU_LIBDIR=""
15345  fi
15346
15347
15348  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15349  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15350  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
15351  OPENJDK_TARGET_CPU_ISADIR=""
15352  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15353    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15354      OPENJDK_TARGET_CPU_ISADIR="/amd64"
15355    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15356      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
15357    fi
15358  fi
15359
15360
15361  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
15362  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
15363  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
15364    # On linux only, we replace x86 with i386.
15365    OPENJDK_TARGET_CPU_OSARCH="i386"
15366  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15367    # On all platforms except macosx, we replace x86_64 with amd64.
15368    OPENJDK_TARGET_CPU_OSARCH="amd64"
15369  fi
15370
15371
15372  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
15373  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15374    OPENJDK_TARGET_CPU_JLI="i386"
15375  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15376    # On all platforms except macosx, we replace x86_64 with amd64.
15377    OPENJDK_TARGET_CPU_JLI="amd64"
15378  fi
15379  # Now setup the -D flags for building libjli.
15380  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
15381  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15382    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
15383      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
15384    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
15385      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
15386    fi
15387  fi
15388
15389
15390  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15391      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
15392  else
15393      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
15394  fi
15395
15396
15397  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15398    A_LP64="LP64:="
15399    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15400    # unpack200.exe
15401    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
15402      OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
15403    fi
15404  fi
15405  LP64=$A_LP64
15406
15407
15408  if test "x$COMPILE_TYPE" = "xcross"; then
15409    # FIXME: ... or should this include reduced builds..?
15410    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
15411  else
15412    DEFINE_CROSS_COMPILE_ARCH=""
15413  fi
15414
15415
15416  # Convert openjdk platform names to hotspot names
15417
15418  HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
15419  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15420    HOTSPOT_TARGET_OS=bsd
15421  fi
15422
15423
15424  HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
15425  if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
15426    HOTSPOT_TARGET_OS_TYPE=posix
15427  fi
15428
15429
15430  HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
15431  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15432    HOTSPOT_TARGET_CPU=x86_32
15433  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15434    HOTSPOT_TARGET_CPU=sparc
15435  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15436    HOTSPOT_TARGET_CPU=ppc_64
15437  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15438    HOTSPOT_TARGET_CPU=ppc_64
15439  fi
15440
15441
15442  # This is identical with OPENJDK_*, but define anyway for consistency.
15443  HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
15444
15445
15446  # Setup HOTSPOT_TARGET_CPU_DEFINE
15447  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15448    HOTSPOT_TARGET_CPU_DEFINE=IA32
15449  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15450    HOTSPOT_TARGET_CPU_DEFINE=AMD64
15451  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15452    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15453  elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15454    HOTSPOT_TARGET_CPU_DEFINE=AARCH64
15455  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15456    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15457  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15458    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15459
15460  # The cpu defines below are for zero, we don't support them directly.
15461  elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
15462    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15463  elif test "x$OPENJDK_TARGET_CPU" = xppc; then
15464    HOTSPOT_TARGET_CPU_DEFINE=PPC32
15465  elif test "x$OPENJDK_TARGET_CPU" = xs390; then
15466    HOTSPOT_TARGET_CPU_DEFINE=S390
15467  elif test "x$OPENJDK_TARGET_CPU" = ss390x; then
15468    HOTSPOT_TARGET_CPU_DEFINE=S390
15469  fi
15470
15471
15472
15473
15474  # Also store the legacy naming of the cpu.
15475  # Ie i586 and amd64 instead of x86 and x86_64
15476  OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
15477  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15478    OPENJDK_BUILD_CPU_LEGACY="i586"
15479  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15480    # On all platforms except MacOSX replace x86_64 with amd64.
15481    OPENJDK_BUILD_CPU_LEGACY="amd64"
15482  fi
15483
15484
15485  # And the second legacy naming of the cpu.
15486  # Ie i386 and amd64 instead of x86 and x86_64.
15487  OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
15488  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15489    OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
15490  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15491    OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
15492  fi
15493
15494
15495  # This is the name of the cpu (but using i386 and amd64 instead of
15496  # x86 and x86_64, respectively), preceeded by a /, to be used when
15497  # locating libraries. On macosx, it's empty, though.
15498  OPENJDK_BUILD_CPU_LIBDIR="/$OPENJDK_BUILD_CPU_LEGACY_LIB"
15499  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
15500    OPENJDK_BUILD_CPU_LIBDIR=""
15501  fi
15502
15503
15504  # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15505  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15506  # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
15507  OPENJDK_BUILD_CPU_ISADIR=""
15508  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
15509    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15510      OPENJDK_BUILD_CPU_ISADIR="/amd64"
15511    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
15512      OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
15513    fi
15514  fi
15515
15516
15517  # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
15518  OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
15519  if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
15520    # On linux only, we replace x86 with i386.
15521    OPENJDK_BUILD_CPU_OSARCH="i386"
15522  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15523    # On all platforms except macosx, we replace x86_64 with amd64.
15524    OPENJDK_BUILD_CPU_OSARCH="amd64"
15525  fi
15526
15527
15528  OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
15529  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15530    OPENJDK_BUILD_CPU_JLI="i386"
15531  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15532    # On all platforms except macosx, we replace x86_64 with amd64.
15533    OPENJDK_BUILD_CPU_JLI="amd64"
15534  fi
15535  # Now setup the -D flags for building libjli.
15536  OPENJDK_BUILD_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_BUILD_CPU_JLI\"'"
15537  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
15538    if test "x$OPENJDK_BUILD_CPU_ARCH" = xsparc; then
15539      OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
15540    elif test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
15541      OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
15542    fi
15543  fi
15544
15545
15546  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
15547      OPENJDK_BUILD_OS_EXPORT_DIR=macosx
15548  else
15549      OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
15550  fi
15551
15552
15553  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
15554    A_LP64="LP64:="
15555    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15556    # unpack200.exe
15557    if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
15558      OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
15559    fi
15560  fi
15561  LP64=$A_LP64
15562
15563
15564  if test "x$COMPILE_TYPE" = "xcross"; then
15565    # FIXME: ... or should this include reduced builds..?
15566    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
15567  else
15568    DEFINE_CROSS_COMPILE_ARCH=""
15569  fi
15570
15571
15572  # Convert openjdk platform names to hotspot names
15573
15574  HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
15575  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
15576    HOTSPOT_BUILD_OS=bsd
15577  fi
15578
15579
15580  HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
15581  if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
15582    HOTSPOT_BUILD_OS_TYPE=posix
15583  fi
15584
15585
15586  HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
15587  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15588    HOTSPOT_BUILD_CPU=x86_32
15589  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
15590    HOTSPOT_BUILD_CPU=sparc
15591  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
15592    HOTSPOT_BUILD_CPU=ppc_64
15593  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
15594    HOTSPOT_BUILD_CPU=ppc_64
15595  fi
15596
15597
15598  # This is identical with OPENJDK_*, but define anyway for consistency.
15599  HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
15600
15601
15602  # Setup HOTSPOT_BUILD_CPU_DEFINE
15603  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15604    HOTSPOT_BUILD_CPU_DEFINE=IA32
15605  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15606    HOTSPOT_BUILD_CPU_DEFINE=AMD64
15607  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
15608    HOTSPOT_BUILD_CPU_DEFINE=SPARC
15609  elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
15610    HOTSPOT_BUILD_CPU_DEFINE=AARCH64
15611  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
15612    HOTSPOT_BUILD_CPU_DEFINE=PPC64
15613  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
15614    HOTSPOT_BUILD_CPU_DEFINE=PPC64
15615
15616  # The cpu defines below are for zero, we don't support them directly.
15617  elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
15618    HOTSPOT_BUILD_CPU_DEFINE=SPARC
15619  elif test "x$OPENJDK_BUILD_CPU" = xppc; then
15620    HOTSPOT_BUILD_CPU_DEFINE=PPC32
15621  elif test "x$OPENJDK_BUILD_CPU" = xs390; then
15622    HOTSPOT_BUILD_CPU_DEFINE=S390
15623  elif test "x$OPENJDK_BUILD_CPU" = ss390x; then
15624    HOTSPOT_BUILD_CPU_DEFINE=S390
15625  fi
15626
15627
15628
15629
15630  # ZERO_ARCHDEF is used to enable architecture-specific code.
15631  # This is used in legacy hotspot build.
15632  ZERO_ARCHDEF="$HOTSPOT_TARGET_CPU_DEFINE"
15633
15634
15635
15636
15637
15638# Continue setting up basic stuff. Most remaining code require fundamental tools.
15639
15640  # Save the current directory this script was started from
15641  CURDIR="$PWD"
15642
15643  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
15644  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
15645  # was not available at that time.
15646  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
15647  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
15648    ORIGINAL_PATH="$REWRITTEN_PATH"
15649    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
15650$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
15651  fi
15652
15653  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15654    PATH_SEP=";"
15655
15656  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
15657  if test $SRC_ROOT_LENGTH -gt 100; then
15658    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
15659  fi
15660
15661  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15662    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
15663$as_echo_n "checking cygwin release... " >&6; }
15664    CYGWIN_VERSION=`$UNAME -r`
15665    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
15666$as_echo "$CYGWIN_VERSION" >&6; }
15667    WINDOWS_ENV_VENDOR='cygwin'
15668    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
15669
15670    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
15671    if test "x$CYGWIN_VERSION_OLD" != x; then
15672      { $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
15673$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;}
15674      as_fn_error $? "Cannot continue" "$LINENO" 5
15675    fi
15676    if test "x$CYGPATH" = x; then
15677      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
15678    fi
15679    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
15680$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
15681    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15682    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
15683    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
15684    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
15685    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
15686$as_echo "$CYGWIN_ROOT_PATH" >&6; }
15687    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
15688    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
15689    if test "x$test_cygdrive_prefix" = x; then
15690      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
15691    fi
15692  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15693    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
15694$as_echo_n "checking msys release... " >&6; }
15695    MSYS_VERSION=`$UNAME -r`
15696    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
15697$as_echo "$MSYS_VERSION" >&6; }
15698
15699    WINDOWS_ENV_VENDOR='msys'
15700    WINDOWS_ENV_VERSION="$MSYS_VERSION"
15701
15702    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
15703$as_echo_n "checking msys root directory as unix-style path... " >&6; }
15704    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15705    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
15706
15707  windows_path="$MSYS_ROOT_PATH"
15708  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15709    unix_path=`$CYGPATH -u "$windows_path"`
15710    MSYS_ROOT_PATH="$unix_path"
15711  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15712    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15713    MSYS_ROOT_PATH="$unix_path"
15714  fi
15715
15716    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
15717$as_echo "$MSYS_ROOT_PATH" >&6; }
15718    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
15719  else
15720    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
15721  fi
15722
15723  # Test if windows or unix (cygwin/msys) find is first in path.
15724  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
15725$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
15726  FIND_BINARY_OUTPUT=`find --version 2>&1`
15727  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
15728    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
15729$as_echo "unix style" >&6; }
15730  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
15731    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
15732$as_echo "Windows" >&6; }
15733    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
15734$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
15735    { $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
15736$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
15737    as_fn_error $? "Cannot continue" "$LINENO" 5
15738  else
15739    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
15740$as_echo "unknown" >&6; }
15741    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
15742$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
15743  fi
15744
15745  else
15746    PATH_SEP=":"
15747  fi
15748
15749
15750  # We get the top-level directory from the supporting wrappers.
15751  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
15752$as_echo_n "checking for top-level directory... " >&6; }
15753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
15754$as_echo "$TOPDIR" >&6; }
15755
15756
15757  # Save the original version of TOPDIR for string comparisons
15758  ORIGINAL_TOPDIR="$TOPDIR"
15759
15760
15761  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
15762
15763  # Only process if variable expands to non-empty
15764
15765  if test "x$CURDIR" != x; then
15766    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15767
15768  # Input might be given as Windows format, start by converting to
15769  # unix format.
15770  path="$CURDIR"
15771  new_path=`$CYGPATH -u "$path"`
15772
15773  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15774  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15775  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15776  # "foo.exe" is OK but "foo" is an error.
15777  #
15778  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15779  # It is also a way to make sure we got the proper file name for the real test later on.
15780  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15781  if test "x$test_shortpath" = x; then
15782    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15783$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15784    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
15785  fi
15786
15787  # Call helper function which possibly converts this using DOS-style short mode.
15788  # If so, the updated path is stored in $new_path.
15789
15790  input_path="$new_path"
15791  # Check if we need to convert this using DOS-style short mode. If the path
15792  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15793  # take no chances and rewrite it.
15794  # Note: m4 eats our [], so we need to use [ and ] instead.
15795  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15796  if test "x$has_forbidden_chars" != x; then
15797    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15798    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15799    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15800    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15801      # Going to short mode and back again did indeed matter. Since short mode is
15802      # case insensitive, let's make it lowercase to improve readability.
15803      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15804      # Now convert it back to Unix-style (cygpath)
15805      input_path=`$CYGPATH -u "$shortmode_path"`
15806      new_path="$input_path"
15807    fi
15808  fi
15809
15810  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15811  if test "x$test_cygdrive_prefix" = x; then
15812    # As a simple fix, exclude /usr/bin since it's not a real path.
15813    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15814      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15815      # a path prefixed by /cygdrive for fixpath to work.
15816      new_path="$CYGWIN_ROOT_PATH$input_path"
15817    fi
15818  fi
15819
15820
15821  if test "x$path" != "x$new_path"; then
15822    CURDIR="$new_path"
15823    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15824$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15825  fi
15826
15827    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15828
15829  path="$CURDIR"
15830  has_colon=`$ECHO $path | $GREP ^.:`
15831  new_path="$path"
15832  if test "x$has_colon" = x; then
15833    # Not in mixed or Windows style, start by that.
15834    new_path=`cmd //c echo $path`
15835  fi
15836
15837
15838  input_path="$new_path"
15839  # Check if we need to convert this using DOS-style short mode. If the path
15840  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15841  # take no chances and rewrite it.
15842  # Note: m4 eats our [], so we need to use [ and ] instead.
15843  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15844  if test "x$has_forbidden_chars" != x; then
15845    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15846    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15847  fi
15848
15849
15850  windows_path="$new_path"
15851  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15852    unix_path=`$CYGPATH -u "$windows_path"`
15853    new_path="$unix_path"
15854  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15855    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15856    new_path="$unix_path"
15857  fi
15858
15859  if test "x$path" != "x$new_path"; then
15860    CURDIR="$new_path"
15861    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15862$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15863  fi
15864
15865  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15866  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15867
15868    else
15869      # We're on a unix platform. Hooray! :)
15870      path="$CURDIR"
15871      has_space=`$ECHO "$path" | $GREP " "`
15872      if test "x$has_space" != x; then
15873        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15874$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15875        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15876      fi
15877
15878      # Use eval to expand a potential ~
15879      eval path="$path"
15880      if test ! -f "$path" && test ! -d "$path"; then
15881        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15882      fi
15883
15884      if test -d "$path"; then
15885        CURDIR="`cd "$path"; $THEPWDCMD -L`"
15886      else
15887        dir="`$DIRNAME "$path"`"
15888        base="`$BASENAME "$path"`"
15889        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
15890      fi
15891    fi
15892  fi
15893
15894
15895  # Only process if variable expands to non-empty
15896
15897  if test "x$TOPDIR" != x; then
15898    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15899
15900  # Input might be given as Windows format, start by converting to
15901  # unix format.
15902  path="$TOPDIR"
15903  new_path=`$CYGPATH -u "$path"`
15904
15905  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15906  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15907  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15908  # "foo.exe" is OK but "foo" is an error.
15909  #
15910  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15911  # It is also a way to make sure we got the proper file name for the real test later on.
15912  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15913  if test "x$test_shortpath" = x; then
15914    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15915$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15916    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
15917  fi
15918
15919  # Call helper function which possibly converts this using DOS-style short mode.
15920  # If so, the updated path is stored in $new_path.
15921
15922  input_path="$new_path"
15923  # Check if we need to convert this using DOS-style short mode. If the path
15924  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15925  # take no chances and rewrite it.
15926  # Note: m4 eats our [], so we need to use [ and ] instead.
15927  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15928  if test "x$has_forbidden_chars" != x; then
15929    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15930    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15931    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15932    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15933      # Going to short mode and back again did indeed matter. Since short mode is
15934      # case insensitive, let's make it lowercase to improve readability.
15935      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15936      # Now convert it back to Unix-style (cygpath)
15937      input_path=`$CYGPATH -u "$shortmode_path"`
15938      new_path="$input_path"
15939    fi
15940  fi
15941
15942  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15943  if test "x$test_cygdrive_prefix" = x; then
15944    # As a simple fix, exclude /usr/bin since it's not a real path.
15945    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15946      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15947      # a path prefixed by /cygdrive for fixpath to work.
15948      new_path="$CYGWIN_ROOT_PATH$input_path"
15949    fi
15950  fi
15951
15952
15953  if test "x$path" != "x$new_path"; then
15954    TOPDIR="$new_path"
15955    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15956$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15957  fi
15958
15959    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15960
15961  path="$TOPDIR"
15962  has_colon=`$ECHO $path | $GREP ^.:`
15963  new_path="$path"
15964  if test "x$has_colon" = x; then
15965    # Not in mixed or Windows style, start by that.
15966    new_path=`cmd //c echo $path`
15967  fi
15968
15969
15970  input_path="$new_path"
15971  # Check if we need to convert this using DOS-style short mode. If the path
15972  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15973  # take no chances and rewrite it.
15974  # Note: m4 eats our [], so we need to use [ and ] instead.
15975  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15976  if test "x$has_forbidden_chars" != x; then
15977    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15978    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15979  fi
15980
15981
15982  windows_path="$new_path"
15983  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15984    unix_path=`$CYGPATH -u "$windows_path"`
15985    new_path="$unix_path"
15986  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15987    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15988    new_path="$unix_path"
15989  fi
15990
15991  if test "x$path" != "x$new_path"; then
15992    TOPDIR="$new_path"
15993    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15994$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15995  fi
15996
15997  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15998  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15999
16000    else
16001      # We're on a unix platform. Hooray! :)
16002      path="$TOPDIR"
16003      has_space=`$ECHO "$path" | $GREP " "`
16004      if test "x$has_space" != x; then
16005        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16006$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16007        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16008      fi
16009
16010      # Use eval to expand a potential ~
16011      eval path="$path"
16012      if test ! -f "$path" && test ! -d "$path"; then
16013        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16014      fi
16015
16016      if test -d "$path"; then
16017        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16018      else
16019        dir="`$DIRNAME "$path"`"
16020        base="`$BASENAME "$path"`"
16021        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16022      fi
16023    fi
16024  fi
16025
16026  # SRC_ROOT is a traditional alias for TOPDIR.
16027  SRC_ROOT=$TOPDIR
16028
16029  # Calculate a canonical version of TOPDIR for string comparisons
16030  CANONICAL_TOPDIR=$TOPDIR
16031
16032  if test "x$OPENJDK_BUILD_OS" != xwindows; then
16033    # Follow a chain of symbolic links. Use readlink
16034    # where it exists, else fall back to horribly
16035    # complicated shell code.
16036    if test "x$READLINK_TESTED" != yes; then
16037      # On MacOSX there is a readlink tool with a different
16038      # purpose than the GNU readlink tool. Check the found readlink.
16039      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16040      if test "x$ISGNU" = x; then
16041        # A readlink that we do not know how to use.
16042        # Are there other non-GNU readlinks out there?
16043        READLINK_TESTED=yes
16044        READLINK=
16045      fi
16046    fi
16047
16048    if test "x$READLINK" != x; then
16049      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16050    else
16051      # Save the current directory for restoring afterwards
16052      STARTDIR=$PWD
16053      COUNTER=0
16054      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16055      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16056      cd $sym_link_dir
16057      # Use -P flag to resolve symlinks in directories.
16058      cd `$THEPWDCMD -P`
16059      sym_link_dir=`$THEPWDCMD -P`
16060      # Resolve file symlinks
16061      while test $COUNTER -lt 20; do
16062        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16063        if test "x$ISLINK" == x; then
16064          # This is not a symbolic link! We are done!
16065          break
16066        fi
16067        # Again resolve directory symlinks since the target of the just found
16068        # link could be in a different directory
16069        cd `$DIRNAME $ISLINK`
16070        sym_link_dir=`$THEPWDCMD -P`
16071        sym_link_file=`$BASENAME $ISLINK`
16072        let COUNTER=COUNTER+1
16073      done
16074      cd $STARTDIR
16075      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16076    fi
16077  fi
16078
16079
16080
16081  # Locate the directory of this script.
16082  AUTOCONF_DIR=$TOPDIR/common/autoconf
16083
16084  # Setup username (for use in adhoc version strings etc)
16085  # Outer [ ] to quote m4.
16086   USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16087
16088
16089
16090# Check if it's a pure open build or if custom sources are to be used.
16091
16092  # Check whether --enable-openjdk-only was given.
16093if test "${enable_openjdk_only+set}" = set; then :
16094  enableval=$enable_openjdk_only;
16095else
16096  enable_openjdk_only="no"
16097fi
16098
16099
16100  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
16101$as_echo_n "checking for presence of closed sources... " >&6; }
16102  if test -d "$SRC_ROOT/jdk/src/closed"; then
16103    CLOSED_SOURCE_PRESENT=yes
16104  else
16105    CLOSED_SOURCE_PRESENT=no
16106  fi
16107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
16108$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
16109
16110  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
16111$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
16112  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
16113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
16114$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
16115
16116  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
16117    OPENJDK=true
16118    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
16119      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
16120$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
16121    fi
16122  else
16123    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
16124      OPENJDK=true
16125    else
16126      OPENJDK=false
16127    fi
16128  fi
16129
16130  if test "x$OPENJDK" = "xtrue"; then
16131    SET_OPENJDK="OPENJDK=true"
16132  fi
16133
16134
16135
16136  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16137  # the IncludeCustomExtension macro.
16138
16139
16140# Check whether --with-custom-make-dir was given.
16141if test "${with_custom_make_dir+set}" = set; then :
16142  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
16143$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16144fi
16145
16146
16147
16148
16149# These are needed to be able to create a configuration name (and thus the output directory)
16150
16151  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16152$as_echo_n "checking which variant of the JDK to build... " >&6; }
16153
16154# Check whether --with-jdk-variant was given.
16155if test "${with_jdk_variant+set}" = set; then :
16156  withval=$with_jdk_variant;
16157fi
16158
16159
16160  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16161    JDK_VARIANT="normal"
16162  else
16163    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16164  fi
16165
16166
16167
16168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16169$as_echo "$JDK_VARIANT" >&6; }
16170
16171
16172  DEBUG_LEVEL="release"
16173  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16174$as_echo_n "checking which debug level to use... " >&6; }
16175  # Check whether --enable-debug was given.
16176if test "${enable_debug+set}" = set; then :
16177  enableval=$enable_debug;
16178        ENABLE_DEBUG="${enableval}"
16179        DEBUG_LEVEL="fastdebug"
16180
16181else
16182  ENABLE_DEBUG="no"
16183fi
16184
16185
16186
16187# Check whether --with-debug-level was given.
16188if test "${with_debug_level+set}" = set; then :
16189  withval=$with_debug_level;
16190        DEBUG_LEVEL="${withval}"
16191        if test "x$ENABLE_DEBUG" = xyes; then
16192          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16193        fi
16194
16195fi
16196
16197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16198$as_echo "$DEBUG_LEVEL" >&6; }
16199
16200  if test "x$DEBUG_LEVEL" != xrelease && \
16201      test "x$DEBUG_LEVEL" != xoptimized && \
16202      test "x$DEBUG_LEVEL" != xfastdebug && \
16203      test "x$DEBUG_LEVEL" != xslowdebug; then
16204    as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16205  fi
16206
16207  # Translate DEBUG_LEVEL to debug level used by Hotspot
16208  HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16209  if test "x$DEBUG_LEVEL" = xrelease; then
16210    HOTSPOT_DEBUG_LEVEL="product"
16211  elif test "x$DEBUG_LEVEL" = xslowdebug; then
16212    HOTSPOT_DEBUG_LEVEL="debug"
16213  fi
16214
16215  if test "x$DEBUG_LEVEL" = xoptimized; then
16216    # The debug level 'optimized' is a little special because it is currently only
16217    # applicable to the HotSpot build where it means to build a completely
16218    # optimized version of the VM without any debugging code (like for the
16219    # 'release' debug level which is called 'product' in the HotSpot build) but
16220    # with the exception that it can contain additional code which is otherwise
16221    # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16222    # test new and/or experimental features which are not intended for customer
16223    # shipment. Because these new features need to be tested and benchmarked in
16224    # real world scenarios, we want to build the containing JDK at the 'release'
16225    # debug level.
16226    DEBUG_LEVEL="release"
16227  fi
16228
16229
16230
16231
16232
16233
16234# Check whether --with-jvm-variants was given.
16235if test "${with_jvm_variants+set}" = set; then :
16236  withval=$with_jvm_variants;
16237fi
16238
16239
16240  if test "x$with_jvm_variants" = x; then
16241    with_jvm_variants="server"
16242  fi
16243  JVM_VARIANTS_OPT="$with_jvm_variants"
16244
16245  # Has the user listed more than one variant?
16246  # Additional [] needed to keep m4 from mangling shell constructs.
16247  if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
16248    BUILDING_MULTIPLE_JVM_VARIANTS=true
16249  else
16250    BUILDING_MULTIPLE_JVM_VARIANTS=false
16251  fi
16252  # Replace the commas with AND for use in the build directory name.
16253  JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
16254
16255  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
16256$as_echo_n "checking which variants of the JVM to build... " >&6; }
16257  # JVM_VARIANTS is a space-separated list.
16258  # Also use minimal, not minimal1 (which is kept for backwards compatibility).
16259  JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
16260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
16261$as_echo "$JVM_VARIANTS" >&6; }
16262
16263  # Check that the selected variants are valid
16264
16265  # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
16266  # Notice that the original variant failes on SLES 10 and 11
16267  NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
16268  STACK=${JVM_VARIANTS// /$'\n'}
16269  INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16270  if test "x$INVALID_VARIANTS" != x; then
16271    { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
16272$as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
16273    as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
16274  fi
16275
16276  # All "special" variants share the same output directory ("server")
16277  VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
16278  NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
16279  STACK=${JVM_VARIANTS// /$'\n'}
16280  INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16281  if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
16282    as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
16283  fi
16284
16285
16286
16287
16288  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
16289    # zero behaves as a platform and rewrites these values. This is really weird. :(
16290    # We are guaranteed that we do not build any other variants when building zero.
16291    HOTSPOT_TARGET_CPU=zero
16292    HOTSPOT_TARGET_CPU_ARCH=zero
16293  fi
16294
16295
16296# With basic setup done, call the custom early hook.
16297
16298
16299# Check if we have devkits, extra paths or sysroot set.
16300
16301
16302# Check whether --with-devkit was given.
16303if test "${with_devkit+set}" = set; then :
16304  withval=$with_devkit;
16305
16306  # Only process if variable expands to non-empty
16307
16308  if test "x$with_devkit" != x; then
16309    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16310
16311  # Input might be given as Windows format, start by converting to
16312  # unix format.
16313  path="$with_devkit"
16314  new_path=`$CYGPATH -u "$path"`
16315
16316  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16317  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16318  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16319  # "foo.exe" is OK but "foo" is an error.
16320  #
16321  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16322  # It is also a way to make sure we got the proper file name for the real test later on.
16323  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16324  if test "x$test_shortpath" = x; then
16325    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16326$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16327    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
16328  fi
16329
16330  # Call helper function which possibly converts this using DOS-style short mode.
16331  # If so, the updated path is stored in $new_path.
16332
16333  input_path="$new_path"
16334  # Check if we need to convert this using DOS-style short mode. If the path
16335  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16336  # take no chances and rewrite it.
16337  # Note: m4 eats our [], so we need to use [ and ] instead.
16338  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16339  if test "x$has_forbidden_chars" != x; then
16340    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16341    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16342    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16343    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16344      # Going to short mode and back again did indeed matter. Since short mode is
16345      # case insensitive, let's make it lowercase to improve readability.
16346      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16347      # Now convert it back to Unix-style (cygpath)
16348      input_path=`$CYGPATH -u "$shortmode_path"`
16349      new_path="$input_path"
16350    fi
16351  fi
16352
16353  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16354  if test "x$test_cygdrive_prefix" = x; then
16355    # As a simple fix, exclude /usr/bin since it's not a real path.
16356    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16357      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16358      # a path prefixed by /cygdrive for fixpath to work.
16359      new_path="$CYGWIN_ROOT_PATH$input_path"
16360    fi
16361  fi
16362
16363
16364  if test "x$path" != "x$new_path"; then
16365    with_devkit="$new_path"
16366    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16367$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16368  fi
16369
16370    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16371
16372  path="$with_devkit"
16373  has_colon=`$ECHO $path | $GREP ^.:`
16374  new_path="$path"
16375  if test "x$has_colon" = x; then
16376    # Not in mixed or Windows style, start by that.
16377    new_path=`cmd //c echo $path`
16378  fi
16379
16380
16381  input_path="$new_path"
16382  # Check if we need to convert this using DOS-style short mode. If the path
16383  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16384  # take no chances and rewrite it.
16385  # Note: m4 eats our [], so we need to use [ and ] instead.
16386  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16387  if test "x$has_forbidden_chars" != x; then
16388    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16389    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16390  fi
16391
16392
16393  windows_path="$new_path"
16394  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16395    unix_path=`$CYGPATH -u "$windows_path"`
16396    new_path="$unix_path"
16397  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16398    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16399    new_path="$unix_path"
16400  fi
16401
16402  if test "x$path" != "x$new_path"; then
16403    with_devkit="$new_path"
16404    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16405$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16406  fi
16407
16408  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16409  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16410
16411    else
16412      # We're on a unix platform. Hooray! :)
16413      path="$with_devkit"
16414      has_space=`$ECHO "$path" | $GREP " "`
16415      if test "x$has_space" != x; then
16416        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16417$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16418        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16419      fi
16420
16421      # Use eval to expand a potential ~
16422      eval path="$path"
16423      if test ! -f "$path" && test ! -d "$path"; then
16424        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
16425      fi
16426
16427      if test -d "$path"; then
16428        with_devkit="`cd "$path"; $THEPWDCMD -L`"
16429      else
16430        dir="`$DIRNAME "$path"`"
16431        base="`$BASENAME "$path"`"
16432        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
16433      fi
16434    fi
16435  fi
16436
16437        DEVKIT_ROOT="$with_devkit"
16438        # Check for a meta data info file in the root of the devkit
16439        if test -f "$DEVKIT_ROOT/devkit.info"; then
16440          . $DEVKIT_ROOT/devkit.info
16441          # This potentially sets the following:
16442          # A descriptive name of the devkit
16443
16444  if test "x$DEVKIT_NAME" = x; then
16445    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
16446  fi
16447
16448          # Corresponds to --with-extra-path
16449
16450  if test "x$DEVKIT_EXTRA_PATH" = x; then
16451    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
16452  fi
16453
16454          # Corresponds to --with-toolchain-path
16455
16456  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16457    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
16458  fi
16459
16460          # Corresponds to --with-sysroot
16461
16462  if test "x$DEVKIT_SYSROOT" = x; then
16463    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
16464  fi
16465
16466
16467          # Identifies the Visual Studio version in the devkit
16468
16469  if test "x$DEVKIT_VS_VERSION" = x; then
16470    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
16471  fi
16472
16473          # The Visual Studio include environment variable
16474
16475  if test "x$DEVKIT_VS_INCLUDE" = x; then
16476    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
16477  fi
16478
16479          # The Visual Studio lib environment variable
16480
16481  if test "x$DEVKIT_VS_LIB" = x; then
16482    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
16483  fi
16484
16485          # Corresponds to --with-msvcr-dll
16486
16487  if test "x$DEVKIT_MSVCR_DLL" = x; then
16488    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
16489  fi
16490
16491          # Corresponds to --with-msvcp-dll
16492
16493  if test "x$DEVKIT_MSVCP_DLL" = x; then
16494    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
16495  fi
16496
16497        fi
16498
16499        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
16500$as_echo_n "checking for devkit... " >&6; }
16501        if test "x$DEVKIT_NAME" != x; then
16502          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
16503$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
16504        else
16505          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
16506$as_echo "$DEVKIT_ROOT" >&6; }
16507        fi
16508
16509
16510  if test "x$DEVKIT_EXTRA_PATH" != x; then
16511    if test "x$EXTRA_PATH" = x; then
16512      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
16513    else
16514      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
16515    fi
16516  fi
16517
16518
16519        # Fallback default of just /bin if DEVKIT_PATH is not defined
16520        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16521          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
16522        fi
16523
16524  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
16525    if test "x$TOOLCHAIN_PATH" = x; then
16526      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
16527    else
16528      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
16529    fi
16530  fi
16531
16532
16533        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
16534        # places for backwards compatiblity.
16535        if test "x$DEVKIT_SYSROOT" != x; then
16536          SYSROOT="$DEVKIT_SYSROOT"
16537        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
16538          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
16539        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
16540          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
16541        fi
16542
16543
16544fi
16545
16546
16547  # You can force the sysroot if the sysroot encoded into the compiler tools
16548  # is not correct.
16549
16550# Check whether --with-sys-root was given.
16551if test "${with_sys_root+set}" = set; then :
16552  withval=$with_sys_root; SYSROOT=$with_sys_root
16553
16554fi
16555
16556
16557
16558# Check whether --with-sysroot was given.
16559if test "${with_sysroot+set}" = set; then :
16560  withval=$with_sysroot; SYSROOT=$with_sysroot
16561
16562fi
16563
16564
16565
16566# Check whether --with-tools-dir was given.
16567if test "${with_tools_dir+set}" = set; then :
16568  withval=$with_tools_dir;
16569  if test "x$with_tools_dir" != x; then
16570    if test "x$TOOLCHAIN_PATH" = x; then
16571      TOOLCHAIN_PATH="$with_tools_dir"
16572    else
16573      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
16574    fi
16575  fi
16576
16577
16578fi
16579
16580
16581
16582# Check whether --with-toolchain-path was given.
16583if test "${with_toolchain_path+set}" = set; then :
16584  withval=$with_toolchain_path;
16585  if test "x$with_toolchain_path" != x; then
16586    if test "x$TOOLCHAIN_PATH" = x; then
16587      TOOLCHAIN_PATH="$with_toolchain_path"
16588    else
16589      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
16590    fi
16591  fi
16592
16593
16594fi
16595
16596
16597
16598# Check whether --with-extra-path was given.
16599if test "${with_extra_path+set}" = set; then :
16600  withval=$with_extra_path;
16601  if test "x$with_extra_path" != x; then
16602    if test "x$EXTRA_PATH" = x; then
16603      EXTRA_PATH="$with_extra_path"
16604    else
16605      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
16606    fi
16607  fi
16608
16609
16610fi
16611
16612
16613  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
16614    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
16615    # If not, detect if Xcode is installed by running xcodebuild -version
16616    # if no Xcode installed, xcodebuild exits with 1
16617    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
16618    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
16619      # We need to use xcodebuild in the toolchain dir provided by the user, this will
16620      # fall back on the stub binary in /usr/bin/xcodebuild
16621      # Extract the first word of "xcodebuild", so it can be a program name with args.
16622set dummy xcodebuild; ac_word=$2
16623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16624$as_echo_n "checking for $ac_word... " >&6; }
16625if ${ac_cv_path_XCODEBUILD+:} false; then :
16626  $as_echo_n "(cached) " >&6
16627else
16628  case $XCODEBUILD in
16629  [\\/]* | ?:[\\/]*)
16630  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
16631  ;;
16632  *)
16633  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16634for as_dir in $TOOLCHAIN_PATH
16635do
16636  IFS=$as_save_IFS
16637  test -z "$as_dir" && as_dir=.
16638    for ac_exec_ext in '' $ac_executable_extensions; do
16639  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16640    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
16641    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16642    break 2
16643  fi
16644done
16645  done
16646IFS=$as_save_IFS
16647
16648  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
16649  ;;
16650esac
16651fi
16652XCODEBUILD=$ac_cv_path_XCODEBUILD
16653if test -n "$XCODEBUILD"; then
16654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
16655$as_echo "$XCODEBUILD" >&6; }
16656else
16657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16658$as_echo "no" >&6; }
16659fi
16660
16661
16662    else
16663      # this should result in SYSROOT being empty, unless --with-sysroot is provided
16664      # when only the command line tools are installed there are no SDKs, so headers
16665      # are copied into the system frameworks
16666      XCODEBUILD=
16667
16668    fi
16669
16670    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
16671$as_echo_n "checking for sdk name... " >&6; }
16672
16673# Check whether --with-sdk-name was given.
16674if test "${with_sdk_name+set}" = set; then :
16675  withval=$with_sdk_name; SDKNAME=$with_sdk_name
16676
16677fi
16678
16679    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
16680$as_echo "$SDKNAME" >&6; }
16681
16682    # if toolchain path is specified then don't rely on system headers, they may not compile
16683    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
16684    test -z "$TOOLCHAIN_PATH" && \
16685      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
16686
16687    if test -z "$SYSROOT"; then
16688      if test -n "$XCODEBUILD"; then
16689        # if we don't have system headers, use default SDK name (last resort)
16690        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16691          SDKNAME=${SDKNAME:-macosx}
16692        fi
16693
16694        if test -n "$SDKNAME"; then
16695          # Call xcodebuild to determine SYSROOT
16696          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
16697        fi
16698      else
16699        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16700          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
16701        fi
16702      fi
16703    else
16704      # warn user if --with-sdk-name was also set
16705      if test -n "$with_sdk_name"; then
16706        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
16707$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
16708      fi
16709    fi
16710
16711    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
16712      # If no system framework headers, then SYSROOT must be set, or we won't build
16713      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
16714    fi
16715
16716    # Perform a basic sanity test
16717    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
16718      if test -z "$SYSROOT"; then
16719        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
16720      else
16721        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
16722      fi
16723    fi
16724
16725    # set SDKROOT too, Xcode tools will pick it up
16726    SDKROOT=$SYSROOT
16727
16728  fi
16729
16730  # Prepend the extra path to the global path
16731
16732  if test "x$EXTRA_PATH" != x; then
16733    if test "x$PATH" = x; then
16734      PATH="$EXTRA_PATH"
16735    else
16736      PATH="$EXTRA_PATH:$PATH"
16737    fi
16738  fi
16739
16740
16741  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
16742    # Add extra search paths on solaris for utilities like ar, as, dtrace etc...
16743    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin:/usr/sbin"
16744  fi
16745
16746  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
16747$as_echo_n "checking for sysroot... " >&6; }
16748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
16749$as_echo "$SYSROOT" >&6; }
16750  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
16751$as_echo_n "checking for toolchain path... " >&6; }
16752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
16753$as_echo "$TOOLCHAIN_PATH" >&6; }
16754  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
16755$as_echo_n "checking for extra path... " >&6; }
16756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
16757$as_echo "$EXTRA_PATH" >&6; }
16758
16759
16760# To properly create a configuration name, we need to have the OpenJDK target
16761# and options (variants and debug level) parsed.
16762
16763
16764
16765# Check whether --with-conf-name was given.
16766if test "${with_conf_name+set}" = set; then :
16767  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
16768fi
16769
16770
16771  # Test from where we are running configure, in or outside of src root.
16772  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
16773$as_echo_n "checking where to store configuration... " >&6; }
16774  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
16775      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
16776      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
16777    # We are running configure from the src root.
16778    # Create a default ./build/target-variant-debuglevel output root.
16779    if test "x${CONF_NAME}" = x; then
16780      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
16781$as_echo "in default location" >&6; }
16782      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
16783    else
16784      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
16785$as_echo "in build directory with custom name" >&6; }
16786    fi
16787    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
16788    $MKDIR -p "$OUTPUT_ROOT"
16789    if test ! -d "$OUTPUT_ROOT"; then
16790      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
16791    fi
16792  else
16793    # We are running configure from outside of the src dir.
16794    # Then use the current directory as output dir!
16795    # If configuration is situated in normal build directory, just use the build
16796    # directory name as configuration name, otherwise use the complete path.
16797    if test "x${CONF_NAME}" = x; then
16798      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
16799    fi
16800    OUTPUT_ROOT="$CURDIR"
16801    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
16802$as_echo "in current directory" >&6; }
16803
16804    # WARNING: This might be a bad thing to do. You need to be sure you want to
16805    # have a configuration in this directory. Do some sanity checks!
16806
16807    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
16808      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
16809      # other files
16810      files_present=`$LS $OUTPUT_ROOT`
16811      # Configure has already touched config.log and confdefs.h in the current dir when this check
16812      # is performed.
16813      filtered_files=`$ECHO "$files_present" \
16814          | $SED -e 's/config.log//g' \
16815              -e 's/configure.log//g' \
16816              -e 's/confdefs.h//g' \
16817              -e 's/ //g' \
16818          | $TR -d '\n'`
16819      if test "x$filtered_files" != x; then
16820        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
16821$as_echo "$as_me: Current directory is $CURDIR." >&6;}
16822        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
16823$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
16824        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
16825$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
16826        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
16827$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
16828        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
16829$as_echo "$as_me: seriously mess up just about everything." >&6;}
16830        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
16831$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
16832        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
16833$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
16834        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
16835      fi
16836    fi
16837  fi
16838  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
16839$as_echo_n "checking what configuration name to use... " >&6; }
16840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
16841$as_echo "$CONF_NAME" >&6; }
16842
16843
16844  # Only process if variable expands to non-empty
16845
16846  if test "x$OUTPUT_ROOT" != x; then
16847    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16848
16849  # Input might be given as Windows format, start by converting to
16850  # unix format.
16851  path="$OUTPUT_ROOT"
16852  new_path=`$CYGPATH -u "$path"`
16853
16854  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16855  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16856  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16857  # "foo.exe" is OK but "foo" is an error.
16858  #
16859  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16860  # It is also a way to make sure we got the proper file name for the real test later on.
16861  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16862  if test "x$test_shortpath" = x; then
16863    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16864$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16865    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
16866  fi
16867
16868  # Call helper function which possibly converts this using DOS-style short mode.
16869  # If so, the updated path is stored in $new_path.
16870
16871  input_path="$new_path"
16872  # Check if we need to convert this using DOS-style short mode. If the path
16873  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16874  # take no chances and rewrite it.
16875  # Note: m4 eats our [], so we need to use [ and ] instead.
16876  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16877  if test "x$has_forbidden_chars" != x; then
16878    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16879    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16880    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16881    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16882      # Going to short mode and back again did indeed matter. Since short mode is
16883      # case insensitive, let's make it lowercase to improve readability.
16884      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16885      # Now convert it back to Unix-style (cygpath)
16886      input_path=`$CYGPATH -u "$shortmode_path"`
16887      new_path="$input_path"
16888    fi
16889  fi
16890
16891  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16892  if test "x$test_cygdrive_prefix" = x; then
16893    # As a simple fix, exclude /usr/bin since it's not a real path.
16894    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16895      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16896      # a path prefixed by /cygdrive for fixpath to work.
16897      new_path="$CYGWIN_ROOT_PATH$input_path"
16898    fi
16899  fi
16900
16901
16902  if test "x$path" != "x$new_path"; then
16903    OUTPUT_ROOT="$new_path"
16904    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16905$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16906  fi
16907
16908    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16909
16910  path="$OUTPUT_ROOT"
16911  has_colon=`$ECHO $path | $GREP ^.:`
16912  new_path="$path"
16913  if test "x$has_colon" = x; then
16914    # Not in mixed or Windows style, start by that.
16915    new_path=`cmd //c echo $path`
16916  fi
16917
16918
16919  input_path="$new_path"
16920  # Check if we need to convert this using DOS-style short mode. If the path
16921  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16922  # take no chances and rewrite it.
16923  # Note: m4 eats our [], so we need to use [ and ] instead.
16924  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16925  if test "x$has_forbidden_chars" != x; then
16926    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16927    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16928  fi
16929
16930
16931  windows_path="$new_path"
16932  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16933    unix_path=`$CYGPATH -u "$windows_path"`
16934    new_path="$unix_path"
16935  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16936    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16937    new_path="$unix_path"
16938  fi
16939
16940  if test "x$path" != "x$new_path"; then
16941    OUTPUT_ROOT="$new_path"
16942    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16943$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16944  fi
16945
16946  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16947  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16948
16949    else
16950      # We're on a unix platform. Hooray! :)
16951      path="$OUTPUT_ROOT"
16952      has_space=`$ECHO "$path" | $GREP " "`
16953      if test "x$has_space" != x; then
16954        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16955$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16956        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16957      fi
16958
16959      # Use eval to expand a potential ~
16960      eval path="$path"
16961      if test ! -f "$path" && test ! -d "$path"; then
16962        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
16963      fi
16964
16965      if test -d "$path"; then
16966        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
16967      else
16968        dir="`$DIRNAME "$path"`"
16969        base="`$BASENAME "$path"`"
16970        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
16971      fi
16972    fi
16973  fi
16974
16975
16976  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
16977  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
16978
16979  SPEC=$OUTPUT_ROOT/spec.gmk
16980
16981  CONF_NAME=$CONF_NAME
16982
16983  OUTPUT_ROOT=$OUTPUT_ROOT
16984
16985
16986
16987  # The spec.gmk file contains all variables for the make system.
16988  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
16989
16990  # The bootcycle-spec.gmk file contains support for boot cycle builds.
16991  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
16992
16993  # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
16994  ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
16995
16996  # The compare.sh is used to compare the build output to other builds.
16997  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
16998
16999  # The generated Makefile knows where the spec.gmk is and where the source is.
17000  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17001  # which will look for generated configurations
17002  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17003
17004
17005
17006# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17007
17008  for ac_prog in apt-get yum port pkgutil pkgadd
17009do
17010  # Extract the first word of "$ac_prog", so it can be a program name with args.
17011set dummy $ac_prog; ac_word=$2
17012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17013$as_echo_n "checking for $ac_word... " >&6; }
17014if ${ac_cv_prog_PKGHANDLER+:} false; then :
17015  $as_echo_n "(cached) " >&6
17016else
17017  if test -n "$PKGHANDLER"; then
17018  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17019else
17020as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17021for as_dir in $PATH
17022do
17023  IFS=$as_save_IFS
17024  test -z "$as_dir" && as_dir=.
17025    for ac_exec_ext in '' $ac_executable_extensions; do
17026  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17027    ac_cv_prog_PKGHANDLER="$ac_prog"
17028    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17029    break 2
17030  fi
17031done
17032  done
17033IFS=$as_save_IFS
17034
17035fi
17036fi
17037PKGHANDLER=$ac_cv_prog_PKGHANDLER
17038if test -n "$PKGHANDLER"; then
17039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17040$as_echo "$PKGHANDLER" >&6; }
17041else
17042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17043$as_echo "no" >&6; }
17044fi
17045
17046
17047  test -n "$PKGHANDLER" && break
17048done
17049
17050
17051
17052# Setup tools that requires more complex handling, or that is not needed by the configure script.
17053
17054
17055
17056  # Publish this variable in the help.
17057
17058
17059  if [ -z "${MAKE+x}" ]; then
17060    # The variable is not set by user, try to locate tool using the code snippet
17061
17062    # Try our hardest to locate a correct version of GNU make
17063    for ac_prog in gmake
17064do
17065  # Extract the first word of "$ac_prog", so it can be a program name with args.
17066set dummy $ac_prog; ac_word=$2
17067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17068$as_echo_n "checking for $ac_word... " >&6; }
17069if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17070  $as_echo_n "(cached) " >&6
17071else
17072  case $CHECK_GMAKE in
17073  [\\/]* | ?:[\\/]*)
17074  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17075  ;;
17076  *)
17077  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17078for as_dir in $PATH
17079do
17080  IFS=$as_save_IFS
17081  test -z "$as_dir" && as_dir=.
17082    for ac_exec_ext in '' $ac_executable_extensions; do
17083  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17084    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17085    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17086    break 2
17087  fi
17088done
17089  done
17090IFS=$as_save_IFS
17091
17092  ;;
17093esac
17094fi
17095CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17096if test -n "$CHECK_GMAKE"; then
17097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17098$as_echo "$CHECK_GMAKE" >&6; }
17099else
17100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17101$as_echo "no" >&6; }
17102fi
17103
17104
17105  test -n "$CHECK_GMAKE" && break
17106done
17107
17108
17109  MAKE_CANDIDATE=""$CHECK_GMAKE""
17110  DESCRIPTION="gmake in PATH"
17111
17112  # On Cygwin, we require a newer version of make than on other platforms
17113  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17114    MAKE_VERSION_EXPR="-e 4\."
17115    MAKE_REQUIRED_VERSION="4.0"
17116   else
17117    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17118    MAKE_REQUIRED_VERSION="3.81"
17119  fi
17120
17121  if test "x$MAKE_CANDIDATE" != x; then
17122    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17123$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17124    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17125    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17126    if test "x$IS_GNU_MAKE" = x; then
17127      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17128$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17129    else
17130      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17131      if test "x$IS_MODERN_MAKE" = x; then
17132        { $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
17133$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;}
17134      else
17135        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17136          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17137            MAKE_EXPECTED_ENV='cygwin'
17138          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17139            MAKE_EXPECTED_ENV='msys'
17140          else
17141            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17142          fi
17143          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17144          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17145        else
17146          # Not relevant for non-Windows
17147          IS_MAKE_CORRECT_ENV=true
17148        fi
17149        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17150          { $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
17151$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;}
17152        else
17153          FOUND_MAKE=$MAKE_CANDIDATE
17154
17155  # Only process if variable expands to non-empty
17156
17157  if test "x$FOUND_MAKE" != x; then
17158    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17159
17160  # First separate the path from the arguments. This will split at the first
17161  # space.
17162  complete="$FOUND_MAKE"
17163  path="${complete%% *}"
17164  tmp="$complete EOL"
17165  arguments="${tmp#* }"
17166
17167  # Input might be given as Windows format, start by converting to
17168  # unix format.
17169  new_path=`$CYGPATH -u "$path"`
17170
17171  # Now try to locate executable using which
17172  new_path=`$WHICH "$new_path" 2> /dev/null`
17173  # bat and cmd files are not always considered executable in cygwin causing which
17174  # to not find them
17175  if test "x$new_path" = x \
17176      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17177      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17178    new_path=`$CYGPATH -u "$path"`
17179  fi
17180  if test "x$new_path" = x; then
17181    # Oops. Which didn't find the executable.
17182    # The splitting of arguments from the executable at a space might have been incorrect,
17183    # since paths with space are more likely in Windows. Give it another try with the whole
17184    # argument.
17185    path="$complete"
17186    arguments="EOL"
17187    new_path=`$CYGPATH -u "$path"`
17188    new_path=`$WHICH "$new_path" 2> /dev/null`
17189    # bat and cmd files are not always considered executable in cygwin causing which
17190    # to not find them
17191    if test "x$new_path" = x \
17192        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17193        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17194      new_path=`$CYGPATH -u "$path"`
17195    fi
17196    if test "x$new_path" = x; then
17197      # It's still not found. Now this is an unrecoverable error.
17198      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17199$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17200      has_space=`$ECHO "$complete" | $GREP " "`
17201      if test "x$has_space" != x; then
17202        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17203$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17204      fi
17205      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17206    fi
17207  fi
17208
17209  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17210  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17211  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17212  # "foo.exe" is OK but "foo" is an error.
17213  #
17214  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17215  # It is also a way to make sure we got the proper file name for the real test later on.
17216  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17217  if test "x$test_shortpath" = x; then
17218    # Short path failed, file does not exist as specified.
17219    # Try adding .exe or .cmd
17220    if test -f "${new_path}.exe"; then
17221      input_to_shortpath="${new_path}.exe"
17222    elif test -f "${new_path}.cmd"; then
17223      input_to_shortpath="${new_path}.cmd"
17224    else
17225      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17226$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17227      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17228$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17229      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17230    fi
17231  else
17232    input_to_shortpath="$new_path"
17233  fi
17234
17235  # Call helper function which possibly converts this using DOS-style short mode.
17236  # If so, the updated path is stored in $new_path.
17237  new_path="$input_to_shortpath"
17238
17239  input_path="$input_to_shortpath"
17240  # Check if we need to convert this using DOS-style short mode. If the path
17241  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17242  # take no chances and rewrite it.
17243  # Note: m4 eats our [], so we need to use [ and ] instead.
17244  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17245  if test "x$has_forbidden_chars" != x; then
17246    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17247    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17248    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17249    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17250      # Going to short mode and back again did indeed matter. Since short mode is
17251      # case insensitive, let's make it lowercase to improve readability.
17252      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17253      # Now convert it back to Unix-style (cygpath)
17254      input_path=`$CYGPATH -u "$shortmode_path"`
17255      new_path="$input_path"
17256    fi
17257  fi
17258
17259  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17260  if test "x$test_cygdrive_prefix" = x; then
17261    # As a simple fix, exclude /usr/bin since it's not a real path.
17262    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17263      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17264      # a path prefixed by /cygdrive for fixpath to work.
17265      new_path="$CYGWIN_ROOT_PATH$input_path"
17266    fi
17267  fi
17268
17269  # remove trailing .exe if any
17270  new_path="${new_path/%.exe/}"
17271
17272    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17273
17274  # First separate the path from the arguments. This will split at the first
17275  # space.
17276  complete="$FOUND_MAKE"
17277  path="${complete%% *}"
17278  tmp="$complete EOL"
17279  arguments="${tmp#* }"
17280
17281  # Input might be given as Windows format, start by converting to
17282  # unix format.
17283  new_path="$path"
17284
17285  windows_path="$new_path"
17286  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17287    unix_path=`$CYGPATH -u "$windows_path"`
17288    new_path="$unix_path"
17289  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17290    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17291    new_path="$unix_path"
17292  fi
17293
17294
17295  # Now try to locate executable using which
17296  new_path=`$WHICH "$new_path" 2> /dev/null`
17297
17298  if test "x$new_path" = x; then
17299    # Oops. Which didn't find the executable.
17300    # The splitting of arguments from the executable at a space might have been incorrect,
17301    # since paths with space are more likely in Windows. Give it another try with the whole
17302    # argument.
17303    path="$complete"
17304    arguments="EOL"
17305    new_path="$path"
17306
17307  windows_path="$new_path"
17308  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17309    unix_path=`$CYGPATH -u "$windows_path"`
17310    new_path="$unix_path"
17311  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17312    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17313    new_path="$unix_path"
17314  fi
17315
17316
17317    new_path=`$WHICH "$new_path" 2> /dev/null`
17318    # bat and cmd files are not always considered executable in MSYS causing which
17319    # to not find them
17320    if test "x$new_path" = x \
17321        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17322        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17323      new_path="$path"
17324
17325  windows_path="$new_path"
17326  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17327    unix_path=`$CYGPATH -u "$windows_path"`
17328    new_path="$unix_path"
17329  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17330    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17331    new_path="$unix_path"
17332  fi
17333
17334    fi
17335
17336    if test "x$new_path" = x; then
17337      # It's still not found. Now this is an unrecoverable error.
17338      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17339$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17340      has_space=`$ECHO "$complete" | $GREP " "`
17341      if test "x$has_space" != x; then
17342        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17343$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17344      fi
17345      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17346    fi
17347  fi
17348
17349  # Now new_path has a complete unix path to the binary
17350  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17351    # Keep paths in /bin as-is, but remove trailing .exe if any
17352    new_path="${new_path/%.exe/}"
17353    # Do not save /bin paths to all_fixpath_prefixes!
17354  else
17355    # Not in mixed or Windows style, start by that.
17356    new_path=`cmd //c echo $new_path`
17357
17358  input_path="$new_path"
17359  # Check if we need to convert this using DOS-style short mode. If the path
17360  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17361  # take no chances and rewrite it.
17362  # Note: m4 eats our [], so we need to use [ and ] instead.
17363  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17364  if test "x$has_forbidden_chars" != x; then
17365    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17366    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17367  fi
17368
17369    # Output is in $new_path
17370
17371  windows_path="$new_path"
17372  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17373    unix_path=`$CYGPATH -u "$windows_path"`
17374    new_path="$unix_path"
17375  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17376    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17377    new_path="$unix_path"
17378  fi
17379
17380    # remove trailing .exe if any
17381    new_path="${new_path/%.exe/}"
17382
17383    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17384    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17385  fi
17386
17387    else
17388      # We're on a unix platform. Hooray! :)
17389      # First separate the path from the arguments. This will split at the first
17390      # space.
17391      complete="$FOUND_MAKE"
17392      path="${complete%% *}"
17393      tmp="$complete EOL"
17394      arguments="${tmp#* }"
17395
17396      # Cannot rely on the command "which" here since it doesn't always work.
17397      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17398      if test -z "$is_absolute_path"; then
17399        # Path to executable is not absolute. Find it.
17400        IFS_save="$IFS"
17401        IFS=:
17402        for p in $PATH; do
17403          if test -f "$p/$path" && test -x "$p/$path"; then
17404            new_path="$p/$path"
17405            break
17406          fi
17407        done
17408        IFS="$IFS_save"
17409      else
17410        # This is an absolute path, we can use it without further modifications.
17411        new_path="$path"
17412      fi
17413
17414      if test "x$new_path" = x; then
17415        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17416$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17417        has_space=`$ECHO "$complete" | $GREP " "`
17418        if test "x$has_space" != x; then
17419          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17420$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17421        fi
17422        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17423      fi
17424    fi
17425
17426    # Now join together the path and the arguments once again
17427    if test "x$arguments" != xEOL; then
17428      new_complete="$new_path ${arguments% *}"
17429    else
17430      new_complete="$new_path"
17431    fi
17432
17433    if test "x$complete" != "x$new_complete"; then
17434      FOUND_MAKE="$new_complete"
17435      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17436$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17437    fi
17438  fi
17439
17440        fi
17441      fi
17442    fi
17443  fi
17444
17445
17446    if test "x$FOUND_MAKE" = x; then
17447      for ac_prog in make
17448do
17449  # Extract the first word of "$ac_prog", so it can be a program name with args.
17450set dummy $ac_prog; ac_word=$2
17451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17452$as_echo_n "checking for $ac_word... " >&6; }
17453if ${ac_cv_path_CHECK_MAKE+:} false; then :
17454  $as_echo_n "(cached) " >&6
17455else
17456  case $CHECK_MAKE in
17457  [\\/]* | ?:[\\/]*)
17458  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
17459  ;;
17460  *)
17461  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17462for as_dir in $PATH
17463do
17464  IFS=$as_save_IFS
17465  test -z "$as_dir" && as_dir=.
17466    for ac_exec_ext in '' $ac_executable_extensions; do
17467  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17468    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
17469    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17470    break 2
17471  fi
17472done
17473  done
17474IFS=$as_save_IFS
17475
17476  ;;
17477esac
17478fi
17479CHECK_MAKE=$ac_cv_path_CHECK_MAKE
17480if test -n "$CHECK_MAKE"; then
17481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
17482$as_echo "$CHECK_MAKE" >&6; }
17483else
17484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17485$as_echo "no" >&6; }
17486fi
17487
17488
17489  test -n "$CHECK_MAKE" && break
17490done
17491
17492
17493  MAKE_CANDIDATE=""$CHECK_MAKE""
17494  DESCRIPTION="make in PATH"
17495
17496  # On Cygwin, we require a newer version of make than on other platforms
17497  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17498    MAKE_VERSION_EXPR="-e 4\."
17499    MAKE_REQUIRED_VERSION="4.0"
17500   else
17501    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17502    MAKE_REQUIRED_VERSION="3.81"
17503  fi
17504
17505  if test "x$MAKE_CANDIDATE" != x; then
17506    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17507$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17508    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17509    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17510    if test "x$IS_GNU_MAKE" = x; then
17511      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17512$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17513    else
17514      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17515      if test "x$IS_MODERN_MAKE" = x; then
17516        { $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
17517$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;}
17518      else
17519        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17520          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17521            MAKE_EXPECTED_ENV='cygwin'
17522          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17523            MAKE_EXPECTED_ENV='msys'
17524          else
17525            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17526          fi
17527          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17528          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17529        else
17530          # Not relevant for non-Windows
17531          IS_MAKE_CORRECT_ENV=true
17532        fi
17533        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17534          { $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
17535$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;}
17536        else
17537          FOUND_MAKE=$MAKE_CANDIDATE
17538
17539  # Only process if variable expands to non-empty
17540
17541  if test "x$FOUND_MAKE" != x; then
17542    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17543
17544  # First separate the path from the arguments. This will split at the first
17545  # space.
17546  complete="$FOUND_MAKE"
17547  path="${complete%% *}"
17548  tmp="$complete EOL"
17549  arguments="${tmp#* }"
17550
17551  # Input might be given as Windows format, start by converting to
17552  # unix format.
17553  new_path=`$CYGPATH -u "$path"`
17554
17555  # Now try to locate executable using which
17556  new_path=`$WHICH "$new_path" 2> /dev/null`
17557  # bat and cmd files are not always considered executable in cygwin causing which
17558  # to not find them
17559  if test "x$new_path" = x \
17560      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17561      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17562    new_path=`$CYGPATH -u "$path"`
17563  fi
17564  if test "x$new_path" = x; then
17565    # Oops. Which didn't find the executable.
17566    # The splitting of arguments from the executable at a space might have been incorrect,
17567    # since paths with space are more likely in Windows. Give it another try with the whole
17568    # argument.
17569    path="$complete"
17570    arguments="EOL"
17571    new_path=`$CYGPATH -u "$path"`
17572    new_path=`$WHICH "$new_path" 2> /dev/null`
17573    # bat and cmd files are not always considered executable in cygwin causing which
17574    # to not find them
17575    if test "x$new_path" = x \
17576        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17577        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17578      new_path=`$CYGPATH -u "$path"`
17579    fi
17580    if test "x$new_path" = x; then
17581      # It's still not found. Now this is an unrecoverable error.
17582      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17583$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17584      has_space=`$ECHO "$complete" | $GREP " "`
17585      if test "x$has_space" != x; then
17586        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17587$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17588      fi
17589      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17590    fi
17591  fi
17592
17593  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17594  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17595  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17596  # "foo.exe" is OK but "foo" is an error.
17597  #
17598  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17599  # It is also a way to make sure we got the proper file name for the real test later on.
17600  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17601  if test "x$test_shortpath" = x; then
17602    # Short path failed, file does not exist as specified.
17603    # Try adding .exe or .cmd
17604    if test -f "${new_path}.exe"; then
17605      input_to_shortpath="${new_path}.exe"
17606    elif test -f "${new_path}.cmd"; then
17607      input_to_shortpath="${new_path}.cmd"
17608    else
17609      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17610$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17611      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17612$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17613      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17614    fi
17615  else
17616    input_to_shortpath="$new_path"
17617  fi
17618
17619  # Call helper function which possibly converts this using DOS-style short mode.
17620  # If so, the updated path is stored in $new_path.
17621  new_path="$input_to_shortpath"
17622
17623  input_path="$input_to_shortpath"
17624  # Check if we need to convert this using DOS-style short mode. If the path
17625  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17626  # take no chances and rewrite it.
17627  # Note: m4 eats our [], so we need to use [ and ] instead.
17628  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17629  if test "x$has_forbidden_chars" != x; then
17630    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17631    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17632    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17633    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17634      # Going to short mode and back again did indeed matter. Since short mode is
17635      # case insensitive, let's make it lowercase to improve readability.
17636      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17637      # Now convert it back to Unix-style (cygpath)
17638      input_path=`$CYGPATH -u "$shortmode_path"`
17639      new_path="$input_path"
17640    fi
17641  fi
17642
17643  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17644  if test "x$test_cygdrive_prefix" = x; then
17645    # As a simple fix, exclude /usr/bin since it's not a real path.
17646    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17647      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17648      # a path prefixed by /cygdrive for fixpath to work.
17649      new_path="$CYGWIN_ROOT_PATH$input_path"
17650    fi
17651  fi
17652
17653  # remove trailing .exe if any
17654  new_path="${new_path/%.exe/}"
17655
17656    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17657
17658  # First separate the path from the arguments. This will split at the first
17659  # space.
17660  complete="$FOUND_MAKE"
17661  path="${complete%% *}"
17662  tmp="$complete EOL"
17663  arguments="${tmp#* }"
17664
17665  # Input might be given as Windows format, start by converting to
17666  # unix format.
17667  new_path="$path"
17668
17669  windows_path="$new_path"
17670  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17671    unix_path=`$CYGPATH -u "$windows_path"`
17672    new_path="$unix_path"
17673  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17674    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17675    new_path="$unix_path"
17676  fi
17677
17678
17679  # Now try to locate executable using which
17680  new_path=`$WHICH "$new_path" 2> /dev/null`
17681
17682  if test "x$new_path" = x; then
17683    # Oops. Which didn't find the executable.
17684    # The splitting of arguments from the executable at a space might have been incorrect,
17685    # since paths with space are more likely in Windows. Give it another try with the whole
17686    # argument.
17687    path="$complete"
17688    arguments="EOL"
17689    new_path="$path"
17690
17691  windows_path="$new_path"
17692  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17693    unix_path=`$CYGPATH -u "$windows_path"`
17694    new_path="$unix_path"
17695  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17696    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17697    new_path="$unix_path"
17698  fi
17699
17700
17701    new_path=`$WHICH "$new_path" 2> /dev/null`
17702    # bat and cmd files are not always considered executable in MSYS causing which
17703    # to not find them
17704    if test "x$new_path" = x \
17705        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17706        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17707      new_path="$path"
17708
17709  windows_path="$new_path"
17710  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17711    unix_path=`$CYGPATH -u "$windows_path"`
17712    new_path="$unix_path"
17713  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17714    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17715    new_path="$unix_path"
17716  fi
17717
17718    fi
17719
17720    if test "x$new_path" = x; then
17721      # It's still not found. Now this is an unrecoverable error.
17722      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17723$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17724      has_space=`$ECHO "$complete" | $GREP " "`
17725      if test "x$has_space" != x; then
17726        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17727$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17728      fi
17729      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17730    fi
17731  fi
17732
17733  # Now new_path has a complete unix path to the binary
17734  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17735    # Keep paths in /bin as-is, but remove trailing .exe if any
17736    new_path="${new_path/%.exe/}"
17737    # Do not save /bin paths to all_fixpath_prefixes!
17738  else
17739    # Not in mixed or Windows style, start by that.
17740    new_path=`cmd //c echo $new_path`
17741
17742  input_path="$new_path"
17743  # Check if we need to convert this using DOS-style short mode. If the path
17744  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17745  # take no chances and rewrite it.
17746  # Note: m4 eats our [], so we need to use [ and ] instead.
17747  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17748  if test "x$has_forbidden_chars" != x; then
17749    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17750    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17751  fi
17752
17753    # Output is in $new_path
17754
17755  windows_path="$new_path"
17756  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17757    unix_path=`$CYGPATH -u "$windows_path"`
17758    new_path="$unix_path"
17759  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17760    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17761    new_path="$unix_path"
17762  fi
17763
17764    # remove trailing .exe if any
17765    new_path="${new_path/%.exe/}"
17766
17767    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17768    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17769  fi
17770
17771    else
17772      # We're on a unix platform. Hooray! :)
17773      # First separate the path from the arguments. This will split at the first
17774      # space.
17775      complete="$FOUND_MAKE"
17776      path="${complete%% *}"
17777      tmp="$complete EOL"
17778      arguments="${tmp#* }"
17779
17780      # Cannot rely on the command "which" here since it doesn't always work.
17781      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17782      if test -z "$is_absolute_path"; then
17783        # Path to executable is not absolute. Find it.
17784        IFS_save="$IFS"
17785        IFS=:
17786        for p in $PATH; do
17787          if test -f "$p/$path" && test -x "$p/$path"; then
17788            new_path="$p/$path"
17789            break
17790          fi
17791        done
17792        IFS="$IFS_save"
17793      else
17794        # This is an absolute path, we can use it without further modifications.
17795        new_path="$path"
17796      fi
17797
17798      if test "x$new_path" = x; then
17799        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17800$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17801        has_space=`$ECHO "$complete" | $GREP " "`
17802        if test "x$has_space" != x; then
17803          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17804$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17805        fi
17806        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17807      fi
17808    fi
17809
17810    # Now join together the path and the arguments once again
17811    if test "x$arguments" != xEOL; then
17812      new_complete="$new_path ${arguments% *}"
17813    else
17814      new_complete="$new_path"
17815    fi
17816
17817    if test "x$complete" != "x$new_complete"; then
17818      FOUND_MAKE="$new_complete"
17819      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17820$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17821    fi
17822  fi
17823
17824        fi
17825      fi
17826    fi
17827  fi
17828
17829    fi
17830
17831    if test "x$FOUND_MAKE" = x; then
17832      if test "x$TOOLCHAIN_PATH" != x; then
17833        # We have a toolchain path, check that as well before giving up.
17834        OLD_PATH=$PATH
17835        PATH=$TOOLCHAIN_PATH:$PATH
17836        for ac_prog in gmake
17837do
17838  # Extract the first word of "$ac_prog", so it can be a program name with args.
17839set dummy $ac_prog; ac_word=$2
17840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17841$as_echo_n "checking for $ac_word... " >&6; }
17842if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
17843  $as_echo_n "(cached) " >&6
17844else
17845  case $CHECK_TOOLSDIR_GMAKE in
17846  [\\/]* | ?:[\\/]*)
17847  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
17848  ;;
17849  *)
17850  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17851for as_dir in $PATH
17852do
17853  IFS=$as_save_IFS
17854  test -z "$as_dir" && as_dir=.
17855    for ac_exec_ext in '' $ac_executable_extensions; do
17856  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17857    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17858    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17859    break 2
17860  fi
17861done
17862  done
17863IFS=$as_save_IFS
17864
17865  ;;
17866esac
17867fi
17868CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
17869if test -n "$CHECK_TOOLSDIR_GMAKE"; then
17870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
17871$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
17872else
17873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17874$as_echo "no" >&6; }
17875fi
17876
17877
17878  test -n "$CHECK_TOOLSDIR_GMAKE" && break
17879done
17880
17881
17882  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
17883  DESCRIPTION="gmake in tools-dir"
17884
17885  # On Cygwin, we require a newer version of make than on other platforms
17886  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17887    MAKE_VERSION_EXPR="-e 4\."
17888    MAKE_REQUIRED_VERSION="4.0"
17889   else
17890    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17891    MAKE_REQUIRED_VERSION="3.81"
17892  fi
17893
17894  if test "x$MAKE_CANDIDATE" != x; then
17895    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17896$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17897    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17898    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17899    if test "x$IS_GNU_MAKE" = x; then
17900      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17901$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17902    else
17903      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17904      if test "x$IS_MODERN_MAKE" = x; then
17905        { $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
17906$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;}
17907      else
17908        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17909          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17910            MAKE_EXPECTED_ENV='cygwin'
17911          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17912            MAKE_EXPECTED_ENV='msys'
17913          else
17914            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17915          fi
17916          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17917          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17918        else
17919          # Not relevant for non-Windows
17920          IS_MAKE_CORRECT_ENV=true
17921        fi
17922        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17923          { $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
17924$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;}
17925        else
17926          FOUND_MAKE=$MAKE_CANDIDATE
17927
17928  # Only process if variable expands to non-empty
17929
17930  if test "x$FOUND_MAKE" != x; then
17931    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17932
17933  # First separate the path from the arguments. This will split at the first
17934  # space.
17935  complete="$FOUND_MAKE"
17936  path="${complete%% *}"
17937  tmp="$complete EOL"
17938  arguments="${tmp#* }"
17939
17940  # Input might be given as Windows format, start by converting to
17941  # unix format.
17942  new_path=`$CYGPATH -u "$path"`
17943
17944  # Now try to locate executable using which
17945  new_path=`$WHICH "$new_path" 2> /dev/null`
17946  # bat and cmd files are not always considered executable in cygwin causing which
17947  # to not find them
17948  if test "x$new_path" = x \
17949      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17950      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17951    new_path=`$CYGPATH -u "$path"`
17952  fi
17953  if test "x$new_path" = x; then
17954    # Oops. Which didn't find the executable.
17955    # The splitting of arguments from the executable at a space might have been incorrect,
17956    # since paths with space are more likely in Windows. Give it another try with the whole
17957    # argument.
17958    path="$complete"
17959    arguments="EOL"
17960    new_path=`$CYGPATH -u "$path"`
17961    new_path=`$WHICH "$new_path" 2> /dev/null`
17962    # bat and cmd files are not always considered executable in cygwin causing which
17963    # to not find them
17964    if test "x$new_path" = x \
17965        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17966        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17967      new_path=`$CYGPATH -u "$path"`
17968    fi
17969    if test "x$new_path" = x; then
17970      # It's still not found. Now this is an unrecoverable error.
17971      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17972$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17973      has_space=`$ECHO "$complete" | $GREP " "`
17974      if test "x$has_space" != x; then
17975        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17976$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17977      fi
17978      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17979    fi
17980  fi
17981
17982  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17983  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17984  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17985  # "foo.exe" is OK but "foo" is an error.
17986  #
17987  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17988  # It is also a way to make sure we got the proper file name for the real test later on.
17989  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17990  if test "x$test_shortpath" = x; then
17991    # Short path failed, file does not exist as specified.
17992    # Try adding .exe or .cmd
17993    if test -f "${new_path}.exe"; then
17994      input_to_shortpath="${new_path}.exe"
17995    elif test -f "${new_path}.cmd"; then
17996      input_to_shortpath="${new_path}.cmd"
17997    else
17998      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17999$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18000      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18001$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18002      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18003    fi
18004  else
18005    input_to_shortpath="$new_path"
18006  fi
18007
18008  # Call helper function which possibly converts this using DOS-style short mode.
18009  # If so, the updated path is stored in $new_path.
18010  new_path="$input_to_shortpath"
18011
18012  input_path="$input_to_shortpath"
18013  # Check if we need to convert this using DOS-style short mode. If the path
18014  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18015  # take no chances and rewrite it.
18016  # Note: m4 eats our [], so we need to use [ and ] instead.
18017  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18018  if test "x$has_forbidden_chars" != x; then
18019    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18020    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18021    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18022    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18023      # Going to short mode and back again did indeed matter. Since short mode is
18024      # case insensitive, let's make it lowercase to improve readability.
18025      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18026      # Now convert it back to Unix-style (cygpath)
18027      input_path=`$CYGPATH -u "$shortmode_path"`
18028      new_path="$input_path"
18029    fi
18030  fi
18031
18032  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18033  if test "x$test_cygdrive_prefix" = x; then
18034    # As a simple fix, exclude /usr/bin since it's not a real path.
18035    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18036      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18037      # a path prefixed by /cygdrive for fixpath to work.
18038      new_path="$CYGWIN_ROOT_PATH$input_path"
18039    fi
18040  fi
18041
18042  # remove trailing .exe if any
18043  new_path="${new_path/%.exe/}"
18044
18045    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18046
18047  # First separate the path from the arguments. This will split at the first
18048  # space.
18049  complete="$FOUND_MAKE"
18050  path="${complete%% *}"
18051  tmp="$complete EOL"
18052  arguments="${tmp#* }"
18053
18054  # Input might be given as Windows format, start by converting to
18055  # unix format.
18056  new_path="$path"
18057
18058  windows_path="$new_path"
18059  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18060    unix_path=`$CYGPATH -u "$windows_path"`
18061    new_path="$unix_path"
18062  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18063    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18064    new_path="$unix_path"
18065  fi
18066
18067
18068  # Now try to locate executable using which
18069  new_path=`$WHICH "$new_path" 2> /dev/null`
18070
18071  if test "x$new_path" = x; then
18072    # Oops. Which didn't find the executable.
18073    # The splitting of arguments from the executable at a space might have been incorrect,
18074    # since paths with space are more likely in Windows. Give it another try with the whole
18075    # argument.
18076    path="$complete"
18077    arguments="EOL"
18078    new_path="$path"
18079
18080  windows_path="$new_path"
18081  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18082    unix_path=`$CYGPATH -u "$windows_path"`
18083    new_path="$unix_path"
18084  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18085    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18086    new_path="$unix_path"
18087  fi
18088
18089
18090    new_path=`$WHICH "$new_path" 2> /dev/null`
18091    # bat and cmd files are not always considered executable in MSYS causing which
18092    # to not find them
18093    if test "x$new_path" = x \
18094        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18095        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18096      new_path="$path"
18097
18098  windows_path="$new_path"
18099  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18100    unix_path=`$CYGPATH -u "$windows_path"`
18101    new_path="$unix_path"
18102  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18103    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18104    new_path="$unix_path"
18105  fi
18106
18107    fi
18108
18109    if test "x$new_path" = x; then
18110      # It's still not found. Now this is an unrecoverable error.
18111      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18112$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18113      has_space=`$ECHO "$complete" | $GREP " "`
18114      if test "x$has_space" != x; then
18115        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18116$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18117      fi
18118      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18119    fi
18120  fi
18121
18122  # Now new_path has a complete unix path to the binary
18123  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18124    # Keep paths in /bin as-is, but remove trailing .exe if any
18125    new_path="${new_path/%.exe/}"
18126    # Do not save /bin paths to all_fixpath_prefixes!
18127  else
18128    # Not in mixed or Windows style, start by that.
18129    new_path=`cmd //c echo $new_path`
18130
18131  input_path="$new_path"
18132  # Check if we need to convert this using DOS-style short mode. If the path
18133  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18134  # take no chances and rewrite it.
18135  # Note: m4 eats our [], so we need to use [ and ] instead.
18136  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18137  if test "x$has_forbidden_chars" != x; then
18138    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18139    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18140  fi
18141
18142    # Output is in $new_path
18143
18144  windows_path="$new_path"
18145  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18146    unix_path=`$CYGPATH -u "$windows_path"`
18147    new_path="$unix_path"
18148  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18149    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18150    new_path="$unix_path"
18151  fi
18152
18153    # remove trailing .exe if any
18154    new_path="${new_path/%.exe/}"
18155
18156    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18157    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18158  fi
18159
18160    else
18161      # We're on a unix platform. Hooray! :)
18162      # First separate the path from the arguments. This will split at the first
18163      # space.
18164      complete="$FOUND_MAKE"
18165      path="${complete%% *}"
18166      tmp="$complete EOL"
18167      arguments="${tmp#* }"
18168
18169      # Cannot rely on the command "which" here since it doesn't always work.
18170      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18171      if test -z "$is_absolute_path"; then
18172        # Path to executable is not absolute. Find it.
18173        IFS_save="$IFS"
18174        IFS=:
18175        for p in $PATH; do
18176          if test -f "$p/$path" && test -x "$p/$path"; then
18177            new_path="$p/$path"
18178            break
18179          fi
18180        done
18181        IFS="$IFS_save"
18182      else
18183        # This is an absolute path, we can use it without further modifications.
18184        new_path="$path"
18185      fi
18186
18187      if test "x$new_path" = x; then
18188        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18189$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18190        has_space=`$ECHO "$complete" | $GREP " "`
18191        if test "x$has_space" != x; then
18192          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18193$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18194        fi
18195        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18196      fi
18197    fi
18198
18199    # Now join together the path and the arguments once again
18200    if test "x$arguments" != xEOL; then
18201      new_complete="$new_path ${arguments% *}"
18202    else
18203      new_complete="$new_path"
18204    fi
18205
18206    if test "x$complete" != "x$new_complete"; then
18207      FOUND_MAKE="$new_complete"
18208      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18209$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18210    fi
18211  fi
18212
18213        fi
18214      fi
18215    fi
18216  fi
18217
18218        if test "x$FOUND_MAKE" = x; then
18219          for ac_prog in make
18220do
18221  # Extract the first word of "$ac_prog", so it can be a program name with args.
18222set dummy $ac_prog; ac_word=$2
18223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18224$as_echo_n "checking for $ac_word... " >&6; }
18225if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
18226  $as_echo_n "(cached) " >&6
18227else
18228  case $CHECK_TOOLSDIR_MAKE in
18229  [\\/]* | ?:[\\/]*)
18230  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
18231  ;;
18232  *)
18233  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18234for as_dir in $PATH
18235do
18236  IFS=$as_save_IFS
18237  test -z "$as_dir" && as_dir=.
18238    for ac_exec_ext in '' $ac_executable_extensions; do
18239  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18240    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18241    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18242    break 2
18243  fi
18244done
18245  done
18246IFS=$as_save_IFS
18247
18248  ;;
18249esac
18250fi
18251CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18252if test -n "$CHECK_TOOLSDIR_MAKE"; then
18253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
18254$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
18255else
18256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18257$as_echo "no" >&6; }
18258fi
18259
18260
18261  test -n "$CHECK_TOOLSDIR_MAKE" && break
18262done
18263
18264
18265  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
18266  DESCRIPTION="make in tools-dir"
18267
18268  # On Cygwin, we require a newer version of make than on other platforms
18269  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18270    MAKE_VERSION_EXPR="-e 4\."
18271    MAKE_REQUIRED_VERSION="4.0"
18272   else
18273    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18274    MAKE_REQUIRED_VERSION="3.81"
18275  fi
18276
18277  if test "x$MAKE_CANDIDATE" != x; then
18278    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18279$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18280    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18281    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18282    if test "x$IS_GNU_MAKE" = x; then
18283      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18284$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18285    else
18286      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18287      if test "x$IS_MODERN_MAKE" = x; then
18288        { $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
18289$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;}
18290      else
18291        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18292          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18293            MAKE_EXPECTED_ENV='cygwin'
18294          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18295            MAKE_EXPECTED_ENV='msys'
18296          else
18297            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18298          fi
18299          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18300          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18301        else
18302          # Not relevant for non-Windows
18303          IS_MAKE_CORRECT_ENV=true
18304        fi
18305        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18306          { $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
18307$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;}
18308        else
18309          FOUND_MAKE=$MAKE_CANDIDATE
18310
18311  # Only process if variable expands to non-empty
18312
18313  if test "x$FOUND_MAKE" != x; then
18314    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18315
18316  # First separate the path from the arguments. This will split at the first
18317  # space.
18318  complete="$FOUND_MAKE"
18319  path="${complete%% *}"
18320  tmp="$complete EOL"
18321  arguments="${tmp#* }"
18322
18323  # Input might be given as Windows format, start by converting to
18324  # unix format.
18325  new_path=`$CYGPATH -u "$path"`
18326
18327  # Now try to locate executable using which
18328  new_path=`$WHICH "$new_path" 2> /dev/null`
18329  # bat and cmd files are not always considered executable in cygwin causing which
18330  # to not find them
18331  if test "x$new_path" = x \
18332      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18333      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18334    new_path=`$CYGPATH -u "$path"`
18335  fi
18336  if test "x$new_path" = x; then
18337    # Oops. Which didn't find the executable.
18338    # The splitting of arguments from the executable at a space might have been incorrect,
18339    # since paths with space are more likely in Windows. Give it another try with the whole
18340    # argument.
18341    path="$complete"
18342    arguments="EOL"
18343    new_path=`$CYGPATH -u "$path"`
18344    new_path=`$WHICH "$new_path" 2> /dev/null`
18345    # bat and cmd files are not always considered executable in cygwin causing which
18346    # to not find them
18347    if test "x$new_path" = x \
18348        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18349        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18350      new_path=`$CYGPATH -u "$path"`
18351    fi
18352    if test "x$new_path" = x; then
18353      # It's still not found. Now this is an unrecoverable error.
18354      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18355$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18356      has_space=`$ECHO "$complete" | $GREP " "`
18357      if test "x$has_space" != x; then
18358        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18359$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18360      fi
18361      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18362    fi
18363  fi
18364
18365  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18366  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18367  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18368  # "foo.exe" is OK but "foo" is an error.
18369  #
18370  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18371  # It is also a way to make sure we got the proper file name for the real test later on.
18372  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18373  if test "x$test_shortpath" = x; then
18374    # Short path failed, file does not exist as specified.
18375    # Try adding .exe or .cmd
18376    if test -f "${new_path}.exe"; then
18377      input_to_shortpath="${new_path}.exe"
18378    elif test -f "${new_path}.cmd"; then
18379      input_to_shortpath="${new_path}.cmd"
18380    else
18381      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18382$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18383      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18384$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18385      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18386    fi
18387  else
18388    input_to_shortpath="$new_path"
18389  fi
18390
18391  # Call helper function which possibly converts this using DOS-style short mode.
18392  # If so, the updated path is stored in $new_path.
18393  new_path="$input_to_shortpath"
18394
18395  input_path="$input_to_shortpath"
18396  # Check if we need to convert this using DOS-style short mode. If the path
18397  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18398  # take no chances and rewrite it.
18399  # Note: m4 eats our [], so we need to use [ and ] instead.
18400  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18401  if test "x$has_forbidden_chars" != x; then
18402    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18403    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18404    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18405    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18406      # Going to short mode and back again did indeed matter. Since short mode is
18407      # case insensitive, let's make it lowercase to improve readability.
18408      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18409      # Now convert it back to Unix-style (cygpath)
18410      input_path=`$CYGPATH -u "$shortmode_path"`
18411      new_path="$input_path"
18412    fi
18413  fi
18414
18415  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18416  if test "x$test_cygdrive_prefix" = x; then
18417    # As a simple fix, exclude /usr/bin since it's not a real path.
18418    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18419      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18420      # a path prefixed by /cygdrive for fixpath to work.
18421      new_path="$CYGWIN_ROOT_PATH$input_path"
18422    fi
18423  fi
18424
18425  # remove trailing .exe if any
18426  new_path="${new_path/%.exe/}"
18427
18428    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18429
18430  # First separate the path from the arguments. This will split at the first
18431  # space.
18432  complete="$FOUND_MAKE"
18433  path="${complete%% *}"
18434  tmp="$complete EOL"
18435  arguments="${tmp#* }"
18436
18437  # Input might be given as Windows format, start by converting to
18438  # unix format.
18439  new_path="$path"
18440
18441  windows_path="$new_path"
18442  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18443    unix_path=`$CYGPATH -u "$windows_path"`
18444    new_path="$unix_path"
18445  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18446    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18447    new_path="$unix_path"
18448  fi
18449
18450
18451  # Now try to locate executable using which
18452  new_path=`$WHICH "$new_path" 2> /dev/null`
18453
18454  if test "x$new_path" = x; then
18455    # Oops. Which didn't find the executable.
18456    # The splitting of arguments from the executable at a space might have been incorrect,
18457    # since paths with space are more likely in Windows. Give it another try with the whole
18458    # argument.
18459    path="$complete"
18460    arguments="EOL"
18461    new_path="$path"
18462
18463  windows_path="$new_path"
18464  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18465    unix_path=`$CYGPATH -u "$windows_path"`
18466    new_path="$unix_path"
18467  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18468    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18469    new_path="$unix_path"
18470  fi
18471
18472
18473    new_path=`$WHICH "$new_path" 2> /dev/null`
18474    # bat and cmd files are not always considered executable in MSYS causing which
18475    # to not find them
18476    if test "x$new_path" = x \
18477        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18478        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18479      new_path="$path"
18480
18481  windows_path="$new_path"
18482  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18483    unix_path=`$CYGPATH -u "$windows_path"`
18484    new_path="$unix_path"
18485  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18486    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18487    new_path="$unix_path"
18488  fi
18489
18490    fi
18491
18492    if test "x$new_path" = x; then
18493      # It's still not found. Now this is an unrecoverable error.
18494      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18495$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18496      has_space=`$ECHO "$complete" | $GREP " "`
18497      if test "x$has_space" != x; then
18498        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18499$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18500      fi
18501      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18502    fi
18503  fi
18504
18505  # Now new_path has a complete unix path to the binary
18506  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18507    # Keep paths in /bin as-is, but remove trailing .exe if any
18508    new_path="${new_path/%.exe/}"
18509    # Do not save /bin paths to all_fixpath_prefixes!
18510  else
18511    # Not in mixed or Windows style, start by that.
18512    new_path=`cmd //c echo $new_path`
18513
18514  input_path="$new_path"
18515  # Check if we need to convert this using DOS-style short mode. If the path
18516  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18517  # take no chances and rewrite it.
18518  # Note: m4 eats our [], so we need to use [ and ] instead.
18519  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18520  if test "x$has_forbidden_chars" != x; then
18521    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18522    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18523  fi
18524
18525    # Output is in $new_path
18526
18527  windows_path="$new_path"
18528  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18529    unix_path=`$CYGPATH -u "$windows_path"`
18530    new_path="$unix_path"
18531  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18532    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18533    new_path="$unix_path"
18534  fi
18535
18536    # remove trailing .exe if any
18537    new_path="${new_path/%.exe/}"
18538
18539    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18540    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18541  fi
18542
18543    else
18544      # We're on a unix platform. Hooray! :)
18545      # First separate the path from the arguments. This will split at the first
18546      # space.
18547      complete="$FOUND_MAKE"
18548      path="${complete%% *}"
18549      tmp="$complete EOL"
18550      arguments="${tmp#* }"
18551
18552      # Cannot rely on the command "which" here since it doesn't always work.
18553      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18554      if test -z "$is_absolute_path"; then
18555        # Path to executable is not absolute. Find it.
18556        IFS_save="$IFS"
18557        IFS=:
18558        for p in $PATH; do
18559          if test -f "$p/$path" && test -x "$p/$path"; then
18560            new_path="$p/$path"
18561            break
18562          fi
18563        done
18564        IFS="$IFS_save"
18565      else
18566        # This is an absolute path, we can use it without further modifications.
18567        new_path="$path"
18568      fi
18569
18570      if test "x$new_path" = x; then
18571        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18572$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18573        has_space=`$ECHO "$complete" | $GREP " "`
18574        if test "x$has_space" != x; then
18575          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18576$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18577        fi
18578        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18579      fi
18580    fi
18581
18582    # Now join together the path and the arguments once again
18583    if test "x$arguments" != xEOL; then
18584      new_complete="$new_path ${arguments% *}"
18585    else
18586      new_complete="$new_path"
18587    fi
18588
18589    if test "x$complete" != "x$new_complete"; then
18590      FOUND_MAKE="$new_complete"
18591      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18592$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18593    fi
18594  fi
18595
18596        fi
18597      fi
18598    fi
18599  fi
18600
18601        fi
18602        PATH=$OLD_PATH
18603      fi
18604    fi
18605
18606    if test "x$FOUND_MAKE" = x; then
18607      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
18608    fi
18609
18610  else
18611    # The variable is set, but is it from the command line or the environment?
18612
18613    # Try to remove the string !MAKE! from our list.
18614    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
18615    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18616      # If it failed, the variable was not from the command line. Ignore it,
18617      # but warn the user (except for BASH, which is always set by the calling BASH).
18618      if test "xMAKE" != xBASH; then
18619        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
18620$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
18621      fi
18622      # Try to locate tool using the code snippet
18623
18624    # Try our hardest to locate a correct version of GNU make
18625    for ac_prog in gmake
18626do
18627  # Extract the first word of "$ac_prog", so it can be a program name with args.
18628set dummy $ac_prog; ac_word=$2
18629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18630$as_echo_n "checking for $ac_word... " >&6; }
18631if ${ac_cv_path_CHECK_GMAKE+:} false; then :
18632  $as_echo_n "(cached) " >&6
18633else
18634  case $CHECK_GMAKE in
18635  [\\/]* | ?:[\\/]*)
18636  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
18637  ;;
18638  *)
18639  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18640for as_dir in $PATH
18641do
18642  IFS=$as_save_IFS
18643  test -z "$as_dir" && as_dir=.
18644    for ac_exec_ext in '' $ac_executable_extensions; do
18645  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18646    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18647    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18648    break 2
18649  fi
18650done
18651  done
18652IFS=$as_save_IFS
18653
18654  ;;
18655esac
18656fi
18657CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
18658if test -n "$CHECK_GMAKE"; then
18659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
18660$as_echo "$CHECK_GMAKE" >&6; }
18661else
18662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18663$as_echo "no" >&6; }
18664fi
18665
18666
18667  test -n "$CHECK_GMAKE" && break
18668done
18669
18670
18671  MAKE_CANDIDATE=""$CHECK_GMAKE""
18672  DESCRIPTION="gmake in PATH"
18673
18674  # On Cygwin, we require a newer version of make than on other platforms
18675  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18676    MAKE_VERSION_EXPR="-e 4\."
18677    MAKE_REQUIRED_VERSION="4.0"
18678   else
18679    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18680    MAKE_REQUIRED_VERSION="3.81"
18681  fi
18682
18683  if test "x$MAKE_CANDIDATE" != x; then
18684    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18685$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18686    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18687    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18688    if test "x$IS_GNU_MAKE" = x; then
18689      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18690$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18691    else
18692      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18693      if test "x$IS_MODERN_MAKE" = x; then
18694        { $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
18695$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;}
18696      else
18697        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18698          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18699            MAKE_EXPECTED_ENV='cygwin'
18700          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18701            MAKE_EXPECTED_ENV='msys'
18702          else
18703            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18704          fi
18705          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18706          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18707        else
18708          # Not relevant for non-Windows
18709          IS_MAKE_CORRECT_ENV=true
18710        fi
18711        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18712          { $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
18713$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;}
18714        else
18715          FOUND_MAKE=$MAKE_CANDIDATE
18716
18717  # Only process if variable expands to non-empty
18718
18719  if test "x$FOUND_MAKE" != x; then
18720    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18721
18722  # First separate the path from the arguments. This will split at the first
18723  # space.
18724  complete="$FOUND_MAKE"
18725  path="${complete%% *}"
18726  tmp="$complete EOL"
18727  arguments="${tmp#* }"
18728
18729  # Input might be given as Windows format, start by converting to
18730  # unix format.
18731  new_path=`$CYGPATH -u "$path"`
18732
18733  # Now try to locate executable using which
18734  new_path=`$WHICH "$new_path" 2> /dev/null`
18735  # bat and cmd files are not always considered executable in cygwin causing which
18736  # to not find them
18737  if test "x$new_path" = x \
18738      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18739      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18740    new_path=`$CYGPATH -u "$path"`
18741  fi
18742  if test "x$new_path" = x; then
18743    # Oops. Which didn't find the executable.
18744    # The splitting of arguments from the executable at a space might have been incorrect,
18745    # since paths with space are more likely in Windows. Give it another try with the whole
18746    # argument.
18747    path="$complete"
18748    arguments="EOL"
18749    new_path=`$CYGPATH -u "$path"`
18750    new_path=`$WHICH "$new_path" 2> /dev/null`
18751    # bat and cmd files are not always considered executable in cygwin causing which
18752    # to not find them
18753    if test "x$new_path" = x \
18754        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18755        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18756      new_path=`$CYGPATH -u "$path"`
18757    fi
18758    if test "x$new_path" = x; then
18759      # It's still not found. Now this is an unrecoverable error.
18760      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18761$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18762      has_space=`$ECHO "$complete" | $GREP " "`
18763      if test "x$has_space" != x; then
18764        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18765$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18766      fi
18767      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18768    fi
18769  fi
18770
18771  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18772  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18773  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18774  # "foo.exe" is OK but "foo" is an error.
18775  #
18776  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18777  # It is also a way to make sure we got the proper file name for the real test later on.
18778  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18779  if test "x$test_shortpath" = x; then
18780    # Short path failed, file does not exist as specified.
18781    # Try adding .exe or .cmd
18782    if test -f "${new_path}.exe"; then
18783      input_to_shortpath="${new_path}.exe"
18784    elif test -f "${new_path}.cmd"; then
18785      input_to_shortpath="${new_path}.cmd"
18786    else
18787      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18788$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18789      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18790$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18791      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18792    fi
18793  else
18794    input_to_shortpath="$new_path"
18795  fi
18796
18797  # Call helper function which possibly converts this using DOS-style short mode.
18798  # If so, the updated path is stored in $new_path.
18799  new_path="$input_to_shortpath"
18800
18801  input_path="$input_to_shortpath"
18802  # Check if we need to convert this using DOS-style short mode. If the path
18803  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18804  # take no chances and rewrite it.
18805  # Note: m4 eats our [], so we need to use [ and ] instead.
18806  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18807  if test "x$has_forbidden_chars" != x; then
18808    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18809    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18810    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18811    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18812      # Going to short mode and back again did indeed matter. Since short mode is
18813      # case insensitive, let's make it lowercase to improve readability.
18814      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18815      # Now convert it back to Unix-style (cygpath)
18816      input_path=`$CYGPATH -u "$shortmode_path"`
18817      new_path="$input_path"
18818    fi
18819  fi
18820
18821  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18822  if test "x$test_cygdrive_prefix" = x; then
18823    # As a simple fix, exclude /usr/bin since it's not a real path.
18824    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18825      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18826      # a path prefixed by /cygdrive for fixpath to work.
18827      new_path="$CYGWIN_ROOT_PATH$input_path"
18828    fi
18829  fi
18830
18831  # remove trailing .exe if any
18832  new_path="${new_path/%.exe/}"
18833
18834    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18835
18836  # First separate the path from the arguments. This will split at the first
18837  # space.
18838  complete="$FOUND_MAKE"
18839  path="${complete%% *}"
18840  tmp="$complete EOL"
18841  arguments="${tmp#* }"
18842
18843  # Input might be given as Windows format, start by converting to
18844  # unix format.
18845  new_path="$path"
18846
18847  windows_path="$new_path"
18848  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18849    unix_path=`$CYGPATH -u "$windows_path"`
18850    new_path="$unix_path"
18851  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18852    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18853    new_path="$unix_path"
18854  fi
18855
18856
18857  # Now try to locate executable using which
18858  new_path=`$WHICH "$new_path" 2> /dev/null`
18859
18860  if test "x$new_path" = x; then
18861    # Oops. Which didn't find the executable.
18862    # The splitting of arguments from the executable at a space might have been incorrect,
18863    # since paths with space are more likely in Windows. Give it another try with the whole
18864    # argument.
18865    path="$complete"
18866    arguments="EOL"
18867    new_path="$path"
18868
18869  windows_path="$new_path"
18870  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18871    unix_path=`$CYGPATH -u "$windows_path"`
18872    new_path="$unix_path"
18873  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18874    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18875    new_path="$unix_path"
18876  fi
18877
18878
18879    new_path=`$WHICH "$new_path" 2> /dev/null`
18880    # bat and cmd files are not always considered executable in MSYS causing which
18881    # to not find them
18882    if test "x$new_path" = x \
18883        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18884        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18885      new_path="$path"
18886
18887  windows_path="$new_path"
18888  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18889    unix_path=`$CYGPATH -u "$windows_path"`
18890    new_path="$unix_path"
18891  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18892    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18893    new_path="$unix_path"
18894  fi
18895
18896    fi
18897
18898    if test "x$new_path" = x; then
18899      # It's still not found. Now this is an unrecoverable error.
18900      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18901$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18902      has_space=`$ECHO "$complete" | $GREP " "`
18903      if test "x$has_space" != x; then
18904        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18905$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18906      fi
18907      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18908    fi
18909  fi
18910
18911  # Now new_path has a complete unix path to the binary
18912  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18913    # Keep paths in /bin as-is, but remove trailing .exe if any
18914    new_path="${new_path/%.exe/}"
18915    # Do not save /bin paths to all_fixpath_prefixes!
18916  else
18917    # Not in mixed or Windows style, start by that.
18918    new_path=`cmd //c echo $new_path`
18919
18920  input_path="$new_path"
18921  # Check if we need to convert this using DOS-style short mode. If the path
18922  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18923  # take no chances and rewrite it.
18924  # Note: m4 eats our [], so we need to use [ and ] instead.
18925  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18926  if test "x$has_forbidden_chars" != x; then
18927    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18928    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18929  fi
18930
18931    # Output is in $new_path
18932
18933  windows_path="$new_path"
18934  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18935    unix_path=`$CYGPATH -u "$windows_path"`
18936    new_path="$unix_path"
18937  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18938    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18939    new_path="$unix_path"
18940  fi
18941
18942    # remove trailing .exe if any
18943    new_path="${new_path/%.exe/}"
18944
18945    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18946    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18947  fi
18948
18949    else
18950      # We're on a unix platform. Hooray! :)
18951      # First separate the path from the arguments. This will split at the first
18952      # space.
18953      complete="$FOUND_MAKE"
18954      path="${complete%% *}"
18955      tmp="$complete EOL"
18956      arguments="${tmp#* }"
18957
18958      # Cannot rely on the command "which" here since it doesn't always work.
18959      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18960      if test -z "$is_absolute_path"; then
18961        # Path to executable is not absolute. Find it.
18962        IFS_save="$IFS"
18963        IFS=:
18964        for p in $PATH; do
18965          if test -f "$p/$path" && test -x "$p/$path"; then
18966            new_path="$p/$path"
18967            break
18968          fi
18969        done
18970        IFS="$IFS_save"
18971      else
18972        # This is an absolute path, we can use it without further modifications.
18973        new_path="$path"
18974      fi
18975
18976      if test "x$new_path" = x; then
18977        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18978$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18979        has_space=`$ECHO "$complete" | $GREP " "`
18980        if test "x$has_space" != x; then
18981          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18982$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18983        fi
18984        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18985      fi
18986    fi
18987
18988    # Now join together the path and the arguments once again
18989    if test "x$arguments" != xEOL; then
18990      new_complete="$new_path ${arguments% *}"
18991    else
18992      new_complete="$new_path"
18993    fi
18994
18995    if test "x$complete" != "x$new_complete"; then
18996      FOUND_MAKE="$new_complete"
18997      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18998$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18999    fi
19000  fi
19001
19002        fi
19003      fi
19004    fi
19005  fi
19006
19007
19008    if test "x$FOUND_MAKE" = x; then
19009      for ac_prog in make
19010do
19011  # Extract the first word of "$ac_prog", so it can be a program name with args.
19012set dummy $ac_prog; ac_word=$2
19013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19014$as_echo_n "checking for $ac_word... " >&6; }
19015if ${ac_cv_path_CHECK_MAKE+:} false; then :
19016  $as_echo_n "(cached) " >&6
19017else
19018  case $CHECK_MAKE in
19019  [\\/]* | ?:[\\/]*)
19020  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19021  ;;
19022  *)
19023  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19024for as_dir in $PATH
19025do
19026  IFS=$as_save_IFS
19027  test -z "$as_dir" && as_dir=.
19028    for ac_exec_ext in '' $ac_executable_extensions; do
19029  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19030    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19031    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19032    break 2
19033  fi
19034done
19035  done
19036IFS=$as_save_IFS
19037
19038  ;;
19039esac
19040fi
19041CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19042if test -n "$CHECK_MAKE"; then
19043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19044$as_echo "$CHECK_MAKE" >&6; }
19045else
19046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19047$as_echo "no" >&6; }
19048fi
19049
19050
19051  test -n "$CHECK_MAKE" && break
19052done
19053
19054
19055  MAKE_CANDIDATE=""$CHECK_MAKE""
19056  DESCRIPTION="make in PATH"
19057
19058  # On Cygwin, we require a newer version of make than on other platforms
19059  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19060    MAKE_VERSION_EXPR="-e 4\."
19061    MAKE_REQUIRED_VERSION="4.0"
19062   else
19063    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19064    MAKE_REQUIRED_VERSION="3.81"
19065  fi
19066
19067  if test "x$MAKE_CANDIDATE" != x; then
19068    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19069$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19070    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19071    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19072    if test "x$IS_GNU_MAKE" = x; then
19073      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19074$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19075    else
19076      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19077      if test "x$IS_MODERN_MAKE" = x; then
19078        { $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
19079$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;}
19080      else
19081        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19082          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19083            MAKE_EXPECTED_ENV='cygwin'
19084          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19085            MAKE_EXPECTED_ENV='msys'
19086          else
19087            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19088          fi
19089          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19090          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19091        else
19092          # Not relevant for non-Windows
19093          IS_MAKE_CORRECT_ENV=true
19094        fi
19095        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19096          { $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
19097$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;}
19098        else
19099          FOUND_MAKE=$MAKE_CANDIDATE
19100
19101  # Only process if variable expands to non-empty
19102
19103  if test "x$FOUND_MAKE" != x; then
19104    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19105
19106  # First separate the path from the arguments. This will split at the first
19107  # space.
19108  complete="$FOUND_MAKE"
19109  path="${complete%% *}"
19110  tmp="$complete EOL"
19111  arguments="${tmp#* }"
19112
19113  # Input might be given as Windows format, start by converting to
19114  # unix format.
19115  new_path=`$CYGPATH -u "$path"`
19116
19117  # Now try to locate executable using which
19118  new_path=`$WHICH "$new_path" 2> /dev/null`
19119  # bat and cmd files are not always considered executable in cygwin causing which
19120  # to not find them
19121  if test "x$new_path" = x \
19122      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19123      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19124    new_path=`$CYGPATH -u "$path"`
19125  fi
19126  if test "x$new_path" = x; then
19127    # Oops. Which didn't find the executable.
19128    # The splitting of arguments from the executable at a space might have been incorrect,
19129    # since paths with space are more likely in Windows. Give it another try with the whole
19130    # argument.
19131    path="$complete"
19132    arguments="EOL"
19133    new_path=`$CYGPATH -u "$path"`
19134    new_path=`$WHICH "$new_path" 2> /dev/null`
19135    # bat and cmd files are not always considered executable in cygwin causing which
19136    # to not find them
19137    if test "x$new_path" = x \
19138        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19139        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19140      new_path=`$CYGPATH -u "$path"`
19141    fi
19142    if test "x$new_path" = x; then
19143      # It's still not found. Now this is an unrecoverable error.
19144      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19145$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19146      has_space=`$ECHO "$complete" | $GREP " "`
19147      if test "x$has_space" != x; then
19148        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19149$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19150      fi
19151      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19152    fi
19153  fi
19154
19155  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19156  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19157  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19158  # "foo.exe" is OK but "foo" is an error.
19159  #
19160  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19161  # It is also a way to make sure we got the proper file name for the real test later on.
19162  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19163  if test "x$test_shortpath" = x; then
19164    # Short path failed, file does not exist as specified.
19165    # Try adding .exe or .cmd
19166    if test -f "${new_path}.exe"; then
19167      input_to_shortpath="${new_path}.exe"
19168    elif test -f "${new_path}.cmd"; then
19169      input_to_shortpath="${new_path}.cmd"
19170    else
19171      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19172$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19173      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19174$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19175      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19176    fi
19177  else
19178    input_to_shortpath="$new_path"
19179  fi
19180
19181  # Call helper function which possibly converts this using DOS-style short mode.
19182  # If so, the updated path is stored in $new_path.
19183  new_path="$input_to_shortpath"
19184
19185  input_path="$input_to_shortpath"
19186  # Check if we need to convert this using DOS-style short mode. If the path
19187  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19188  # take no chances and rewrite it.
19189  # Note: m4 eats our [], so we need to use [ and ] instead.
19190  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19191  if test "x$has_forbidden_chars" != x; then
19192    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19193    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19194    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19195    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19196      # Going to short mode and back again did indeed matter. Since short mode is
19197      # case insensitive, let's make it lowercase to improve readability.
19198      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19199      # Now convert it back to Unix-style (cygpath)
19200      input_path=`$CYGPATH -u "$shortmode_path"`
19201      new_path="$input_path"
19202    fi
19203  fi
19204
19205  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19206  if test "x$test_cygdrive_prefix" = x; then
19207    # As a simple fix, exclude /usr/bin since it's not a real path.
19208    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19209      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19210      # a path prefixed by /cygdrive for fixpath to work.
19211      new_path="$CYGWIN_ROOT_PATH$input_path"
19212    fi
19213  fi
19214
19215  # remove trailing .exe if any
19216  new_path="${new_path/%.exe/}"
19217
19218    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19219
19220  # First separate the path from the arguments. This will split at the first
19221  # space.
19222  complete="$FOUND_MAKE"
19223  path="${complete%% *}"
19224  tmp="$complete EOL"
19225  arguments="${tmp#* }"
19226
19227  # Input might be given as Windows format, start by converting to
19228  # unix format.
19229  new_path="$path"
19230
19231  windows_path="$new_path"
19232  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19233    unix_path=`$CYGPATH -u "$windows_path"`
19234    new_path="$unix_path"
19235  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19236    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19237    new_path="$unix_path"
19238  fi
19239
19240
19241  # Now try to locate executable using which
19242  new_path=`$WHICH "$new_path" 2> /dev/null`
19243
19244  if test "x$new_path" = x; then
19245    # Oops. Which didn't find the executable.
19246    # The splitting of arguments from the executable at a space might have been incorrect,
19247    # since paths with space are more likely in Windows. Give it another try with the whole
19248    # argument.
19249    path="$complete"
19250    arguments="EOL"
19251    new_path="$path"
19252
19253  windows_path="$new_path"
19254  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19255    unix_path=`$CYGPATH -u "$windows_path"`
19256    new_path="$unix_path"
19257  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19258    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19259    new_path="$unix_path"
19260  fi
19261
19262
19263    new_path=`$WHICH "$new_path" 2> /dev/null`
19264    # bat and cmd files are not always considered executable in MSYS causing which
19265    # to not find them
19266    if test "x$new_path" = x \
19267        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19268        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19269      new_path="$path"
19270
19271  windows_path="$new_path"
19272  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19273    unix_path=`$CYGPATH -u "$windows_path"`
19274    new_path="$unix_path"
19275  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19276    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19277    new_path="$unix_path"
19278  fi
19279
19280    fi
19281
19282    if test "x$new_path" = x; then
19283      # It's still not found. Now this is an unrecoverable error.
19284      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19285$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19286      has_space=`$ECHO "$complete" | $GREP " "`
19287      if test "x$has_space" != x; then
19288        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19289$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19290      fi
19291      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19292    fi
19293  fi
19294
19295  # Now new_path has a complete unix path to the binary
19296  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19297    # Keep paths in /bin as-is, but remove trailing .exe if any
19298    new_path="${new_path/%.exe/}"
19299    # Do not save /bin paths to all_fixpath_prefixes!
19300  else
19301    # Not in mixed or Windows style, start by that.
19302    new_path=`cmd //c echo $new_path`
19303
19304  input_path="$new_path"
19305  # Check if we need to convert this using DOS-style short mode. If the path
19306  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19307  # take no chances and rewrite it.
19308  # Note: m4 eats our [], so we need to use [ and ] instead.
19309  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19310  if test "x$has_forbidden_chars" != x; then
19311    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19312    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19313  fi
19314
19315    # Output is in $new_path
19316
19317  windows_path="$new_path"
19318  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19319    unix_path=`$CYGPATH -u "$windows_path"`
19320    new_path="$unix_path"
19321  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19322    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19323    new_path="$unix_path"
19324  fi
19325
19326    # remove trailing .exe if any
19327    new_path="${new_path/%.exe/}"
19328
19329    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19330    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19331  fi
19332
19333    else
19334      # We're on a unix platform. Hooray! :)
19335      # First separate the path from the arguments. This will split at the first
19336      # space.
19337      complete="$FOUND_MAKE"
19338      path="${complete%% *}"
19339      tmp="$complete EOL"
19340      arguments="${tmp#* }"
19341
19342      # Cannot rely on the command "which" here since it doesn't always work.
19343      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19344      if test -z "$is_absolute_path"; then
19345        # Path to executable is not absolute. Find it.
19346        IFS_save="$IFS"
19347        IFS=:
19348        for p in $PATH; do
19349          if test -f "$p/$path" && test -x "$p/$path"; then
19350            new_path="$p/$path"
19351            break
19352          fi
19353        done
19354        IFS="$IFS_save"
19355      else
19356        # This is an absolute path, we can use it without further modifications.
19357        new_path="$path"
19358      fi
19359
19360      if test "x$new_path" = x; then
19361        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19362$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19363        has_space=`$ECHO "$complete" | $GREP " "`
19364        if test "x$has_space" != x; then
19365          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19366$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19367        fi
19368        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19369      fi
19370    fi
19371
19372    # Now join together the path and the arguments once again
19373    if test "x$arguments" != xEOL; then
19374      new_complete="$new_path ${arguments% *}"
19375    else
19376      new_complete="$new_path"
19377    fi
19378
19379    if test "x$complete" != "x$new_complete"; then
19380      FOUND_MAKE="$new_complete"
19381      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19382$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19383    fi
19384  fi
19385
19386        fi
19387      fi
19388    fi
19389  fi
19390
19391    fi
19392
19393    if test "x$FOUND_MAKE" = x; then
19394      if test "x$TOOLCHAIN_PATH" != x; then
19395        # We have a toolchain path, check that as well before giving up.
19396        OLD_PATH=$PATH
19397        PATH=$TOOLCHAIN_PATH:$PATH
19398        for ac_prog in gmake
19399do
19400  # Extract the first word of "$ac_prog", so it can be a program name with args.
19401set dummy $ac_prog; ac_word=$2
19402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19403$as_echo_n "checking for $ac_word... " >&6; }
19404if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
19405  $as_echo_n "(cached) " >&6
19406else
19407  case $CHECK_TOOLSDIR_GMAKE in
19408  [\\/]* | ?:[\\/]*)
19409  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
19410  ;;
19411  *)
19412  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19413for as_dir in $PATH
19414do
19415  IFS=$as_save_IFS
19416  test -z "$as_dir" && as_dir=.
19417    for ac_exec_ext in '' $ac_executable_extensions; do
19418  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19419    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19420    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19421    break 2
19422  fi
19423done
19424  done
19425IFS=$as_save_IFS
19426
19427  ;;
19428esac
19429fi
19430CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
19431if test -n "$CHECK_TOOLSDIR_GMAKE"; then
19432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
19433$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
19434else
19435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19436$as_echo "no" >&6; }
19437fi
19438
19439
19440  test -n "$CHECK_TOOLSDIR_GMAKE" && break
19441done
19442
19443
19444  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
19445  DESCRIPTION="gmake in tools-dir"
19446
19447  # On Cygwin, we require a newer version of make than on other platforms
19448  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19449    MAKE_VERSION_EXPR="-e 4\."
19450    MAKE_REQUIRED_VERSION="4.0"
19451   else
19452    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19453    MAKE_REQUIRED_VERSION="3.81"
19454  fi
19455
19456  if test "x$MAKE_CANDIDATE" != x; then
19457    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19458$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19459    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19460    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19461    if test "x$IS_GNU_MAKE" = x; then
19462      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19463$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19464    else
19465      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19466      if test "x$IS_MODERN_MAKE" = x; then
19467        { $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
19468$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;}
19469      else
19470        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19471          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19472            MAKE_EXPECTED_ENV='cygwin'
19473          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19474            MAKE_EXPECTED_ENV='msys'
19475          else
19476            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19477          fi
19478          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19479          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19480        else
19481          # Not relevant for non-Windows
19482          IS_MAKE_CORRECT_ENV=true
19483        fi
19484        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19485          { $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
19486$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;}
19487        else
19488          FOUND_MAKE=$MAKE_CANDIDATE
19489
19490  # Only process if variable expands to non-empty
19491
19492  if test "x$FOUND_MAKE" != x; then
19493    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19494
19495  # First separate the path from the arguments. This will split at the first
19496  # space.
19497  complete="$FOUND_MAKE"
19498  path="${complete%% *}"
19499  tmp="$complete EOL"
19500  arguments="${tmp#* }"
19501
19502  # Input might be given as Windows format, start by converting to
19503  # unix format.
19504  new_path=`$CYGPATH -u "$path"`
19505
19506  # Now try to locate executable using which
19507  new_path=`$WHICH "$new_path" 2> /dev/null`
19508  # bat and cmd files are not always considered executable in cygwin causing which
19509  # to not find them
19510  if test "x$new_path" = x \
19511      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19512      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19513    new_path=`$CYGPATH -u "$path"`
19514  fi
19515  if test "x$new_path" = x; then
19516    # Oops. Which didn't find the executable.
19517    # The splitting of arguments from the executable at a space might have been incorrect,
19518    # since paths with space are more likely in Windows. Give it another try with the whole
19519    # argument.
19520    path="$complete"
19521    arguments="EOL"
19522    new_path=`$CYGPATH -u "$path"`
19523    new_path=`$WHICH "$new_path" 2> /dev/null`
19524    # bat and cmd files are not always considered executable in cygwin causing which
19525    # to not find them
19526    if test "x$new_path" = x \
19527        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19528        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19529      new_path=`$CYGPATH -u "$path"`
19530    fi
19531    if test "x$new_path" = x; then
19532      # It's still not found. Now this is an unrecoverable error.
19533      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19534$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19535      has_space=`$ECHO "$complete" | $GREP " "`
19536      if test "x$has_space" != x; then
19537        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19538$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19539      fi
19540      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19541    fi
19542  fi
19543
19544  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19545  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19546  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19547  # "foo.exe" is OK but "foo" is an error.
19548  #
19549  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19550  # It is also a way to make sure we got the proper file name for the real test later on.
19551  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19552  if test "x$test_shortpath" = x; then
19553    # Short path failed, file does not exist as specified.
19554    # Try adding .exe or .cmd
19555    if test -f "${new_path}.exe"; then
19556      input_to_shortpath="${new_path}.exe"
19557    elif test -f "${new_path}.cmd"; then
19558      input_to_shortpath="${new_path}.cmd"
19559    else
19560      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19561$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19562      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19563$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19564      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19565    fi
19566  else
19567    input_to_shortpath="$new_path"
19568  fi
19569
19570  # Call helper function which possibly converts this using DOS-style short mode.
19571  # If so, the updated path is stored in $new_path.
19572  new_path="$input_to_shortpath"
19573
19574  input_path="$input_to_shortpath"
19575  # Check if we need to convert this using DOS-style short mode. If the path
19576  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19577  # take no chances and rewrite it.
19578  # Note: m4 eats our [], so we need to use [ and ] instead.
19579  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19580  if test "x$has_forbidden_chars" != x; then
19581    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19582    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19583    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19584    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19585      # Going to short mode and back again did indeed matter. Since short mode is
19586      # case insensitive, let's make it lowercase to improve readability.
19587      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19588      # Now convert it back to Unix-style (cygpath)
19589      input_path=`$CYGPATH -u "$shortmode_path"`
19590      new_path="$input_path"
19591    fi
19592  fi
19593
19594  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19595  if test "x$test_cygdrive_prefix" = x; then
19596    # As a simple fix, exclude /usr/bin since it's not a real path.
19597    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19598      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19599      # a path prefixed by /cygdrive for fixpath to work.
19600      new_path="$CYGWIN_ROOT_PATH$input_path"
19601    fi
19602  fi
19603
19604  # remove trailing .exe if any
19605  new_path="${new_path/%.exe/}"
19606
19607    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19608
19609  # First separate the path from the arguments. This will split at the first
19610  # space.
19611  complete="$FOUND_MAKE"
19612  path="${complete%% *}"
19613  tmp="$complete EOL"
19614  arguments="${tmp#* }"
19615
19616  # Input might be given as Windows format, start by converting to
19617  # unix format.
19618  new_path="$path"
19619
19620  windows_path="$new_path"
19621  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19622    unix_path=`$CYGPATH -u "$windows_path"`
19623    new_path="$unix_path"
19624  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19625    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19626    new_path="$unix_path"
19627  fi
19628
19629
19630  # Now try to locate executable using which
19631  new_path=`$WHICH "$new_path" 2> /dev/null`
19632
19633  if test "x$new_path" = x; then
19634    # Oops. Which didn't find the executable.
19635    # The splitting of arguments from the executable at a space might have been incorrect,
19636    # since paths with space are more likely in Windows. Give it another try with the whole
19637    # argument.
19638    path="$complete"
19639    arguments="EOL"
19640    new_path="$path"
19641
19642  windows_path="$new_path"
19643  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19644    unix_path=`$CYGPATH -u "$windows_path"`
19645    new_path="$unix_path"
19646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19647    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19648    new_path="$unix_path"
19649  fi
19650
19651
19652    new_path=`$WHICH "$new_path" 2> /dev/null`
19653    # bat and cmd files are not always considered executable in MSYS causing which
19654    # to not find them
19655    if test "x$new_path" = x \
19656        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19657        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19658      new_path="$path"
19659
19660  windows_path="$new_path"
19661  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19662    unix_path=`$CYGPATH -u "$windows_path"`
19663    new_path="$unix_path"
19664  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19665    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19666    new_path="$unix_path"
19667  fi
19668
19669    fi
19670
19671    if test "x$new_path" = x; then
19672      # It's still not found. Now this is an unrecoverable error.
19673      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19674$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19675      has_space=`$ECHO "$complete" | $GREP " "`
19676      if test "x$has_space" != x; then
19677        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19678$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19679      fi
19680      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19681    fi
19682  fi
19683
19684  # Now new_path has a complete unix path to the binary
19685  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19686    # Keep paths in /bin as-is, but remove trailing .exe if any
19687    new_path="${new_path/%.exe/}"
19688    # Do not save /bin paths to all_fixpath_prefixes!
19689  else
19690    # Not in mixed or Windows style, start by that.
19691    new_path=`cmd //c echo $new_path`
19692
19693  input_path="$new_path"
19694  # Check if we need to convert this using DOS-style short mode. If the path
19695  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19696  # take no chances and rewrite it.
19697  # Note: m4 eats our [], so we need to use [ and ] instead.
19698  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19699  if test "x$has_forbidden_chars" != x; then
19700    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19701    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19702  fi
19703
19704    # Output is in $new_path
19705
19706  windows_path="$new_path"
19707  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19708    unix_path=`$CYGPATH -u "$windows_path"`
19709    new_path="$unix_path"
19710  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19711    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19712    new_path="$unix_path"
19713  fi
19714
19715    # remove trailing .exe if any
19716    new_path="${new_path/%.exe/}"
19717
19718    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19719    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19720  fi
19721
19722    else
19723      # We're on a unix platform. Hooray! :)
19724      # First separate the path from the arguments. This will split at the first
19725      # space.
19726      complete="$FOUND_MAKE"
19727      path="${complete%% *}"
19728      tmp="$complete EOL"
19729      arguments="${tmp#* }"
19730
19731      # Cannot rely on the command "which" here since it doesn't always work.
19732      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19733      if test -z "$is_absolute_path"; then
19734        # Path to executable is not absolute. Find it.
19735        IFS_save="$IFS"
19736        IFS=:
19737        for p in $PATH; do
19738          if test -f "$p/$path" && test -x "$p/$path"; then
19739            new_path="$p/$path"
19740            break
19741          fi
19742        done
19743        IFS="$IFS_save"
19744      else
19745        # This is an absolute path, we can use it without further modifications.
19746        new_path="$path"
19747      fi
19748
19749      if test "x$new_path" = x; then
19750        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19751$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19752        has_space=`$ECHO "$complete" | $GREP " "`
19753        if test "x$has_space" != x; then
19754          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19755$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19756        fi
19757        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19758      fi
19759    fi
19760
19761    # Now join together the path and the arguments once again
19762    if test "x$arguments" != xEOL; then
19763      new_complete="$new_path ${arguments% *}"
19764    else
19765      new_complete="$new_path"
19766    fi
19767
19768    if test "x$complete" != "x$new_complete"; then
19769      FOUND_MAKE="$new_complete"
19770      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19771$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19772    fi
19773  fi
19774
19775        fi
19776      fi
19777    fi
19778  fi
19779
19780        if test "x$FOUND_MAKE" = x; then
19781          for ac_prog in make
19782do
19783  # Extract the first word of "$ac_prog", so it can be a program name with args.
19784set dummy $ac_prog; ac_word=$2
19785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19786$as_echo_n "checking for $ac_word... " >&6; }
19787if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
19788  $as_echo_n "(cached) " >&6
19789else
19790  case $CHECK_TOOLSDIR_MAKE in
19791  [\\/]* | ?:[\\/]*)
19792  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
19793  ;;
19794  *)
19795  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19796for as_dir in $PATH
19797do
19798  IFS=$as_save_IFS
19799  test -z "$as_dir" && as_dir=.
19800    for ac_exec_ext in '' $ac_executable_extensions; do
19801  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19802    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
19803    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19804    break 2
19805  fi
19806done
19807  done
19808IFS=$as_save_IFS
19809
19810  ;;
19811esac
19812fi
19813CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
19814if test -n "$CHECK_TOOLSDIR_MAKE"; then
19815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
19816$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
19817else
19818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19819$as_echo "no" >&6; }
19820fi
19821
19822
19823  test -n "$CHECK_TOOLSDIR_MAKE" && break
19824done
19825
19826
19827  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
19828  DESCRIPTION="make in tools-dir"
19829
19830  # On Cygwin, we require a newer version of make than on other platforms
19831  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19832    MAKE_VERSION_EXPR="-e 4\."
19833    MAKE_REQUIRED_VERSION="4.0"
19834   else
19835    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19836    MAKE_REQUIRED_VERSION="3.81"
19837  fi
19838
19839  if test "x$MAKE_CANDIDATE" != x; then
19840    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19841$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19842    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19843    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19844    if test "x$IS_GNU_MAKE" = x; then
19845      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19846$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19847    else
19848      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19849      if test "x$IS_MODERN_MAKE" = x; then
19850        { $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
19851$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;}
19852      else
19853        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19854          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19855            MAKE_EXPECTED_ENV='cygwin'
19856          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19857            MAKE_EXPECTED_ENV='msys'
19858          else
19859            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19860          fi
19861          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19862          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19863        else
19864          # Not relevant for non-Windows
19865          IS_MAKE_CORRECT_ENV=true
19866        fi
19867        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19868          { $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
19869$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;}
19870        else
19871          FOUND_MAKE=$MAKE_CANDIDATE
19872
19873  # Only process if variable expands to non-empty
19874
19875  if test "x$FOUND_MAKE" != x; then
19876    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19877
19878  # First separate the path from the arguments. This will split at the first
19879  # space.
19880  complete="$FOUND_MAKE"
19881  path="${complete%% *}"
19882  tmp="$complete EOL"
19883  arguments="${tmp#* }"
19884
19885  # Input might be given as Windows format, start by converting to
19886  # unix format.
19887  new_path=`$CYGPATH -u "$path"`
19888
19889  # Now try to locate executable using which
19890  new_path=`$WHICH "$new_path" 2> /dev/null`
19891  # bat and cmd files are not always considered executable in cygwin causing which
19892  # to not find them
19893  if test "x$new_path" = x \
19894      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19895      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19896    new_path=`$CYGPATH -u "$path"`
19897  fi
19898  if test "x$new_path" = x; then
19899    # Oops. Which didn't find the executable.
19900    # The splitting of arguments from the executable at a space might have been incorrect,
19901    # since paths with space are more likely in Windows. Give it another try with the whole
19902    # argument.
19903    path="$complete"
19904    arguments="EOL"
19905    new_path=`$CYGPATH -u "$path"`
19906    new_path=`$WHICH "$new_path" 2> /dev/null`
19907    # bat and cmd files are not always considered executable in cygwin causing which
19908    # to not find them
19909    if test "x$new_path" = x \
19910        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19911        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19912      new_path=`$CYGPATH -u "$path"`
19913    fi
19914    if test "x$new_path" = x; then
19915      # It's still not found. Now this is an unrecoverable error.
19916      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19917$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19918      has_space=`$ECHO "$complete" | $GREP " "`
19919      if test "x$has_space" != x; then
19920        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19921$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19922      fi
19923      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19924    fi
19925  fi
19926
19927  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19928  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19929  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19930  # "foo.exe" is OK but "foo" is an error.
19931  #
19932  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19933  # It is also a way to make sure we got the proper file name for the real test later on.
19934  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19935  if test "x$test_shortpath" = x; then
19936    # Short path failed, file does not exist as specified.
19937    # Try adding .exe or .cmd
19938    if test -f "${new_path}.exe"; then
19939      input_to_shortpath="${new_path}.exe"
19940    elif test -f "${new_path}.cmd"; then
19941      input_to_shortpath="${new_path}.cmd"
19942    else
19943      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19944$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19945      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19946$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19947      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19948    fi
19949  else
19950    input_to_shortpath="$new_path"
19951  fi
19952
19953  # Call helper function which possibly converts this using DOS-style short mode.
19954  # If so, the updated path is stored in $new_path.
19955  new_path="$input_to_shortpath"
19956
19957  input_path="$input_to_shortpath"
19958  # Check if we need to convert this using DOS-style short mode. If the path
19959  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19960  # take no chances and rewrite it.
19961  # Note: m4 eats our [], so we need to use [ and ] instead.
19962  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19963  if test "x$has_forbidden_chars" != x; then
19964    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19965    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19966    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19967    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19968      # Going to short mode and back again did indeed matter. Since short mode is
19969      # case insensitive, let's make it lowercase to improve readability.
19970      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19971      # Now convert it back to Unix-style (cygpath)
19972      input_path=`$CYGPATH -u "$shortmode_path"`
19973      new_path="$input_path"
19974    fi
19975  fi
19976
19977  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19978  if test "x$test_cygdrive_prefix" = x; then
19979    # As a simple fix, exclude /usr/bin since it's not a real path.
19980    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19981      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19982      # a path prefixed by /cygdrive for fixpath to work.
19983      new_path="$CYGWIN_ROOT_PATH$input_path"
19984    fi
19985  fi
19986
19987  # remove trailing .exe if any
19988  new_path="${new_path/%.exe/}"
19989
19990    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19991
19992  # First separate the path from the arguments. This will split at the first
19993  # space.
19994  complete="$FOUND_MAKE"
19995  path="${complete%% *}"
19996  tmp="$complete EOL"
19997  arguments="${tmp#* }"
19998
19999  # Input might be given as Windows format, start by converting to
20000  # unix format.
20001  new_path="$path"
20002
20003  windows_path="$new_path"
20004  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20005    unix_path=`$CYGPATH -u "$windows_path"`
20006    new_path="$unix_path"
20007  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20008    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20009    new_path="$unix_path"
20010  fi
20011
20012
20013  # Now try to locate executable using which
20014  new_path=`$WHICH "$new_path" 2> /dev/null`
20015
20016  if test "x$new_path" = x; then
20017    # Oops. Which didn't find the executable.
20018    # The splitting of arguments from the executable at a space might have been incorrect,
20019    # since paths with space are more likely in Windows. Give it another try with the whole
20020    # argument.
20021    path="$complete"
20022    arguments="EOL"
20023    new_path="$path"
20024
20025  windows_path="$new_path"
20026  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20027    unix_path=`$CYGPATH -u "$windows_path"`
20028    new_path="$unix_path"
20029  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20030    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20031    new_path="$unix_path"
20032  fi
20033
20034
20035    new_path=`$WHICH "$new_path" 2> /dev/null`
20036    # bat and cmd files are not always considered executable in MSYS causing which
20037    # to not find them
20038    if test "x$new_path" = x \
20039        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20040        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20041      new_path="$path"
20042
20043  windows_path="$new_path"
20044  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20045    unix_path=`$CYGPATH -u "$windows_path"`
20046    new_path="$unix_path"
20047  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20048    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20049    new_path="$unix_path"
20050  fi
20051
20052    fi
20053
20054    if test "x$new_path" = x; then
20055      # It's still not found. Now this is an unrecoverable error.
20056      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20057$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20058      has_space=`$ECHO "$complete" | $GREP " "`
20059      if test "x$has_space" != x; then
20060        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20061$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20062      fi
20063      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20064    fi
20065  fi
20066
20067  # Now new_path has a complete unix path to the binary
20068  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20069    # Keep paths in /bin as-is, but remove trailing .exe if any
20070    new_path="${new_path/%.exe/}"
20071    # Do not save /bin paths to all_fixpath_prefixes!
20072  else
20073    # Not in mixed or Windows style, start by that.
20074    new_path=`cmd //c echo $new_path`
20075
20076  input_path="$new_path"
20077  # Check if we need to convert this using DOS-style short mode. If the path
20078  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20079  # take no chances and rewrite it.
20080  # Note: m4 eats our [], so we need to use [ and ] instead.
20081  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20082  if test "x$has_forbidden_chars" != x; then
20083    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20084    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20085  fi
20086
20087    # Output is in $new_path
20088
20089  windows_path="$new_path"
20090  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20091    unix_path=`$CYGPATH -u "$windows_path"`
20092    new_path="$unix_path"
20093  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20094    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20095    new_path="$unix_path"
20096  fi
20097
20098    # remove trailing .exe if any
20099    new_path="${new_path/%.exe/}"
20100
20101    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20102    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20103  fi
20104
20105    else
20106      # We're on a unix platform. Hooray! :)
20107      # First separate the path from the arguments. This will split at the first
20108      # space.
20109      complete="$FOUND_MAKE"
20110      path="${complete%% *}"
20111      tmp="$complete EOL"
20112      arguments="${tmp#* }"
20113
20114      # Cannot rely on the command "which" here since it doesn't always work.
20115      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20116      if test -z "$is_absolute_path"; then
20117        # Path to executable is not absolute. Find it.
20118        IFS_save="$IFS"
20119        IFS=:
20120        for p in $PATH; do
20121          if test -f "$p/$path" && test -x "$p/$path"; then
20122            new_path="$p/$path"
20123            break
20124          fi
20125        done
20126        IFS="$IFS_save"
20127      else
20128        # This is an absolute path, we can use it without further modifications.
20129        new_path="$path"
20130      fi
20131
20132      if test "x$new_path" = x; then
20133        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20134$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20135        has_space=`$ECHO "$complete" | $GREP " "`
20136        if test "x$has_space" != x; then
20137          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20138$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20139        fi
20140        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20141      fi
20142    fi
20143
20144    # Now join together the path and the arguments once again
20145    if test "x$arguments" != xEOL; then
20146      new_complete="$new_path ${arguments% *}"
20147    else
20148      new_complete="$new_path"
20149    fi
20150
20151    if test "x$complete" != "x$new_complete"; then
20152      FOUND_MAKE="$new_complete"
20153      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20154$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20155    fi
20156  fi
20157
20158        fi
20159      fi
20160    fi
20161  fi
20162
20163        fi
20164        PATH=$OLD_PATH
20165      fi
20166    fi
20167
20168    if test "x$FOUND_MAKE" = x; then
20169      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
20170    fi
20171
20172    else
20173      # If it succeeded, then it was overridden by the user. We will use it
20174      # for the tool.
20175
20176      # First remove it from the list of overridden variables, so we can test
20177      # for unknown variables in the end.
20178      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20179
20180      # Check if we try to supply an empty value
20181      if test "x$MAKE" = x; then
20182        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20183$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20184        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20185$as_echo_n "checking for MAKE... " >&6; }
20186        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20187$as_echo "disabled" >&6; }
20188      else
20189        # Check if the provided tool contains a complete path.
20190        tool_specified="$MAKE"
20191        tool_basename="${tool_specified##*/}"
20192        if test "x$tool_basename" = "x$tool_specified"; then
20193          # A command without a complete path is provided, search $PATH.
20194          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20195$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20196          # Extract the first word of "$tool_basename", so it can be a program name with args.
20197set dummy $tool_basename; ac_word=$2
20198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20199$as_echo_n "checking for $ac_word... " >&6; }
20200if ${ac_cv_path_MAKE+:} false; then :
20201  $as_echo_n "(cached) " >&6
20202else
20203  case $MAKE in
20204  [\\/]* | ?:[\\/]*)
20205  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20206  ;;
20207  *)
20208  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20209for as_dir in $PATH
20210do
20211  IFS=$as_save_IFS
20212  test -z "$as_dir" && as_dir=.
20213    for ac_exec_ext in '' $ac_executable_extensions; do
20214  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20215    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
20216    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20217    break 2
20218  fi
20219done
20220  done
20221IFS=$as_save_IFS
20222
20223  ;;
20224esac
20225fi
20226MAKE=$ac_cv_path_MAKE
20227if test -n "$MAKE"; then
20228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
20229$as_echo "$MAKE" >&6; }
20230else
20231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20232$as_echo "no" >&6; }
20233fi
20234
20235
20236          if test "x$MAKE" = x; then
20237            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20238          fi
20239        else
20240          # Otherwise we believe it is a complete path. Use it as it is.
20241          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
20242$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
20243          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20244$as_echo_n "checking for MAKE... " >&6; }
20245          if test ! -x "$tool_specified"; then
20246            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20247$as_echo "not found" >&6; }
20248            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
20249          fi
20250          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20251$as_echo "$tool_specified" >&6; }
20252        fi
20253      fi
20254    fi
20255
20256    # If MAKE was set by user, verify the version
20257
20258  MAKE_CANDIDATE=""$MAKE""
20259  DESCRIPTION="user supplied MAKE=$MAKE"
20260
20261  # On Cygwin, we require a newer version of make than on other platforms
20262  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20263    MAKE_VERSION_EXPR="-e 4\."
20264    MAKE_REQUIRED_VERSION="4.0"
20265   else
20266    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20267    MAKE_REQUIRED_VERSION="3.81"
20268  fi
20269
20270  if test "x$MAKE_CANDIDATE" != x; then
20271    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20272$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20273    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20274    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20275    if test "x$IS_GNU_MAKE" = x; then
20276      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20277$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20278    else
20279      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20280      if test "x$IS_MODERN_MAKE" = x; then
20281        { $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
20282$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;}
20283      else
20284        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20285          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20286            MAKE_EXPECTED_ENV='cygwin'
20287          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20288            MAKE_EXPECTED_ENV='msys'
20289          else
20290            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20291          fi
20292          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20293          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20294        else
20295          # Not relevant for non-Windows
20296          IS_MAKE_CORRECT_ENV=true
20297        fi
20298        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20299          { $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
20300$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;}
20301        else
20302          FOUND_MAKE=$MAKE_CANDIDATE
20303
20304  # Only process if variable expands to non-empty
20305
20306  if test "x$FOUND_MAKE" != x; then
20307    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20308
20309  # First separate the path from the arguments. This will split at the first
20310  # space.
20311  complete="$FOUND_MAKE"
20312  path="${complete%% *}"
20313  tmp="$complete EOL"
20314  arguments="${tmp#* }"
20315
20316  # Input might be given as Windows format, start by converting to
20317  # unix format.
20318  new_path=`$CYGPATH -u "$path"`
20319
20320  # Now try to locate executable using which
20321  new_path=`$WHICH "$new_path" 2> /dev/null`
20322  # bat and cmd files are not always considered executable in cygwin causing which
20323  # to not find them
20324  if test "x$new_path" = x \
20325      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20326      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20327    new_path=`$CYGPATH -u "$path"`
20328  fi
20329  if test "x$new_path" = x; then
20330    # Oops. Which didn't find the executable.
20331    # The splitting of arguments from the executable at a space might have been incorrect,
20332    # since paths with space are more likely in Windows. Give it another try with the whole
20333    # argument.
20334    path="$complete"
20335    arguments="EOL"
20336    new_path=`$CYGPATH -u "$path"`
20337    new_path=`$WHICH "$new_path" 2> /dev/null`
20338    # bat and cmd files are not always considered executable in cygwin causing which
20339    # to not find them
20340    if test "x$new_path" = x \
20341        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20342        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20343      new_path=`$CYGPATH -u "$path"`
20344    fi
20345    if test "x$new_path" = x; then
20346      # It's still not found. Now this is an unrecoverable error.
20347      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20348$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20349      has_space=`$ECHO "$complete" | $GREP " "`
20350      if test "x$has_space" != x; then
20351        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20352$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20353      fi
20354      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20355    fi
20356  fi
20357
20358  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20359  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20360  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20361  # "foo.exe" is OK but "foo" is an error.
20362  #
20363  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20364  # It is also a way to make sure we got the proper file name for the real test later on.
20365  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20366  if test "x$test_shortpath" = x; then
20367    # Short path failed, file does not exist as specified.
20368    # Try adding .exe or .cmd
20369    if test -f "${new_path}.exe"; then
20370      input_to_shortpath="${new_path}.exe"
20371    elif test -f "${new_path}.cmd"; then
20372      input_to_shortpath="${new_path}.cmd"
20373    else
20374      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20375$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20376      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20377$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20378      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20379    fi
20380  else
20381    input_to_shortpath="$new_path"
20382  fi
20383
20384  # Call helper function which possibly converts this using DOS-style short mode.
20385  # If so, the updated path is stored in $new_path.
20386  new_path="$input_to_shortpath"
20387
20388  input_path="$input_to_shortpath"
20389  # Check if we need to convert this using DOS-style short mode. If the path
20390  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20391  # take no chances and rewrite it.
20392  # Note: m4 eats our [], so we need to use [ and ] instead.
20393  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20394  if test "x$has_forbidden_chars" != x; then
20395    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20396    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20397    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20398    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20399      # Going to short mode and back again did indeed matter. Since short mode is
20400      # case insensitive, let's make it lowercase to improve readability.
20401      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20402      # Now convert it back to Unix-style (cygpath)
20403      input_path=`$CYGPATH -u "$shortmode_path"`
20404      new_path="$input_path"
20405    fi
20406  fi
20407
20408  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20409  if test "x$test_cygdrive_prefix" = x; then
20410    # As a simple fix, exclude /usr/bin since it's not a real path.
20411    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20412      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20413      # a path prefixed by /cygdrive for fixpath to work.
20414      new_path="$CYGWIN_ROOT_PATH$input_path"
20415    fi
20416  fi
20417
20418  # remove trailing .exe if any
20419  new_path="${new_path/%.exe/}"
20420
20421    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20422
20423  # First separate the path from the arguments. This will split at the first
20424  # space.
20425  complete="$FOUND_MAKE"
20426  path="${complete%% *}"
20427  tmp="$complete EOL"
20428  arguments="${tmp#* }"
20429
20430  # Input might be given as Windows format, start by converting to
20431  # unix format.
20432  new_path="$path"
20433
20434  windows_path="$new_path"
20435  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20436    unix_path=`$CYGPATH -u "$windows_path"`
20437    new_path="$unix_path"
20438  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20439    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20440    new_path="$unix_path"
20441  fi
20442
20443
20444  # Now try to locate executable using which
20445  new_path=`$WHICH "$new_path" 2> /dev/null`
20446
20447  if test "x$new_path" = x; then
20448    # Oops. Which didn't find the executable.
20449    # The splitting of arguments from the executable at a space might have been incorrect,
20450    # since paths with space are more likely in Windows. Give it another try with the whole
20451    # argument.
20452    path="$complete"
20453    arguments="EOL"
20454    new_path="$path"
20455
20456  windows_path="$new_path"
20457  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20458    unix_path=`$CYGPATH -u "$windows_path"`
20459    new_path="$unix_path"
20460  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20461    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20462    new_path="$unix_path"
20463  fi
20464
20465
20466    new_path=`$WHICH "$new_path" 2> /dev/null`
20467    # bat and cmd files are not always considered executable in MSYS causing which
20468    # to not find them
20469    if test "x$new_path" = x \
20470        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20471        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20472      new_path="$path"
20473
20474  windows_path="$new_path"
20475  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20476    unix_path=`$CYGPATH -u "$windows_path"`
20477    new_path="$unix_path"
20478  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20479    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20480    new_path="$unix_path"
20481  fi
20482
20483    fi
20484
20485    if test "x$new_path" = x; then
20486      # It's still not found. Now this is an unrecoverable error.
20487      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20488$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20489      has_space=`$ECHO "$complete" | $GREP " "`
20490      if test "x$has_space" != x; then
20491        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20492$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20493      fi
20494      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20495    fi
20496  fi
20497
20498  # Now new_path has a complete unix path to the binary
20499  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20500    # Keep paths in /bin as-is, but remove trailing .exe if any
20501    new_path="${new_path/%.exe/}"
20502    # Do not save /bin paths to all_fixpath_prefixes!
20503  else
20504    # Not in mixed or Windows style, start by that.
20505    new_path=`cmd //c echo $new_path`
20506
20507  input_path="$new_path"
20508  # Check if we need to convert this using DOS-style short mode. If the path
20509  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20510  # take no chances and rewrite it.
20511  # Note: m4 eats our [], so we need to use [ and ] instead.
20512  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20513  if test "x$has_forbidden_chars" != x; then
20514    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20515    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20516  fi
20517
20518    # Output is in $new_path
20519
20520  windows_path="$new_path"
20521  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20522    unix_path=`$CYGPATH -u "$windows_path"`
20523    new_path="$unix_path"
20524  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20525    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20526    new_path="$unix_path"
20527  fi
20528
20529    # remove trailing .exe if any
20530    new_path="${new_path/%.exe/}"
20531
20532    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20533    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20534  fi
20535
20536    else
20537      # We're on a unix platform. Hooray! :)
20538      # First separate the path from the arguments. This will split at the first
20539      # space.
20540      complete="$FOUND_MAKE"
20541      path="${complete%% *}"
20542      tmp="$complete EOL"
20543      arguments="${tmp#* }"
20544
20545      # Cannot rely on the command "which" here since it doesn't always work.
20546      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20547      if test -z "$is_absolute_path"; then
20548        # Path to executable is not absolute. Find it.
20549        IFS_save="$IFS"
20550        IFS=:
20551        for p in $PATH; do
20552          if test -f "$p/$path" && test -x "$p/$path"; then
20553            new_path="$p/$path"
20554            break
20555          fi
20556        done
20557        IFS="$IFS_save"
20558      else
20559        # This is an absolute path, we can use it without further modifications.
20560        new_path="$path"
20561      fi
20562
20563      if test "x$new_path" = x; then
20564        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20565$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20566        has_space=`$ECHO "$complete" | $GREP " "`
20567        if test "x$has_space" != x; then
20568          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20569$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20570        fi
20571        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20572      fi
20573    fi
20574
20575    # Now join together the path and the arguments once again
20576    if test "x$arguments" != xEOL; then
20577      new_complete="$new_path ${arguments% *}"
20578    else
20579      new_complete="$new_path"
20580    fi
20581
20582    if test "x$complete" != "x$new_complete"; then
20583      FOUND_MAKE="$new_complete"
20584      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20585$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20586    fi
20587  fi
20588
20589        fi
20590      fi
20591    fi
20592  fi
20593
20594    if test "x$FOUND_MAKE" = x; then
20595      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
20596    fi
20597
20598  fi
20599
20600
20601  MAKE=$FOUND_MAKE
20602
20603  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
20604$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
20605
20606
20607  # Check if make supports the output sync option and if so, setup using it.
20608  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
20609$as_echo_n "checking if make --output-sync is supported... " >&6; }
20610  if $MAKE --version -O > /dev/null 2>&1; then
20611    OUTPUT_SYNC_SUPPORTED=true
20612    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20613$as_echo "yes" >&6; }
20614    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
20615$as_echo_n "checking for output-sync value... " >&6; }
20616
20617# Check whether --with-output-sync was given.
20618if test "${with_output_sync+set}" = set; then :
20619  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
20620fi
20621
20622    if test "x$OUTPUT_SYNC" = "x"; then
20623      OUTPUT_SYNC=none
20624    fi
20625    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
20626$as_echo "$OUTPUT_SYNC" >&6; }
20627    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
20628      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
20629    fi
20630  else
20631    OUTPUT_SYNC_SUPPORTED=false
20632    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20633$as_echo "no" >&6; }
20634  fi
20635
20636
20637
20638
20639
20640
20641  # Test if find supports -delete
20642  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
20643$as_echo_n "checking if find supports -delete... " >&6; }
20644  FIND_DELETE="-delete"
20645
20646  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
20647
20648  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
20649
20650  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
20651  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
20652    # No, it does not.
20653    rm $DELETEDIR/TestIfFindSupportsDelete
20654    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
20655      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
20656      FIND_DELETE="-print | xargs rm"
20657    else
20658      FIND_DELETE="-exec rm \{\} \+"
20659    fi
20660    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20661$as_echo "no" >&6; }
20662  else
20663    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20664$as_echo "yes" >&6; }
20665  fi
20666  rmdir $DELETEDIR
20667
20668
20669
20670  # These tools might not be installed by default,
20671  # need hint on how to install them.
20672
20673
20674
20675  # Publish this variable in the help.
20676
20677
20678  if [ -z "${UNZIP+x}" ]; then
20679    # The variable is not set by user, try to locate tool using the code snippet
20680    for ac_prog in unzip
20681do
20682  # Extract the first word of "$ac_prog", so it can be a program name with args.
20683set dummy $ac_prog; ac_word=$2
20684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20685$as_echo_n "checking for $ac_word... " >&6; }
20686if ${ac_cv_path_UNZIP+:} false; then :
20687  $as_echo_n "(cached) " >&6
20688else
20689  case $UNZIP in
20690  [\\/]* | ?:[\\/]*)
20691  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20692  ;;
20693  *)
20694  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20695for as_dir in $PATH
20696do
20697  IFS=$as_save_IFS
20698  test -z "$as_dir" && as_dir=.
20699    for ac_exec_ext in '' $ac_executable_extensions; do
20700  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20701    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20702    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20703    break 2
20704  fi
20705done
20706  done
20707IFS=$as_save_IFS
20708
20709  ;;
20710esac
20711fi
20712UNZIP=$ac_cv_path_UNZIP
20713if test -n "$UNZIP"; then
20714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20715$as_echo "$UNZIP" >&6; }
20716else
20717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20718$as_echo "no" >&6; }
20719fi
20720
20721
20722  test -n "$UNZIP" && break
20723done
20724
20725  else
20726    # The variable is set, but is it from the command line or the environment?
20727
20728    # Try to remove the string !UNZIP! from our list.
20729    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
20730    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20731      # If it failed, the variable was not from the command line. Ignore it,
20732      # but warn the user (except for BASH, which is always set by the calling BASH).
20733      if test "xUNZIP" != xBASH; then
20734        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
20735$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
20736      fi
20737      # Try to locate tool using the code snippet
20738      for ac_prog in unzip
20739do
20740  # Extract the first word of "$ac_prog", so it can be a program name with args.
20741set dummy $ac_prog; ac_word=$2
20742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20743$as_echo_n "checking for $ac_word... " >&6; }
20744if ${ac_cv_path_UNZIP+:} false; then :
20745  $as_echo_n "(cached) " >&6
20746else
20747  case $UNZIP in
20748  [\\/]* | ?:[\\/]*)
20749  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20750  ;;
20751  *)
20752  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20753for as_dir in $PATH
20754do
20755  IFS=$as_save_IFS
20756  test -z "$as_dir" && as_dir=.
20757    for ac_exec_ext in '' $ac_executable_extensions; do
20758  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20759    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20760    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20761    break 2
20762  fi
20763done
20764  done
20765IFS=$as_save_IFS
20766
20767  ;;
20768esac
20769fi
20770UNZIP=$ac_cv_path_UNZIP
20771if test -n "$UNZIP"; then
20772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20773$as_echo "$UNZIP" >&6; }
20774else
20775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20776$as_echo "no" >&6; }
20777fi
20778
20779
20780  test -n "$UNZIP" && break
20781done
20782
20783    else
20784      # If it succeeded, then it was overridden by the user. We will use it
20785      # for the tool.
20786
20787      # First remove it from the list of overridden variables, so we can test
20788      # for unknown variables in the end.
20789      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20790
20791      # Check if we try to supply an empty value
20792      if test "x$UNZIP" = x; then
20793        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
20794$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
20795        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20796$as_echo_n "checking for UNZIP... " >&6; }
20797        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20798$as_echo "disabled" >&6; }
20799      else
20800        # Check if the provided tool contains a complete path.
20801        tool_specified="$UNZIP"
20802        tool_basename="${tool_specified##*/}"
20803        if test "x$tool_basename" = "x$tool_specified"; then
20804          # A command without a complete path is provided, search $PATH.
20805          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
20806$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
20807          # Extract the first word of "$tool_basename", so it can be a program name with args.
20808set dummy $tool_basename; ac_word=$2
20809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20810$as_echo_n "checking for $ac_word... " >&6; }
20811if ${ac_cv_path_UNZIP+:} false; then :
20812  $as_echo_n "(cached) " >&6
20813else
20814  case $UNZIP in
20815  [\\/]* | ?:[\\/]*)
20816  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20817  ;;
20818  *)
20819  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20820for as_dir in $PATH
20821do
20822  IFS=$as_save_IFS
20823  test -z "$as_dir" && as_dir=.
20824    for ac_exec_ext in '' $ac_executable_extensions; do
20825  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20826    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20827    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20828    break 2
20829  fi
20830done
20831  done
20832IFS=$as_save_IFS
20833
20834  ;;
20835esac
20836fi
20837UNZIP=$ac_cv_path_UNZIP
20838if test -n "$UNZIP"; then
20839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20840$as_echo "$UNZIP" >&6; }
20841else
20842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20843$as_echo "no" >&6; }
20844fi
20845
20846
20847          if test "x$UNZIP" = x; then
20848            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20849          fi
20850        else
20851          # Otherwise we believe it is a complete path. Use it as it is.
20852          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
20853$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
20854          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20855$as_echo_n "checking for UNZIP... " >&6; }
20856          if test ! -x "$tool_specified"; then
20857            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20858$as_echo "not found" >&6; }
20859            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
20860          fi
20861          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20862$as_echo "$tool_specified" >&6; }
20863        fi
20864      fi
20865    fi
20866
20867  fi
20868
20869
20870
20871  if test "x$UNZIP" = x; then
20872    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
20873  fi
20874
20875
20876
20877
20878
20879  # Publish this variable in the help.
20880
20881
20882  if [ -z "${ZIP+x}" ]; then
20883    # The variable is not set by user, try to locate tool using the code snippet
20884    for ac_prog in zip
20885do
20886  # Extract the first word of "$ac_prog", so it can be a program name with args.
20887set dummy $ac_prog; ac_word=$2
20888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20889$as_echo_n "checking for $ac_word... " >&6; }
20890if ${ac_cv_path_ZIP+:} false; then :
20891  $as_echo_n "(cached) " >&6
20892else
20893  case $ZIP in
20894  [\\/]* | ?:[\\/]*)
20895  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20896  ;;
20897  *)
20898  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20899for as_dir in $PATH
20900do
20901  IFS=$as_save_IFS
20902  test -z "$as_dir" && as_dir=.
20903    for ac_exec_ext in '' $ac_executable_extensions; do
20904  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20905    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20906    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20907    break 2
20908  fi
20909done
20910  done
20911IFS=$as_save_IFS
20912
20913  ;;
20914esac
20915fi
20916ZIP=$ac_cv_path_ZIP
20917if test -n "$ZIP"; then
20918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20919$as_echo "$ZIP" >&6; }
20920else
20921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20922$as_echo "no" >&6; }
20923fi
20924
20925
20926  test -n "$ZIP" && break
20927done
20928
20929  else
20930    # The variable is set, but is it from the command line or the environment?
20931
20932    # Try to remove the string !ZIP! from our list.
20933    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
20934    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20935      # If it failed, the variable was not from the command line. Ignore it,
20936      # but warn the user (except for BASH, which is always set by the calling BASH).
20937      if test "xZIP" != xBASH; then
20938        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
20939$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
20940      fi
20941      # Try to locate tool using the code snippet
20942      for ac_prog in zip
20943do
20944  # Extract the first word of "$ac_prog", so it can be a program name with args.
20945set dummy $ac_prog; ac_word=$2
20946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20947$as_echo_n "checking for $ac_word... " >&6; }
20948if ${ac_cv_path_ZIP+:} false; then :
20949  $as_echo_n "(cached) " >&6
20950else
20951  case $ZIP in
20952  [\\/]* | ?:[\\/]*)
20953  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20954  ;;
20955  *)
20956  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20957for as_dir in $PATH
20958do
20959  IFS=$as_save_IFS
20960  test -z "$as_dir" && as_dir=.
20961    for ac_exec_ext in '' $ac_executable_extensions; do
20962  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20963    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20964    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20965    break 2
20966  fi
20967done
20968  done
20969IFS=$as_save_IFS
20970
20971  ;;
20972esac
20973fi
20974ZIP=$ac_cv_path_ZIP
20975if test -n "$ZIP"; then
20976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20977$as_echo "$ZIP" >&6; }
20978else
20979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20980$as_echo "no" >&6; }
20981fi
20982
20983
20984  test -n "$ZIP" && break
20985done
20986
20987    else
20988      # If it succeeded, then it was overridden by the user. We will use it
20989      # for the tool.
20990
20991      # First remove it from the list of overridden variables, so we can test
20992      # for unknown variables in the end.
20993      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20994
20995      # Check if we try to supply an empty value
20996      if test "x$ZIP" = x; then
20997        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIP= (no value)" >&5
20998$as_echo "$as_me: Setting user supplied tool ZIP= (no value)" >&6;}
20999        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
21000$as_echo_n "checking for ZIP... " >&6; }
21001        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21002$as_echo "disabled" >&6; }
21003      else
21004        # Check if the provided tool contains a complete path.
21005        tool_specified="$ZIP"
21006        tool_basename="${tool_specified##*/}"
21007        if test "x$tool_basename" = "x$tool_specified"; then
21008          # A command without a complete path is provided, search $PATH.
21009          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
21010$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
21011          # Extract the first word of "$tool_basename", so it can be a program name with args.
21012set dummy $tool_basename; ac_word=$2
21013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21014$as_echo_n "checking for $ac_word... " >&6; }
21015if ${ac_cv_path_ZIP+:} false; then :
21016  $as_echo_n "(cached) " >&6
21017else
21018  case $ZIP in
21019  [\\/]* | ?:[\\/]*)
21020  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
21021  ;;
21022  *)
21023  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21024for as_dir in $PATH
21025do
21026  IFS=$as_save_IFS
21027  test -z "$as_dir" && as_dir=.
21028    for ac_exec_ext in '' $ac_executable_extensions; do
21029  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21030    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
21031    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21032    break 2
21033  fi
21034done
21035  done
21036IFS=$as_save_IFS
21037
21038  ;;
21039esac
21040fi
21041ZIP=$ac_cv_path_ZIP
21042if test -n "$ZIP"; then
21043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21044$as_echo "$ZIP" >&6; }
21045else
21046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21047$as_echo "no" >&6; }
21048fi
21049
21050
21051          if test "x$ZIP" = x; then
21052            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21053          fi
21054        else
21055          # Otherwise we believe it is a complete path. Use it as it is.
21056          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
21057$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
21058          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
21059$as_echo_n "checking for ZIP... " >&6; }
21060          if test ! -x "$tool_specified"; then
21061            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21062$as_echo "not found" >&6; }
21063            as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21064          fi
21065          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21066$as_echo "$tool_specified" >&6; }
21067        fi
21068      fi
21069    fi
21070
21071  fi
21072
21073
21074
21075  if test "x$ZIP" = x; then
21076    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
21077  fi
21078
21079
21080
21081  # Non-required basic tools
21082
21083
21084
21085  # Publish this variable in the help.
21086
21087
21088  if [ -z "${LDD+x}" ]; then
21089    # The variable is not set by user, try to locate tool using the code snippet
21090    for ac_prog in ldd
21091do
21092  # Extract the first word of "$ac_prog", so it can be a program name with args.
21093set dummy $ac_prog; ac_word=$2
21094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21095$as_echo_n "checking for $ac_word... " >&6; }
21096if ${ac_cv_path_LDD+:} false; then :
21097  $as_echo_n "(cached) " >&6
21098else
21099  case $LDD in
21100  [\\/]* | ?:[\\/]*)
21101  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21102  ;;
21103  *)
21104  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21105for as_dir in $PATH
21106do
21107  IFS=$as_save_IFS
21108  test -z "$as_dir" && as_dir=.
21109    for ac_exec_ext in '' $ac_executable_extensions; do
21110  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21111    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21112    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21113    break 2
21114  fi
21115done
21116  done
21117IFS=$as_save_IFS
21118
21119  ;;
21120esac
21121fi
21122LDD=$ac_cv_path_LDD
21123if test -n "$LDD"; then
21124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21125$as_echo "$LDD" >&6; }
21126else
21127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21128$as_echo "no" >&6; }
21129fi
21130
21131
21132  test -n "$LDD" && break
21133done
21134
21135  else
21136    # The variable is set, but is it from the command line or the environment?
21137
21138    # Try to remove the string !LDD! from our list.
21139    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
21140    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21141      # If it failed, the variable was not from the command line. Ignore it,
21142      # but warn the user (except for BASH, which is always set by the calling BASH).
21143      if test "xLDD" != xBASH; then
21144        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
21145$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
21146      fi
21147      # Try to locate tool using the code snippet
21148      for ac_prog in ldd
21149do
21150  # Extract the first word of "$ac_prog", so it can be a program name with args.
21151set dummy $ac_prog; ac_word=$2
21152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21153$as_echo_n "checking for $ac_word... " >&6; }
21154if ${ac_cv_path_LDD+:} false; then :
21155  $as_echo_n "(cached) " >&6
21156else
21157  case $LDD in
21158  [\\/]* | ?:[\\/]*)
21159  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21160  ;;
21161  *)
21162  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21163for as_dir in $PATH
21164do
21165  IFS=$as_save_IFS
21166  test -z "$as_dir" && as_dir=.
21167    for ac_exec_ext in '' $ac_executable_extensions; do
21168  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21169    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21170    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21171    break 2
21172  fi
21173done
21174  done
21175IFS=$as_save_IFS
21176
21177  ;;
21178esac
21179fi
21180LDD=$ac_cv_path_LDD
21181if test -n "$LDD"; then
21182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21183$as_echo "$LDD" >&6; }
21184else
21185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21186$as_echo "no" >&6; }
21187fi
21188
21189
21190  test -n "$LDD" && break
21191done
21192
21193    else
21194      # If it succeeded, then it was overridden by the user. We will use it
21195      # for the tool.
21196
21197      # First remove it from the list of overridden variables, so we can test
21198      # for unknown variables in the end.
21199      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21200
21201      # Check if we try to supply an empty value
21202      if test "x$LDD" = x; then
21203        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
21204$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
21205        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21206$as_echo_n "checking for LDD... " >&6; }
21207        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21208$as_echo "disabled" >&6; }
21209      else
21210        # Check if the provided tool contains a complete path.
21211        tool_specified="$LDD"
21212        tool_basename="${tool_specified##*/}"
21213        if test "x$tool_basename" = "x$tool_specified"; then
21214          # A command without a complete path is provided, search $PATH.
21215          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
21216$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
21217          # Extract the first word of "$tool_basename", so it can be a program name with args.
21218set dummy $tool_basename; ac_word=$2
21219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21220$as_echo_n "checking for $ac_word... " >&6; }
21221if ${ac_cv_path_LDD+:} false; then :
21222  $as_echo_n "(cached) " >&6
21223else
21224  case $LDD in
21225  [\\/]* | ?:[\\/]*)
21226  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21227  ;;
21228  *)
21229  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21230for as_dir in $PATH
21231do
21232  IFS=$as_save_IFS
21233  test -z "$as_dir" && as_dir=.
21234    for ac_exec_ext in '' $ac_executable_extensions; do
21235  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21236    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21237    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21238    break 2
21239  fi
21240done
21241  done
21242IFS=$as_save_IFS
21243
21244  ;;
21245esac
21246fi
21247LDD=$ac_cv_path_LDD
21248if test -n "$LDD"; then
21249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21250$as_echo "$LDD" >&6; }
21251else
21252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21253$as_echo "no" >&6; }
21254fi
21255
21256
21257          if test "x$LDD" = x; then
21258            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21259          fi
21260        else
21261          # Otherwise we believe it is a complete path. Use it as it is.
21262          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
21263$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
21264          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21265$as_echo_n "checking for LDD... " >&6; }
21266          if test ! -x "$tool_specified"; then
21267            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21268$as_echo "not found" >&6; }
21269            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
21270          fi
21271          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21272$as_echo "$tool_specified" >&6; }
21273        fi
21274      fi
21275    fi
21276
21277  fi
21278
21279
21280  if test "x$LDD" = "x"; then
21281    # List shared lib dependencies is used for
21282    # debug output and checking for forbidden dependencies.
21283    # We can build without it.
21284    LDD="true"
21285  fi
21286
21287
21288  # Publish this variable in the help.
21289
21290
21291  if [ -z "${OTOOL+x}" ]; then
21292    # The variable is not set by user, try to locate tool using the code snippet
21293    for ac_prog in otool
21294do
21295  # Extract the first word of "$ac_prog", so it can be a program name with args.
21296set dummy $ac_prog; ac_word=$2
21297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21298$as_echo_n "checking for $ac_word... " >&6; }
21299if ${ac_cv_path_OTOOL+:} false; then :
21300  $as_echo_n "(cached) " >&6
21301else
21302  case $OTOOL in
21303  [\\/]* | ?:[\\/]*)
21304  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21305  ;;
21306  *)
21307  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21308for as_dir in $PATH
21309do
21310  IFS=$as_save_IFS
21311  test -z "$as_dir" && as_dir=.
21312    for ac_exec_ext in '' $ac_executable_extensions; do
21313  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21314    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21315    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21316    break 2
21317  fi
21318done
21319  done
21320IFS=$as_save_IFS
21321
21322  ;;
21323esac
21324fi
21325OTOOL=$ac_cv_path_OTOOL
21326if test -n "$OTOOL"; then
21327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21328$as_echo "$OTOOL" >&6; }
21329else
21330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21331$as_echo "no" >&6; }
21332fi
21333
21334
21335  test -n "$OTOOL" && break
21336done
21337
21338  else
21339    # The variable is set, but is it from the command line or the environment?
21340
21341    # Try to remove the string !OTOOL! from our list.
21342    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
21343    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21344      # If it failed, the variable was not from the command line. Ignore it,
21345      # but warn the user (except for BASH, which is always set by the calling BASH).
21346      if test "xOTOOL" != xBASH; then
21347        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
21348$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
21349      fi
21350      # Try to locate tool using the code snippet
21351      for ac_prog in otool
21352do
21353  # Extract the first word of "$ac_prog", so it can be a program name with args.
21354set dummy $ac_prog; ac_word=$2
21355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21356$as_echo_n "checking for $ac_word... " >&6; }
21357if ${ac_cv_path_OTOOL+:} false; then :
21358  $as_echo_n "(cached) " >&6
21359else
21360  case $OTOOL in
21361  [\\/]* | ?:[\\/]*)
21362  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21363  ;;
21364  *)
21365  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21366for as_dir in $PATH
21367do
21368  IFS=$as_save_IFS
21369  test -z "$as_dir" && as_dir=.
21370    for ac_exec_ext in '' $ac_executable_extensions; do
21371  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21372    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21373    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21374    break 2
21375  fi
21376done
21377  done
21378IFS=$as_save_IFS
21379
21380  ;;
21381esac
21382fi
21383OTOOL=$ac_cv_path_OTOOL
21384if test -n "$OTOOL"; then
21385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21386$as_echo "$OTOOL" >&6; }
21387else
21388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21389$as_echo "no" >&6; }
21390fi
21391
21392
21393  test -n "$OTOOL" && break
21394done
21395
21396    else
21397      # If it succeeded, then it was overridden by the user. We will use it
21398      # for the tool.
21399
21400      # First remove it from the list of overridden variables, so we can test
21401      # for unknown variables in the end.
21402      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21403
21404      # Check if we try to supply an empty value
21405      if test "x$OTOOL" = x; then
21406        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
21407$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
21408        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21409$as_echo_n "checking for OTOOL... " >&6; }
21410        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21411$as_echo "disabled" >&6; }
21412      else
21413        # Check if the provided tool contains a complete path.
21414        tool_specified="$OTOOL"
21415        tool_basename="${tool_specified##*/}"
21416        if test "x$tool_basename" = "x$tool_specified"; then
21417          # A command without a complete path is provided, search $PATH.
21418          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
21419$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
21420          # Extract the first word of "$tool_basename", so it can be a program name with args.
21421set dummy $tool_basename; ac_word=$2
21422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21423$as_echo_n "checking for $ac_word... " >&6; }
21424if ${ac_cv_path_OTOOL+:} false; then :
21425  $as_echo_n "(cached) " >&6
21426else
21427  case $OTOOL in
21428  [\\/]* | ?:[\\/]*)
21429  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21430  ;;
21431  *)
21432  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21433for as_dir in $PATH
21434do
21435  IFS=$as_save_IFS
21436  test -z "$as_dir" && as_dir=.
21437    for ac_exec_ext in '' $ac_executable_extensions; do
21438  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21439    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21440    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21441    break 2
21442  fi
21443done
21444  done
21445IFS=$as_save_IFS
21446
21447  ;;
21448esac
21449fi
21450OTOOL=$ac_cv_path_OTOOL
21451if test -n "$OTOOL"; then
21452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21453$as_echo "$OTOOL" >&6; }
21454else
21455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21456$as_echo "no" >&6; }
21457fi
21458
21459
21460          if test "x$OTOOL" = x; then
21461            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21462          fi
21463        else
21464          # Otherwise we believe it is a complete path. Use it as it is.
21465          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
21466$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
21467          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21468$as_echo_n "checking for OTOOL... " >&6; }
21469          if test ! -x "$tool_specified"; then
21470            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21471$as_echo "not found" >&6; }
21472            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
21473          fi
21474          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21475$as_echo "$tool_specified" >&6; }
21476        fi
21477      fi
21478    fi
21479
21480  fi
21481
21482
21483  if test "x$OTOOL" = "x"; then
21484    OTOOL="true"
21485  fi
21486
21487
21488  # Publish this variable in the help.
21489
21490
21491  if [ -z "${READELF+x}" ]; then
21492    # The variable is not set by user, try to locate tool using the code snippet
21493    for ac_prog in greadelf readelf
21494do
21495  # Extract the first word of "$ac_prog", so it can be a program name with args.
21496set dummy $ac_prog; ac_word=$2
21497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21498$as_echo_n "checking for $ac_word... " >&6; }
21499if ${ac_cv_path_READELF+:} false; then :
21500  $as_echo_n "(cached) " >&6
21501else
21502  case $READELF in
21503  [\\/]* | ?:[\\/]*)
21504  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21505  ;;
21506  *)
21507  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21508for as_dir in $PATH
21509do
21510  IFS=$as_save_IFS
21511  test -z "$as_dir" && as_dir=.
21512    for ac_exec_ext in '' $ac_executable_extensions; do
21513  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21514    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21515    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21516    break 2
21517  fi
21518done
21519  done
21520IFS=$as_save_IFS
21521
21522  ;;
21523esac
21524fi
21525READELF=$ac_cv_path_READELF
21526if test -n "$READELF"; then
21527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21528$as_echo "$READELF" >&6; }
21529else
21530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21531$as_echo "no" >&6; }
21532fi
21533
21534
21535  test -n "$READELF" && break
21536done
21537
21538  else
21539    # The variable is set, but is it from the command line or the environment?
21540
21541    # Try to remove the string !READELF! from our list.
21542    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
21543    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21544      # If it failed, the variable was not from the command line. Ignore it,
21545      # but warn the user (except for BASH, which is always set by the calling BASH).
21546      if test "xREADELF" != xBASH; then
21547        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
21548$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
21549      fi
21550      # Try to locate tool using the code snippet
21551      for ac_prog in greadelf readelf
21552do
21553  # Extract the first word of "$ac_prog", so it can be a program name with args.
21554set dummy $ac_prog; ac_word=$2
21555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21556$as_echo_n "checking for $ac_word... " >&6; }
21557if ${ac_cv_path_READELF+:} false; then :
21558  $as_echo_n "(cached) " >&6
21559else
21560  case $READELF in
21561  [\\/]* | ?:[\\/]*)
21562  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21563  ;;
21564  *)
21565  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21566for as_dir in $PATH
21567do
21568  IFS=$as_save_IFS
21569  test -z "$as_dir" && as_dir=.
21570    for ac_exec_ext in '' $ac_executable_extensions; do
21571  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21572    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21573    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21574    break 2
21575  fi
21576done
21577  done
21578IFS=$as_save_IFS
21579
21580  ;;
21581esac
21582fi
21583READELF=$ac_cv_path_READELF
21584if test -n "$READELF"; then
21585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21586$as_echo "$READELF" >&6; }
21587else
21588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21589$as_echo "no" >&6; }
21590fi
21591
21592
21593  test -n "$READELF" && break
21594done
21595
21596    else
21597      # If it succeeded, then it was overridden by the user. We will use it
21598      # for the tool.
21599
21600      # First remove it from the list of overridden variables, so we can test
21601      # for unknown variables in the end.
21602      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21603
21604      # Check if we try to supply an empty value
21605      if test "x$READELF" = x; then
21606        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
21607$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
21608        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21609$as_echo_n "checking for READELF... " >&6; }
21610        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21611$as_echo "disabled" >&6; }
21612      else
21613        # Check if the provided tool contains a complete path.
21614        tool_specified="$READELF"
21615        tool_basename="${tool_specified##*/}"
21616        if test "x$tool_basename" = "x$tool_specified"; then
21617          # A command without a complete path is provided, search $PATH.
21618          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
21619$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
21620          # Extract the first word of "$tool_basename", so it can be a program name with args.
21621set dummy $tool_basename; ac_word=$2
21622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21623$as_echo_n "checking for $ac_word... " >&6; }
21624if ${ac_cv_path_READELF+:} false; then :
21625  $as_echo_n "(cached) " >&6
21626else
21627  case $READELF in
21628  [\\/]* | ?:[\\/]*)
21629  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21630  ;;
21631  *)
21632  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21633for as_dir in $PATH
21634do
21635  IFS=$as_save_IFS
21636  test -z "$as_dir" && as_dir=.
21637    for ac_exec_ext in '' $ac_executable_extensions; do
21638  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21639    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21640    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21641    break 2
21642  fi
21643done
21644  done
21645IFS=$as_save_IFS
21646
21647  ;;
21648esac
21649fi
21650READELF=$ac_cv_path_READELF
21651if test -n "$READELF"; then
21652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21653$as_echo "$READELF" >&6; }
21654else
21655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21656$as_echo "no" >&6; }
21657fi
21658
21659
21660          if test "x$READELF" = x; then
21661            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21662          fi
21663        else
21664          # Otherwise we believe it is a complete path. Use it as it is.
21665          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
21666$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
21667          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21668$as_echo_n "checking for READELF... " >&6; }
21669          if test ! -x "$tool_specified"; then
21670            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21671$as_echo "not found" >&6; }
21672            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
21673          fi
21674          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21675$as_echo "$tool_specified" >&6; }
21676        fi
21677      fi
21678    fi
21679
21680  fi
21681
21682
21683
21684
21685  # Publish this variable in the help.
21686
21687
21688  if [ -z "${HG+x}" ]; then
21689    # The variable is not set by user, try to locate tool using the code snippet
21690    for ac_prog in hg
21691do
21692  # Extract the first word of "$ac_prog", so it can be a program name with args.
21693set dummy $ac_prog; ac_word=$2
21694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21695$as_echo_n "checking for $ac_word... " >&6; }
21696if ${ac_cv_path_HG+:} false; then :
21697  $as_echo_n "(cached) " >&6
21698else
21699  case $HG in
21700  [\\/]* | ?:[\\/]*)
21701  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21702  ;;
21703  *)
21704  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21705for as_dir in $PATH
21706do
21707  IFS=$as_save_IFS
21708  test -z "$as_dir" && as_dir=.
21709    for ac_exec_ext in '' $ac_executable_extensions; do
21710  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21711    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21712    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21713    break 2
21714  fi
21715done
21716  done
21717IFS=$as_save_IFS
21718
21719  ;;
21720esac
21721fi
21722HG=$ac_cv_path_HG
21723if test -n "$HG"; then
21724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21725$as_echo "$HG" >&6; }
21726else
21727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21728$as_echo "no" >&6; }
21729fi
21730
21731
21732  test -n "$HG" && break
21733done
21734
21735  else
21736    # The variable is set, but is it from the command line or the environment?
21737
21738    # Try to remove the string !HG! from our list.
21739    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
21740    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21741      # If it failed, the variable was not from the command line. Ignore it,
21742      # but warn the user (except for BASH, which is always set by the calling BASH).
21743      if test "xHG" != xBASH; then
21744        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
21745$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
21746      fi
21747      # Try to locate tool using the code snippet
21748      for ac_prog in hg
21749do
21750  # Extract the first word of "$ac_prog", so it can be a program name with args.
21751set dummy $ac_prog; ac_word=$2
21752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21753$as_echo_n "checking for $ac_word... " >&6; }
21754if ${ac_cv_path_HG+:} false; then :
21755  $as_echo_n "(cached) " >&6
21756else
21757  case $HG in
21758  [\\/]* | ?:[\\/]*)
21759  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21760  ;;
21761  *)
21762  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21763for as_dir in $PATH
21764do
21765  IFS=$as_save_IFS
21766  test -z "$as_dir" && as_dir=.
21767    for ac_exec_ext in '' $ac_executable_extensions; do
21768  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21769    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21770    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21771    break 2
21772  fi
21773done
21774  done
21775IFS=$as_save_IFS
21776
21777  ;;
21778esac
21779fi
21780HG=$ac_cv_path_HG
21781if test -n "$HG"; then
21782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21783$as_echo "$HG" >&6; }
21784else
21785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21786$as_echo "no" >&6; }
21787fi
21788
21789
21790  test -n "$HG" && break
21791done
21792
21793    else
21794      # If it succeeded, then it was overridden by the user. We will use it
21795      # for the tool.
21796
21797      # First remove it from the list of overridden variables, so we can test
21798      # for unknown variables in the end.
21799      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21800
21801      # Check if we try to supply an empty value
21802      if test "x$HG" = x; then
21803        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
21804$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
21805        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21806$as_echo_n "checking for HG... " >&6; }
21807        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21808$as_echo "disabled" >&6; }
21809      else
21810        # Check if the provided tool contains a complete path.
21811        tool_specified="$HG"
21812        tool_basename="${tool_specified##*/}"
21813        if test "x$tool_basename" = "x$tool_specified"; then
21814          # A command without a complete path is provided, search $PATH.
21815          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
21816$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
21817          # Extract the first word of "$tool_basename", so it can be a program name with args.
21818set dummy $tool_basename; ac_word=$2
21819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21820$as_echo_n "checking for $ac_word... " >&6; }
21821if ${ac_cv_path_HG+:} false; then :
21822  $as_echo_n "(cached) " >&6
21823else
21824  case $HG in
21825  [\\/]* | ?:[\\/]*)
21826  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21827  ;;
21828  *)
21829  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21830for as_dir in $PATH
21831do
21832  IFS=$as_save_IFS
21833  test -z "$as_dir" && as_dir=.
21834    for ac_exec_ext in '' $ac_executable_extensions; do
21835  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21836    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21837    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21838    break 2
21839  fi
21840done
21841  done
21842IFS=$as_save_IFS
21843
21844  ;;
21845esac
21846fi
21847HG=$ac_cv_path_HG
21848if test -n "$HG"; then
21849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21850$as_echo "$HG" >&6; }
21851else
21852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21853$as_echo "no" >&6; }
21854fi
21855
21856
21857          if test "x$HG" = x; then
21858            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21859          fi
21860        else
21861          # Otherwise we believe it is a complete path. Use it as it is.
21862          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
21863$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
21864          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21865$as_echo_n "checking for HG... " >&6; }
21866          if test ! -x "$tool_specified"; then
21867            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21868$as_echo "not found" >&6; }
21869            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
21870          fi
21871          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21872$as_echo "$tool_specified" >&6; }
21873        fi
21874      fi
21875    fi
21876
21877  fi
21878
21879
21880
21881
21882  # Publish this variable in the help.
21883
21884
21885  if [ -z "${STAT+x}" ]; then
21886    # The variable is not set by user, try to locate tool using the code snippet
21887    for ac_prog in stat
21888do
21889  # Extract the first word of "$ac_prog", so it can be a program name with args.
21890set dummy $ac_prog; ac_word=$2
21891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21892$as_echo_n "checking for $ac_word... " >&6; }
21893if ${ac_cv_path_STAT+:} false; then :
21894  $as_echo_n "(cached) " >&6
21895else
21896  case $STAT in
21897  [\\/]* | ?:[\\/]*)
21898  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21899  ;;
21900  *)
21901  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21902for as_dir in $PATH
21903do
21904  IFS=$as_save_IFS
21905  test -z "$as_dir" && as_dir=.
21906    for ac_exec_ext in '' $ac_executable_extensions; do
21907  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21908    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21909    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21910    break 2
21911  fi
21912done
21913  done
21914IFS=$as_save_IFS
21915
21916  ;;
21917esac
21918fi
21919STAT=$ac_cv_path_STAT
21920if test -n "$STAT"; then
21921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21922$as_echo "$STAT" >&6; }
21923else
21924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21925$as_echo "no" >&6; }
21926fi
21927
21928
21929  test -n "$STAT" && break
21930done
21931
21932  else
21933    # The variable is set, but is it from the command line or the environment?
21934
21935    # Try to remove the string !STAT! from our list.
21936    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
21937    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21938      # If it failed, the variable was not from the command line. Ignore it,
21939      # but warn the user (except for BASH, which is always set by the calling BASH).
21940      if test "xSTAT" != xBASH; then
21941        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
21942$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
21943      fi
21944      # Try to locate tool using the code snippet
21945      for ac_prog in stat
21946do
21947  # Extract the first word of "$ac_prog", so it can be a program name with args.
21948set dummy $ac_prog; ac_word=$2
21949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21950$as_echo_n "checking for $ac_word... " >&6; }
21951if ${ac_cv_path_STAT+:} false; then :
21952  $as_echo_n "(cached) " >&6
21953else
21954  case $STAT in
21955  [\\/]* | ?:[\\/]*)
21956  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21957  ;;
21958  *)
21959  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21960for as_dir in $PATH
21961do
21962  IFS=$as_save_IFS
21963  test -z "$as_dir" && as_dir=.
21964    for ac_exec_ext in '' $ac_executable_extensions; do
21965  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21966    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21967    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21968    break 2
21969  fi
21970done
21971  done
21972IFS=$as_save_IFS
21973
21974  ;;
21975esac
21976fi
21977STAT=$ac_cv_path_STAT
21978if test -n "$STAT"; then
21979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21980$as_echo "$STAT" >&6; }
21981else
21982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21983$as_echo "no" >&6; }
21984fi
21985
21986
21987  test -n "$STAT" && break
21988done
21989
21990    else
21991      # If it succeeded, then it was overridden by the user. We will use it
21992      # for the tool.
21993
21994      # First remove it from the list of overridden variables, so we can test
21995      # for unknown variables in the end.
21996      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21997
21998      # Check if we try to supply an empty value
21999      if test "x$STAT" = x; then
22000        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
22001$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
22002        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22003$as_echo_n "checking for STAT... " >&6; }
22004        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22005$as_echo "disabled" >&6; }
22006      else
22007        # Check if the provided tool contains a complete path.
22008        tool_specified="$STAT"
22009        tool_basename="${tool_specified##*/}"
22010        if test "x$tool_basename" = "x$tool_specified"; then
22011          # A command without a complete path is provided, search $PATH.
22012          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
22013$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
22014          # Extract the first word of "$tool_basename", so it can be a program name with args.
22015set dummy $tool_basename; ac_word=$2
22016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22017$as_echo_n "checking for $ac_word... " >&6; }
22018if ${ac_cv_path_STAT+:} false; then :
22019  $as_echo_n "(cached) " >&6
22020else
22021  case $STAT in
22022  [\\/]* | ?:[\\/]*)
22023  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22024  ;;
22025  *)
22026  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22027for as_dir in $PATH
22028do
22029  IFS=$as_save_IFS
22030  test -z "$as_dir" && as_dir=.
22031    for ac_exec_ext in '' $ac_executable_extensions; do
22032  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22033    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22034    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22035    break 2
22036  fi
22037done
22038  done
22039IFS=$as_save_IFS
22040
22041  ;;
22042esac
22043fi
22044STAT=$ac_cv_path_STAT
22045if test -n "$STAT"; then
22046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22047$as_echo "$STAT" >&6; }
22048else
22049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22050$as_echo "no" >&6; }
22051fi
22052
22053
22054          if test "x$STAT" = x; then
22055            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22056          fi
22057        else
22058          # Otherwise we believe it is a complete path. Use it as it is.
22059          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
22060$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
22061          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22062$as_echo_n "checking for STAT... " >&6; }
22063          if test ! -x "$tool_specified"; then
22064            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22065$as_echo "not found" >&6; }
22066            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
22067          fi
22068          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22069$as_echo "$tool_specified" >&6; }
22070        fi
22071      fi
22072    fi
22073
22074  fi
22075
22076
22077
22078
22079  # Publish this variable in the help.
22080
22081
22082  if [ -z "${TIME+x}" ]; then
22083    # The variable is not set by user, try to locate tool using the code snippet
22084    for ac_prog in time
22085do
22086  # Extract the first word of "$ac_prog", so it can be a program name with args.
22087set dummy $ac_prog; ac_word=$2
22088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22089$as_echo_n "checking for $ac_word... " >&6; }
22090if ${ac_cv_path_TIME+:} false; then :
22091  $as_echo_n "(cached) " >&6
22092else
22093  case $TIME in
22094  [\\/]* | ?:[\\/]*)
22095  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22096  ;;
22097  *)
22098  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22099for as_dir in $PATH
22100do
22101  IFS=$as_save_IFS
22102  test -z "$as_dir" && as_dir=.
22103    for ac_exec_ext in '' $ac_executable_extensions; do
22104  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22105    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22106    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22107    break 2
22108  fi
22109done
22110  done
22111IFS=$as_save_IFS
22112
22113  ;;
22114esac
22115fi
22116TIME=$ac_cv_path_TIME
22117if test -n "$TIME"; then
22118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22119$as_echo "$TIME" >&6; }
22120else
22121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22122$as_echo "no" >&6; }
22123fi
22124
22125
22126  test -n "$TIME" && break
22127done
22128
22129  else
22130    # The variable is set, but is it from the command line or the environment?
22131
22132    # Try to remove the string !TIME! from our list.
22133    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
22134    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22135      # If it failed, the variable was not from the command line. Ignore it,
22136      # but warn the user (except for BASH, which is always set by the calling BASH).
22137      if test "xTIME" != xBASH; then
22138        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
22139$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
22140      fi
22141      # Try to locate tool using the code snippet
22142      for ac_prog in time
22143do
22144  # Extract the first word of "$ac_prog", so it can be a program name with args.
22145set dummy $ac_prog; ac_word=$2
22146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22147$as_echo_n "checking for $ac_word... " >&6; }
22148if ${ac_cv_path_TIME+:} false; then :
22149  $as_echo_n "(cached) " >&6
22150else
22151  case $TIME in
22152  [\\/]* | ?:[\\/]*)
22153  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22154  ;;
22155  *)
22156  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22157for as_dir in $PATH
22158do
22159  IFS=$as_save_IFS
22160  test -z "$as_dir" && as_dir=.
22161    for ac_exec_ext in '' $ac_executable_extensions; do
22162  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22163    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22164    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22165    break 2
22166  fi
22167done
22168  done
22169IFS=$as_save_IFS
22170
22171  ;;
22172esac
22173fi
22174TIME=$ac_cv_path_TIME
22175if test -n "$TIME"; then
22176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22177$as_echo "$TIME" >&6; }
22178else
22179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22180$as_echo "no" >&6; }
22181fi
22182
22183
22184  test -n "$TIME" && break
22185done
22186
22187    else
22188      # If it succeeded, then it was overridden by the user. We will use it
22189      # for the tool.
22190
22191      # First remove it from the list of overridden variables, so we can test
22192      # for unknown variables in the end.
22193      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22194
22195      # Check if we try to supply an empty value
22196      if test "x$TIME" = x; then
22197        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
22198$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
22199        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22200$as_echo_n "checking for TIME... " >&6; }
22201        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22202$as_echo "disabled" >&6; }
22203      else
22204        # Check if the provided tool contains a complete path.
22205        tool_specified="$TIME"
22206        tool_basename="${tool_specified##*/}"
22207        if test "x$tool_basename" = "x$tool_specified"; then
22208          # A command without a complete path is provided, search $PATH.
22209          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
22210$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
22211          # Extract the first word of "$tool_basename", so it can be a program name with args.
22212set dummy $tool_basename; ac_word=$2
22213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22214$as_echo_n "checking for $ac_word... " >&6; }
22215if ${ac_cv_path_TIME+:} false; then :
22216  $as_echo_n "(cached) " >&6
22217else
22218  case $TIME in
22219  [\\/]* | ?:[\\/]*)
22220  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22221  ;;
22222  *)
22223  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22224for as_dir in $PATH
22225do
22226  IFS=$as_save_IFS
22227  test -z "$as_dir" && as_dir=.
22228    for ac_exec_ext in '' $ac_executable_extensions; do
22229  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22230    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22231    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22232    break 2
22233  fi
22234done
22235  done
22236IFS=$as_save_IFS
22237
22238  ;;
22239esac
22240fi
22241TIME=$ac_cv_path_TIME
22242if test -n "$TIME"; then
22243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22244$as_echo "$TIME" >&6; }
22245else
22246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22247$as_echo "no" >&6; }
22248fi
22249
22250
22251          if test "x$TIME" = x; then
22252            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22253          fi
22254        else
22255          # Otherwise we believe it is a complete path. Use it as it is.
22256          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
22257$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
22258          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22259$as_echo_n "checking for TIME... " >&6; }
22260          if test ! -x "$tool_specified"; then
22261            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22262$as_echo "not found" >&6; }
22263            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
22264          fi
22265          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22266$as_echo "$tool_specified" >&6; }
22267        fi
22268      fi
22269    fi
22270
22271  fi
22272
22273
22274
22275
22276  # Publish this variable in the help.
22277
22278
22279  if [ -z "${DTRACE+x}" ]; then
22280    # The variable is not set by user, try to locate tool using the code snippet
22281    for ac_prog in dtrace
22282do
22283  # Extract the first word of "$ac_prog", so it can be a program name with args.
22284set dummy $ac_prog; ac_word=$2
22285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22286$as_echo_n "checking for $ac_word... " >&6; }
22287if ${ac_cv_path_DTRACE+:} false; then :
22288  $as_echo_n "(cached) " >&6
22289else
22290  case $DTRACE in
22291  [\\/]* | ?:[\\/]*)
22292  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22293  ;;
22294  *)
22295  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22296for as_dir in $PATH
22297do
22298  IFS=$as_save_IFS
22299  test -z "$as_dir" && as_dir=.
22300    for ac_exec_ext in '' $ac_executable_extensions; do
22301  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22302    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22303    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22304    break 2
22305  fi
22306done
22307  done
22308IFS=$as_save_IFS
22309
22310  ;;
22311esac
22312fi
22313DTRACE=$ac_cv_path_DTRACE
22314if test -n "$DTRACE"; then
22315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22316$as_echo "$DTRACE" >&6; }
22317else
22318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22319$as_echo "no" >&6; }
22320fi
22321
22322
22323  test -n "$DTRACE" && break
22324done
22325
22326  else
22327    # The variable is set, but is it from the command line or the environment?
22328
22329    # Try to remove the string !DTRACE! from our list.
22330    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
22331    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22332      # If it failed, the variable was not from the command line. Ignore it,
22333      # but warn the user (except for BASH, which is always set by the calling BASH).
22334      if test "xDTRACE" != xBASH; then
22335        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
22336$as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
22337      fi
22338      # Try to locate tool using the code snippet
22339      for ac_prog in dtrace
22340do
22341  # Extract the first word of "$ac_prog", so it can be a program name with args.
22342set dummy $ac_prog; ac_word=$2
22343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22344$as_echo_n "checking for $ac_word... " >&6; }
22345if ${ac_cv_path_DTRACE+:} false; then :
22346  $as_echo_n "(cached) " >&6
22347else
22348  case $DTRACE in
22349  [\\/]* | ?:[\\/]*)
22350  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22351  ;;
22352  *)
22353  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22354for as_dir in $PATH
22355do
22356  IFS=$as_save_IFS
22357  test -z "$as_dir" && as_dir=.
22358    for ac_exec_ext in '' $ac_executable_extensions; do
22359  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22360    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22361    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22362    break 2
22363  fi
22364done
22365  done
22366IFS=$as_save_IFS
22367
22368  ;;
22369esac
22370fi
22371DTRACE=$ac_cv_path_DTRACE
22372if test -n "$DTRACE"; then
22373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22374$as_echo "$DTRACE" >&6; }
22375else
22376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22377$as_echo "no" >&6; }
22378fi
22379
22380
22381  test -n "$DTRACE" && break
22382done
22383
22384    else
22385      # If it succeeded, then it was overridden by the user. We will use it
22386      # for the tool.
22387
22388      # First remove it from the list of overridden variables, so we can test
22389      # for unknown variables in the end.
22390      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22391
22392      # Check if we try to supply an empty value
22393      if test "x$DTRACE" = x; then
22394        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
22395$as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
22396        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22397$as_echo_n "checking for DTRACE... " >&6; }
22398        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22399$as_echo "disabled" >&6; }
22400      else
22401        # Check if the provided tool contains a complete path.
22402        tool_specified="$DTRACE"
22403        tool_basename="${tool_specified##*/}"
22404        if test "x$tool_basename" = "x$tool_specified"; then
22405          # A command without a complete path is provided, search $PATH.
22406          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
22407$as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
22408          # Extract the first word of "$tool_basename", so it can be a program name with args.
22409set dummy $tool_basename; ac_word=$2
22410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22411$as_echo_n "checking for $ac_word... " >&6; }
22412if ${ac_cv_path_DTRACE+:} false; then :
22413  $as_echo_n "(cached) " >&6
22414else
22415  case $DTRACE in
22416  [\\/]* | ?:[\\/]*)
22417  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22418  ;;
22419  *)
22420  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22421for as_dir in $PATH
22422do
22423  IFS=$as_save_IFS
22424  test -z "$as_dir" && as_dir=.
22425    for ac_exec_ext in '' $ac_executable_extensions; do
22426  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22427    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22428    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22429    break 2
22430  fi
22431done
22432  done
22433IFS=$as_save_IFS
22434
22435  ;;
22436esac
22437fi
22438DTRACE=$ac_cv_path_DTRACE
22439if test -n "$DTRACE"; then
22440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22441$as_echo "$DTRACE" >&6; }
22442else
22443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22444$as_echo "no" >&6; }
22445fi
22446
22447
22448          if test "x$DTRACE" = x; then
22449            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22450          fi
22451        else
22452          # Otherwise we believe it is a complete path. Use it as it is.
22453          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
22454$as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
22455          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22456$as_echo_n "checking for DTRACE... " >&6; }
22457          if test ! -x "$tool_specified"; then
22458            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22459$as_echo "not found" >&6; }
22460            as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
22461          fi
22462          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22463$as_echo "$tool_specified" >&6; }
22464        fi
22465      fi
22466    fi
22467
22468  fi
22469
22470
22471
22472
22473  # Publish this variable in the help.
22474
22475
22476  if [ -z "${PATCH+x}" ]; then
22477    # The variable is not set by user, try to locate tool using the code snippet
22478    for ac_prog in gpatch patch
22479do
22480  # Extract the first word of "$ac_prog", so it can be a program name with args.
22481set dummy $ac_prog; ac_word=$2
22482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22483$as_echo_n "checking for $ac_word... " >&6; }
22484if ${ac_cv_path_PATCH+:} false; then :
22485  $as_echo_n "(cached) " >&6
22486else
22487  case $PATCH in
22488  [\\/]* | ?:[\\/]*)
22489  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22490  ;;
22491  *)
22492  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22493for as_dir in $PATH
22494do
22495  IFS=$as_save_IFS
22496  test -z "$as_dir" && as_dir=.
22497    for ac_exec_ext in '' $ac_executable_extensions; do
22498  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22499    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22500    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22501    break 2
22502  fi
22503done
22504  done
22505IFS=$as_save_IFS
22506
22507  ;;
22508esac
22509fi
22510PATCH=$ac_cv_path_PATCH
22511if test -n "$PATCH"; then
22512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22513$as_echo "$PATCH" >&6; }
22514else
22515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22516$as_echo "no" >&6; }
22517fi
22518
22519
22520  test -n "$PATCH" && break
22521done
22522
22523  else
22524    # The variable is set, but is it from the command line or the environment?
22525
22526    # Try to remove the string !PATCH! from our list.
22527    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
22528    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22529      # If it failed, the variable was not from the command line. Ignore it,
22530      # but warn the user (except for BASH, which is always set by the calling BASH).
22531      if test "xPATCH" != xBASH; then
22532        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
22533$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
22534      fi
22535      # Try to locate tool using the code snippet
22536      for ac_prog in gpatch patch
22537do
22538  # Extract the first word of "$ac_prog", so it can be a program name with args.
22539set dummy $ac_prog; ac_word=$2
22540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22541$as_echo_n "checking for $ac_word... " >&6; }
22542if ${ac_cv_path_PATCH+:} false; then :
22543  $as_echo_n "(cached) " >&6
22544else
22545  case $PATCH in
22546  [\\/]* | ?:[\\/]*)
22547  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22548  ;;
22549  *)
22550  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22551for as_dir in $PATH
22552do
22553  IFS=$as_save_IFS
22554  test -z "$as_dir" && as_dir=.
22555    for ac_exec_ext in '' $ac_executable_extensions; do
22556  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22557    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22558    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22559    break 2
22560  fi
22561done
22562  done
22563IFS=$as_save_IFS
22564
22565  ;;
22566esac
22567fi
22568PATCH=$ac_cv_path_PATCH
22569if test -n "$PATCH"; then
22570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22571$as_echo "$PATCH" >&6; }
22572else
22573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22574$as_echo "no" >&6; }
22575fi
22576
22577
22578  test -n "$PATCH" && break
22579done
22580
22581    else
22582      # If it succeeded, then it was overridden by the user. We will use it
22583      # for the tool.
22584
22585      # First remove it from the list of overridden variables, so we can test
22586      # for unknown variables in the end.
22587      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22588
22589      # Check if we try to supply an empty value
22590      if test "x$PATCH" = x; then
22591        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
22592$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
22593        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
22594$as_echo_n "checking for PATCH... " >&6; }
22595        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22596$as_echo "disabled" >&6; }
22597      else
22598        # Check if the provided tool contains a complete path.
22599        tool_specified="$PATCH"
22600        tool_basename="${tool_specified##*/}"
22601        if test "x$tool_basename" = "x$tool_specified"; then
22602          # A command without a complete path is provided, search $PATH.
22603          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
22604$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
22605          # Extract the first word of "$tool_basename", so it can be a program name with args.
22606set dummy $tool_basename; ac_word=$2
22607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22608$as_echo_n "checking for $ac_word... " >&6; }
22609if ${ac_cv_path_PATCH+:} false; then :
22610  $as_echo_n "(cached) " >&6
22611else
22612  case $PATCH in
22613  [\\/]* | ?:[\\/]*)
22614  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22615  ;;
22616  *)
22617  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22618for as_dir in $PATH
22619do
22620  IFS=$as_save_IFS
22621  test -z "$as_dir" && as_dir=.
22622    for ac_exec_ext in '' $ac_executable_extensions; do
22623  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22624    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22625    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22626    break 2
22627  fi
22628done
22629  done
22630IFS=$as_save_IFS
22631
22632  ;;
22633esac
22634fi
22635PATCH=$ac_cv_path_PATCH
22636if test -n "$PATCH"; then
22637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22638$as_echo "$PATCH" >&6; }
22639else
22640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22641$as_echo "no" >&6; }
22642fi
22643
22644
22645          if test "x$PATCH" = x; then
22646            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22647          fi
22648        else
22649          # Otherwise we believe it is a complete path. Use it as it is.
22650          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
22651$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
22652          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
22653$as_echo_n "checking for PATCH... " >&6; }
22654          if test ! -x "$tool_specified"; then
22655            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22656$as_echo "not found" >&6; }
22657            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
22658          fi
22659          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22660$as_echo "$tool_specified" >&6; }
22661        fi
22662      fi
22663    fi
22664
22665  fi
22666
22667
22668  # Check if it's GNU time
22669  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
22670  if test "x$IS_GNU_TIME" != x; then
22671    IS_GNU_TIME=yes
22672  else
22673    IS_GNU_TIME=no
22674  fi
22675
22676
22677  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
22678
22679
22680
22681  # Publish this variable in the help.
22682
22683
22684  if [ -z "${DSYMUTIL+x}" ]; then
22685    # The variable is not set by user, try to locate tool using the code snippet
22686    for ac_prog in dsymutil
22687do
22688  # Extract the first word of "$ac_prog", so it can be a program name with args.
22689set dummy $ac_prog; ac_word=$2
22690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22691$as_echo_n "checking for $ac_word... " >&6; }
22692if ${ac_cv_path_DSYMUTIL+:} false; then :
22693  $as_echo_n "(cached) " >&6
22694else
22695  case $DSYMUTIL in
22696  [\\/]* | ?:[\\/]*)
22697  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22698  ;;
22699  *)
22700  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22701for as_dir in $PATH
22702do
22703  IFS=$as_save_IFS
22704  test -z "$as_dir" && as_dir=.
22705    for ac_exec_ext in '' $ac_executable_extensions; do
22706  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22707    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22708    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22709    break 2
22710  fi
22711done
22712  done
22713IFS=$as_save_IFS
22714
22715  ;;
22716esac
22717fi
22718DSYMUTIL=$ac_cv_path_DSYMUTIL
22719if test -n "$DSYMUTIL"; then
22720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22721$as_echo "$DSYMUTIL" >&6; }
22722else
22723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22724$as_echo "no" >&6; }
22725fi
22726
22727
22728  test -n "$DSYMUTIL" && break
22729done
22730
22731  else
22732    # The variable is set, but is it from the command line or the environment?
22733
22734    # Try to remove the string !DSYMUTIL! from our list.
22735    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
22736    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22737      # If it failed, the variable was not from the command line. Ignore it,
22738      # but warn the user (except for BASH, which is always set by the calling BASH).
22739      if test "xDSYMUTIL" != xBASH; then
22740        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
22741$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
22742      fi
22743      # Try to locate tool using the code snippet
22744      for ac_prog in dsymutil
22745do
22746  # Extract the first word of "$ac_prog", so it can be a program name with args.
22747set dummy $ac_prog; ac_word=$2
22748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22749$as_echo_n "checking for $ac_word... " >&6; }
22750if ${ac_cv_path_DSYMUTIL+:} false; then :
22751  $as_echo_n "(cached) " >&6
22752else
22753  case $DSYMUTIL in
22754  [\\/]* | ?:[\\/]*)
22755  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22756  ;;
22757  *)
22758  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22759for as_dir in $PATH
22760do
22761  IFS=$as_save_IFS
22762  test -z "$as_dir" && as_dir=.
22763    for ac_exec_ext in '' $ac_executable_extensions; do
22764  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22765    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22766    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22767    break 2
22768  fi
22769done
22770  done
22771IFS=$as_save_IFS
22772
22773  ;;
22774esac
22775fi
22776DSYMUTIL=$ac_cv_path_DSYMUTIL
22777if test -n "$DSYMUTIL"; then
22778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22779$as_echo "$DSYMUTIL" >&6; }
22780else
22781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22782$as_echo "no" >&6; }
22783fi
22784
22785
22786  test -n "$DSYMUTIL" && break
22787done
22788
22789    else
22790      # If it succeeded, then it was overridden by the user. We will use it
22791      # for the tool.
22792
22793      # First remove it from the list of overridden variables, so we can test
22794      # for unknown variables in the end.
22795      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22796
22797      # Check if we try to supply an empty value
22798      if test "x$DSYMUTIL" = x; then
22799        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
22800$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
22801        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22802$as_echo_n "checking for DSYMUTIL... " >&6; }
22803        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22804$as_echo "disabled" >&6; }
22805      else
22806        # Check if the provided tool contains a complete path.
22807        tool_specified="$DSYMUTIL"
22808        tool_basename="${tool_specified##*/}"
22809        if test "x$tool_basename" = "x$tool_specified"; then
22810          # A command without a complete path is provided, search $PATH.
22811          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
22812$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
22813          # Extract the first word of "$tool_basename", so it can be a program name with args.
22814set dummy $tool_basename; ac_word=$2
22815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22816$as_echo_n "checking for $ac_word... " >&6; }
22817if ${ac_cv_path_DSYMUTIL+:} false; then :
22818  $as_echo_n "(cached) " >&6
22819else
22820  case $DSYMUTIL in
22821  [\\/]* | ?:[\\/]*)
22822  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22823  ;;
22824  *)
22825  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22826for as_dir in $PATH
22827do
22828  IFS=$as_save_IFS
22829  test -z "$as_dir" && as_dir=.
22830    for ac_exec_ext in '' $ac_executable_extensions; do
22831  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22832    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22833    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22834    break 2
22835  fi
22836done
22837  done
22838IFS=$as_save_IFS
22839
22840  ;;
22841esac
22842fi
22843DSYMUTIL=$ac_cv_path_DSYMUTIL
22844if test -n "$DSYMUTIL"; then
22845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22846$as_echo "$DSYMUTIL" >&6; }
22847else
22848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22849$as_echo "no" >&6; }
22850fi
22851
22852
22853          if test "x$DSYMUTIL" = x; then
22854            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22855          fi
22856        else
22857          # Otherwise we believe it is a complete path. Use it as it is.
22858          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
22859$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
22860          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22861$as_echo_n "checking for DSYMUTIL... " >&6; }
22862          if test ! -x "$tool_specified"; then
22863            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22864$as_echo "not found" >&6; }
22865            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
22866          fi
22867          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22868$as_echo "$tool_specified" >&6; }
22869        fi
22870      fi
22871    fi
22872
22873  fi
22874
22875
22876
22877  if test "x$DSYMUTIL" = x; then
22878    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
22879  fi
22880
22881
22882
22883
22884
22885  # Publish this variable in the help.
22886
22887
22888  if [ -z "${XATTR+x}" ]; then
22889    # The variable is not set by user, try to locate tool using the code snippet
22890    for ac_prog in xattr
22891do
22892  # Extract the first word of "$ac_prog", so it can be a program name with args.
22893set dummy $ac_prog; ac_word=$2
22894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22895$as_echo_n "checking for $ac_word... " >&6; }
22896if ${ac_cv_path_XATTR+:} false; then :
22897  $as_echo_n "(cached) " >&6
22898else
22899  case $XATTR in
22900  [\\/]* | ?:[\\/]*)
22901  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22902  ;;
22903  *)
22904  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22905for as_dir in $PATH
22906do
22907  IFS=$as_save_IFS
22908  test -z "$as_dir" && as_dir=.
22909    for ac_exec_ext in '' $ac_executable_extensions; do
22910  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22911    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22912    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22913    break 2
22914  fi
22915done
22916  done
22917IFS=$as_save_IFS
22918
22919  ;;
22920esac
22921fi
22922XATTR=$ac_cv_path_XATTR
22923if test -n "$XATTR"; then
22924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22925$as_echo "$XATTR" >&6; }
22926else
22927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22928$as_echo "no" >&6; }
22929fi
22930
22931
22932  test -n "$XATTR" && break
22933done
22934
22935  else
22936    # The variable is set, but is it from the command line or the environment?
22937
22938    # Try to remove the string !XATTR! from our list.
22939    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
22940    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22941      # If it failed, the variable was not from the command line. Ignore it,
22942      # but warn the user (except for BASH, which is always set by the calling BASH).
22943      if test "xXATTR" != xBASH; then
22944        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
22945$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
22946      fi
22947      # Try to locate tool using the code snippet
22948      for ac_prog in xattr
22949do
22950  # Extract the first word of "$ac_prog", so it can be a program name with args.
22951set dummy $ac_prog; ac_word=$2
22952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22953$as_echo_n "checking for $ac_word... " >&6; }
22954if ${ac_cv_path_XATTR+:} false; then :
22955  $as_echo_n "(cached) " >&6
22956else
22957  case $XATTR in
22958  [\\/]* | ?:[\\/]*)
22959  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22960  ;;
22961  *)
22962  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22963for as_dir in $PATH
22964do
22965  IFS=$as_save_IFS
22966  test -z "$as_dir" && as_dir=.
22967    for ac_exec_ext in '' $ac_executable_extensions; do
22968  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22969    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22970    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22971    break 2
22972  fi
22973done
22974  done
22975IFS=$as_save_IFS
22976
22977  ;;
22978esac
22979fi
22980XATTR=$ac_cv_path_XATTR
22981if test -n "$XATTR"; then
22982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22983$as_echo "$XATTR" >&6; }
22984else
22985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22986$as_echo "no" >&6; }
22987fi
22988
22989
22990  test -n "$XATTR" && break
22991done
22992
22993    else
22994      # If it succeeded, then it was overridden by the user. We will use it
22995      # for the tool.
22996
22997      # First remove it from the list of overridden variables, so we can test
22998      # for unknown variables in the end.
22999      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23000
23001      # Check if we try to supply an empty value
23002      if test "x$XATTR" = x; then
23003        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
23004$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
23005        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23006$as_echo_n "checking for XATTR... " >&6; }
23007        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23008$as_echo "disabled" >&6; }
23009      else
23010        # Check if the provided tool contains a complete path.
23011        tool_specified="$XATTR"
23012        tool_basename="${tool_specified##*/}"
23013        if test "x$tool_basename" = "x$tool_specified"; then
23014          # A command without a complete path is provided, search $PATH.
23015          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
23016$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
23017          # Extract the first word of "$tool_basename", so it can be a program name with args.
23018set dummy $tool_basename; ac_word=$2
23019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23020$as_echo_n "checking for $ac_word... " >&6; }
23021if ${ac_cv_path_XATTR+:} false; then :
23022  $as_echo_n "(cached) " >&6
23023else
23024  case $XATTR in
23025  [\\/]* | ?:[\\/]*)
23026  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23027  ;;
23028  *)
23029  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23030for as_dir in $PATH
23031do
23032  IFS=$as_save_IFS
23033  test -z "$as_dir" && as_dir=.
23034    for ac_exec_ext in '' $ac_executable_extensions; do
23035  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23036    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23037    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23038    break 2
23039  fi
23040done
23041  done
23042IFS=$as_save_IFS
23043
23044  ;;
23045esac
23046fi
23047XATTR=$ac_cv_path_XATTR
23048if test -n "$XATTR"; then
23049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23050$as_echo "$XATTR" >&6; }
23051else
23052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23053$as_echo "no" >&6; }
23054fi
23055
23056
23057          if test "x$XATTR" = x; then
23058            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23059          fi
23060        else
23061          # Otherwise we believe it is a complete path. Use it as it is.
23062          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
23063$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
23064          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23065$as_echo_n "checking for XATTR... " >&6; }
23066          if test ! -x "$tool_specified"; then
23067            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23068$as_echo "not found" >&6; }
23069            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
23070          fi
23071          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23072$as_echo "$tool_specified" >&6; }
23073        fi
23074      fi
23075    fi
23076
23077  fi
23078
23079
23080
23081  if test "x$XATTR" = x; then
23082    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
23083  fi
23084
23085
23086
23087
23088  # Publish this variable in the help.
23089
23090
23091  if [ -z "${CODESIGN+x}" ]; then
23092    # The variable is not set by user, try to locate tool using the code snippet
23093    for ac_prog in codesign
23094do
23095  # Extract the first word of "$ac_prog", so it can be a program name with args.
23096set dummy $ac_prog; ac_word=$2
23097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23098$as_echo_n "checking for $ac_word... " >&6; }
23099if ${ac_cv_path_CODESIGN+:} false; then :
23100  $as_echo_n "(cached) " >&6
23101else
23102  case $CODESIGN in
23103  [\\/]* | ?:[\\/]*)
23104  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23105  ;;
23106  *)
23107  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23108for as_dir in $PATH
23109do
23110  IFS=$as_save_IFS
23111  test -z "$as_dir" && as_dir=.
23112    for ac_exec_ext in '' $ac_executable_extensions; do
23113  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23114    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23115    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23116    break 2
23117  fi
23118done
23119  done
23120IFS=$as_save_IFS
23121
23122  ;;
23123esac
23124fi
23125CODESIGN=$ac_cv_path_CODESIGN
23126if test -n "$CODESIGN"; then
23127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23128$as_echo "$CODESIGN" >&6; }
23129else
23130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23131$as_echo "no" >&6; }
23132fi
23133
23134
23135  test -n "$CODESIGN" && break
23136done
23137
23138  else
23139    # The variable is set, but is it from the command line or the environment?
23140
23141    # Try to remove the string !CODESIGN! from our list.
23142    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
23143    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23144      # If it failed, the variable was not from the command line. Ignore it,
23145      # but warn the user (except for BASH, which is always set by the calling BASH).
23146      if test "xCODESIGN" != xBASH; then
23147        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
23148$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
23149      fi
23150      # Try to locate tool using the code snippet
23151      for ac_prog in codesign
23152do
23153  # Extract the first word of "$ac_prog", so it can be a program name with args.
23154set dummy $ac_prog; ac_word=$2
23155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23156$as_echo_n "checking for $ac_word... " >&6; }
23157if ${ac_cv_path_CODESIGN+:} false; then :
23158  $as_echo_n "(cached) " >&6
23159else
23160  case $CODESIGN in
23161  [\\/]* | ?:[\\/]*)
23162  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23163  ;;
23164  *)
23165  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23166for as_dir in $PATH
23167do
23168  IFS=$as_save_IFS
23169  test -z "$as_dir" && as_dir=.
23170    for ac_exec_ext in '' $ac_executable_extensions; do
23171  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23172    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23173    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23174    break 2
23175  fi
23176done
23177  done
23178IFS=$as_save_IFS
23179
23180  ;;
23181esac
23182fi
23183CODESIGN=$ac_cv_path_CODESIGN
23184if test -n "$CODESIGN"; then
23185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23186$as_echo "$CODESIGN" >&6; }
23187else
23188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23189$as_echo "no" >&6; }
23190fi
23191
23192
23193  test -n "$CODESIGN" && break
23194done
23195
23196    else
23197      # If it succeeded, then it was overridden by the user. We will use it
23198      # for the tool.
23199
23200      # First remove it from the list of overridden variables, so we can test
23201      # for unknown variables in the end.
23202      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23203
23204      # Check if we try to supply an empty value
23205      if test "x$CODESIGN" = x; then
23206        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
23207$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
23208        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23209$as_echo_n "checking for CODESIGN... " >&6; }
23210        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23211$as_echo "disabled" >&6; }
23212      else
23213        # Check if the provided tool contains a complete path.
23214        tool_specified="$CODESIGN"
23215        tool_basename="${tool_specified##*/}"
23216        if test "x$tool_basename" = "x$tool_specified"; then
23217          # A command without a complete path is provided, search $PATH.
23218          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
23219$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
23220          # Extract the first word of "$tool_basename", so it can be a program name with args.
23221set dummy $tool_basename; ac_word=$2
23222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23223$as_echo_n "checking for $ac_word... " >&6; }
23224if ${ac_cv_path_CODESIGN+:} false; then :
23225  $as_echo_n "(cached) " >&6
23226else
23227  case $CODESIGN in
23228  [\\/]* | ?:[\\/]*)
23229  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23230  ;;
23231  *)
23232  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23233for as_dir in $PATH
23234do
23235  IFS=$as_save_IFS
23236  test -z "$as_dir" && as_dir=.
23237    for ac_exec_ext in '' $ac_executable_extensions; do
23238  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23239    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23240    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23241    break 2
23242  fi
23243done
23244  done
23245IFS=$as_save_IFS
23246
23247  ;;
23248esac
23249fi
23250CODESIGN=$ac_cv_path_CODESIGN
23251if test -n "$CODESIGN"; then
23252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23253$as_echo "$CODESIGN" >&6; }
23254else
23255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23256$as_echo "no" >&6; }
23257fi
23258
23259
23260          if test "x$CODESIGN" = x; then
23261            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23262          fi
23263        else
23264          # Otherwise we believe it is a complete path. Use it as it is.
23265          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
23266$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
23267          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23268$as_echo_n "checking for CODESIGN... " >&6; }
23269          if test ! -x "$tool_specified"; then
23270            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23271$as_echo "not found" >&6; }
23272            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
23273          fi
23274          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23275$as_echo "$tool_specified" >&6; }
23276        fi
23277      fi
23278    fi
23279
23280  fi
23281
23282
23283    if test "x$CODESIGN" != "x"; then
23284      # Verify that the openjdk_codesign certificate is present
23285      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
23286$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
23287      rm -f codesign-testfile
23288      touch codesign-testfile
23289      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
23290      rm -f codesign-testfile
23291      if test "x$CODESIGN" = x; then
23292        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23293$as_echo "no" >&6; }
23294      else
23295        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23296$as_echo "yes" >&6; }
23297      fi
23298    fi
23299
23300
23301
23302  # Publish this variable in the help.
23303
23304
23305  if [ -z "${SETFILE+x}" ]; then
23306    # The variable is not set by user, try to locate tool using the code snippet
23307    for ac_prog in SetFile
23308do
23309  # Extract the first word of "$ac_prog", so it can be a program name with args.
23310set dummy $ac_prog; ac_word=$2
23311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23312$as_echo_n "checking for $ac_word... " >&6; }
23313if ${ac_cv_path_SETFILE+:} false; then :
23314  $as_echo_n "(cached) " >&6
23315else
23316  case $SETFILE in
23317  [\\/]* | ?:[\\/]*)
23318  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23319  ;;
23320  *)
23321  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23322for as_dir in $PATH
23323do
23324  IFS=$as_save_IFS
23325  test -z "$as_dir" && as_dir=.
23326    for ac_exec_ext in '' $ac_executable_extensions; do
23327  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23328    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23329    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23330    break 2
23331  fi
23332done
23333  done
23334IFS=$as_save_IFS
23335
23336  ;;
23337esac
23338fi
23339SETFILE=$ac_cv_path_SETFILE
23340if test -n "$SETFILE"; then
23341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23342$as_echo "$SETFILE" >&6; }
23343else
23344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23345$as_echo "no" >&6; }
23346fi
23347
23348
23349  test -n "$SETFILE" && break
23350done
23351
23352  else
23353    # The variable is set, but is it from the command line or the environment?
23354
23355    # Try to remove the string !SETFILE! from our list.
23356    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
23357    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23358      # If it failed, the variable was not from the command line. Ignore it,
23359      # but warn the user (except for BASH, which is always set by the calling BASH).
23360      if test "xSETFILE" != xBASH; then
23361        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
23362$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
23363      fi
23364      # Try to locate tool using the code snippet
23365      for ac_prog in SetFile
23366do
23367  # Extract the first word of "$ac_prog", so it can be a program name with args.
23368set dummy $ac_prog; ac_word=$2
23369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23370$as_echo_n "checking for $ac_word... " >&6; }
23371if ${ac_cv_path_SETFILE+:} false; then :
23372  $as_echo_n "(cached) " >&6
23373else
23374  case $SETFILE in
23375  [\\/]* | ?:[\\/]*)
23376  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23377  ;;
23378  *)
23379  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23380for as_dir in $PATH
23381do
23382  IFS=$as_save_IFS
23383  test -z "$as_dir" && as_dir=.
23384    for ac_exec_ext in '' $ac_executable_extensions; do
23385  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23386    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23387    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23388    break 2
23389  fi
23390done
23391  done
23392IFS=$as_save_IFS
23393
23394  ;;
23395esac
23396fi
23397SETFILE=$ac_cv_path_SETFILE
23398if test -n "$SETFILE"; then
23399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23400$as_echo "$SETFILE" >&6; }
23401else
23402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23403$as_echo "no" >&6; }
23404fi
23405
23406
23407  test -n "$SETFILE" && break
23408done
23409
23410    else
23411      # If it succeeded, then it was overridden by the user. We will use it
23412      # for the tool.
23413
23414      # First remove it from the list of overridden variables, so we can test
23415      # for unknown variables in the end.
23416      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23417
23418      # Check if we try to supply an empty value
23419      if test "x$SETFILE" = x; then
23420        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
23421$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
23422        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23423$as_echo_n "checking for SETFILE... " >&6; }
23424        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23425$as_echo "disabled" >&6; }
23426      else
23427        # Check if the provided tool contains a complete path.
23428        tool_specified="$SETFILE"
23429        tool_basename="${tool_specified##*/}"
23430        if test "x$tool_basename" = "x$tool_specified"; then
23431          # A command without a complete path is provided, search $PATH.
23432          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
23433$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
23434          # Extract the first word of "$tool_basename", so it can be a program name with args.
23435set dummy $tool_basename; ac_word=$2
23436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23437$as_echo_n "checking for $ac_word... " >&6; }
23438if ${ac_cv_path_SETFILE+:} false; then :
23439  $as_echo_n "(cached) " >&6
23440else
23441  case $SETFILE in
23442  [\\/]* | ?:[\\/]*)
23443  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23444  ;;
23445  *)
23446  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23447for as_dir in $PATH
23448do
23449  IFS=$as_save_IFS
23450  test -z "$as_dir" && as_dir=.
23451    for ac_exec_ext in '' $ac_executable_extensions; do
23452  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23453    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23454    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23455    break 2
23456  fi
23457done
23458  done
23459IFS=$as_save_IFS
23460
23461  ;;
23462esac
23463fi
23464SETFILE=$ac_cv_path_SETFILE
23465if test -n "$SETFILE"; then
23466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23467$as_echo "$SETFILE" >&6; }
23468else
23469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23470$as_echo "no" >&6; }
23471fi
23472
23473
23474          if test "x$SETFILE" = x; then
23475            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23476          fi
23477        else
23478          # Otherwise we believe it is a complete path. Use it as it is.
23479          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
23480$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
23481          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23482$as_echo_n "checking for SETFILE... " >&6; }
23483          if test ! -x "$tool_specified"; then
23484            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23485$as_echo "not found" >&6; }
23486            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
23487          fi
23488          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23489$as_echo "$tool_specified" >&6; }
23490        fi
23491      fi
23492    fi
23493
23494  fi
23495
23496
23497
23498  if test "x$SETFILE" = x; then
23499    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
23500  fi
23501
23502
23503  fi
23504
23505
23506  # Test if bash supports pipefail.
23507  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
23508$as_echo_n "checking if bash supports pipefail... " >&6; }
23509  if ${BASH} -c 'set -o pipefail'; then
23510    BASH_ARGS="$BASH_ARGS -o pipefail"
23511    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23512$as_echo "yes" >&6; }
23513  else
23514    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23515$as_echo "no" >&6; }
23516  fi
23517
23518  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
23519$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
23520  if ${BASH} -e -c 'true'; then
23521    BASH_ARGS="$BASH_ARGS -e"
23522    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23523$as_echo "yes" >&6; }
23524  else
23525    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23526$as_echo "no" >&6; }
23527  fi
23528
23529
23530
23531
23532# Check if pkg-config is available.
23533
23534
23535if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
23536	if test -n "$ac_tool_prefix"; then
23537  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
23538set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
23539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23540$as_echo_n "checking for $ac_word... " >&6; }
23541if ${ac_cv_path_PKG_CONFIG+:} false; then :
23542  $as_echo_n "(cached) " >&6
23543else
23544  case $PKG_CONFIG in
23545  [\\/]* | ?:[\\/]*)
23546  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
23547  ;;
23548  *)
23549  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23550for as_dir in $PATH
23551do
23552  IFS=$as_save_IFS
23553  test -z "$as_dir" && as_dir=.
23554    for ac_exec_ext in '' $ac_executable_extensions; do
23555  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23556    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
23557    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23558    break 2
23559  fi
23560done
23561  done
23562IFS=$as_save_IFS
23563
23564  ;;
23565esac
23566fi
23567PKG_CONFIG=$ac_cv_path_PKG_CONFIG
23568if test -n "$PKG_CONFIG"; then
23569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
23570$as_echo "$PKG_CONFIG" >&6; }
23571else
23572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23573$as_echo "no" >&6; }
23574fi
23575
23576
23577fi
23578if test -z "$ac_cv_path_PKG_CONFIG"; then
23579  ac_pt_PKG_CONFIG=$PKG_CONFIG
23580  # Extract the first word of "pkg-config", so it can be a program name with args.
23581set dummy pkg-config; ac_word=$2
23582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23583$as_echo_n "checking for $ac_word... " >&6; }
23584if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
23585  $as_echo_n "(cached) " >&6
23586else
23587  case $ac_pt_PKG_CONFIG in
23588  [\\/]* | ?:[\\/]*)
23589  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
23590  ;;
23591  *)
23592  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23593for as_dir in $PATH
23594do
23595  IFS=$as_save_IFS
23596  test -z "$as_dir" && as_dir=.
23597    for ac_exec_ext in '' $ac_executable_extensions; do
23598  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23599    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
23600    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23601    break 2
23602  fi
23603done
23604  done
23605IFS=$as_save_IFS
23606
23607  ;;
23608esac
23609fi
23610ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
23611if test -n "$ac_pt_PKG_CONFIG"; then
23612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
23613$as_echo "$ac_pt_PKG_CONFIG" >&6; }
23614else
23615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23616$as_echo "no" >&6; }
23617fi
23618
23619  if test "x$ac_pt_PKG_CONFIG" = x; then
23620    PKG_CONFIG=""
23621  else
23622    case $cross_compiling:$ac_tool_warned in
23623yes:)
23624{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
23625$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
23626ac_tool_warned=yes ;;
23627esac
23628    PKG_CONFIG=$ac_pt_PKG_CONFIG
23629  fi
23630else
23631  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
23632fi
23633
23634fi
23635if test -n "$PKG_CONFIG"; then
23636	_pkg_min_version=0.9.0
23637	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
23638$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
23639	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
23640		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23641$as_echo "yes" >&6; }
23642	else
23643		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23644$as_echo "no" >&6; }
23645		PKG_CONFIG=""
23646	fi
23647
23648fi
23649
23650# After basic tools have been setup, we can check build os specific details.
23651
23652  ###############################################################################
23653
23654  # Note that this is the build platform OS version!
23655
23656  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
23657  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
23658  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
23659  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
23660
23661
23662
23663
23664
23665# Misc basic settings
23666
23667
23668# Check whether --with-default-make-target was given.
23669if test "${with_default_make_target+set}" = set; then :
23670  withval=$with_default_make_target;
23671fi
23672
23673  if test "x$with_default_make_target" = "x" \
23674      || test "x$with_default_make_target" = "xyes"; then
23675    DEFAULT_MAKE_TARGET="exploded-image"
23676  elif test "x$with_default_make_target" = "xno"; then
23677    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
23678  else
23679    DEFAULT_MAKE_TARGET="$with_default_make_target"
23680  fi
23681
23682
23683
23684
23685###############################################################################
23686#
23687# Determine OpenJDK variants, options and version numbers.
23688#
23689###############################################################################
23690
23691# We need build & target for this.
23692
23693  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
23694  # We always build headless support.
23695  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
23696$as_echo_n "checking headful support... " >&6; }
23697  # Check whether --enable-headful was given.
23698if test "${enable_headful+set}" = set; then :
23699  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
23700else
23701  SUPPORT_HEADFUL=yes
23702fi
23703
23704
23705  SUPPORT_HEADLESS=yes
23706  BUILD_HEADLESS="BUILD_HEADLESS:=true"
23707
23708  if test "x$SUPPORT_HEADFUL" = xyes; then
23709    # We are building both headful and headless.
23710    headful_msg="include support for both headful and headless"
23711  fi
23712
23713  if test "x$SUPPORT_HEADFUL" = xno; then
23714    # Thus we are building headless only.
23715    BUILD_HEADLESS="BUILD_HEADLESS:=true"
23716    headful_msg="headless only"
23717  fi
23718
23719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
23720$as_echo "$headful_msg" >&6; }
23721
23722
23723
23724
23725
23726  # Choose cacerts source file
23727
23728# Check whether --with-cacerts-file was given.
23729if test "${with_cacerts_file+set}" = set; then :
23730  withval=$with_cacerts_file;
23731fi
23732
23733  if test "x$with_cacerts_file" != x; then
23734    CACERTS_FILE=$with_cacerts_file
23735  fi
23736
23737
23738  # Enable or disable unlimited crypto
23739  # Check whether --enable-unlimited-crypto was given.
23740if test "${enable_unlimited_crypto+set}" = set; then :
23741  enableval=$enable_unlimited_crypto;
23742else
23743  enable_unlimited_crypto=no
23744fi
23745
23746  if test "x$enable_unlimited_crypto" = "xyes"; then
23747    UNLIMITED_CRYPTO=true
23748  else
23749    UNLIMITED_CRYPTO=false
23750  fi
23751
23752
23753  # Should we build the serviceability agent (SA)?
23754  INCLUDE_SA=true
23755  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
23756    INCLUDE_SA=false
23757  fi
23758  if test "x$OPENJDK_TARGET_OS" = xaix ; then
23759    INCLUDE_SA=false
23760  fi
23761  if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
23762    INCLUDE_SA=false
23763  fi
23764
23765
23766  # Compress jars
23767  COMPRESS_JARS=false
23768
23769
23770
23771  # Setup default copyright year. Mostly overridden when building close to a new year.
23772
23773# Check whether --with-copyright-year was given.
23774if test "${with_copyright_year+set}" = set; then :
23775  withval=$with_copyright_year;
23776fi
23777
23778  if test "x$with_copyright_year" = xyes; then
23779    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
23780  elif test "x$with_copyright_year" != x; then
23781    COPYRIGHT_YEAR="$with_copyright_year"
23782  else
23783    COPYRIGHT_YEAR=`date +'%Y'`
23784  fi
23785
23786
23787
23788  # Check whether --enable-keep-packaged-modules was given.
23789if test "${enable_keep_packaged_modules+set}" = set; then :
23790  enableval=$enable_keep_packaged_modules;
23791fi
23792
23793
23794  if test "x$enable_keep_packaged_modules" = "xyes"; then
23795    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
23796$as_echo_n "checking if packaged modules are kept... " >&6; }
23797    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23798$as_echo "yes" >&6; }
23799    JLINK_KEEP_PACKAGED_MODULES=true
23800  elif test "x$enable_keep_packaged_modules" = "xno"; then
23801    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
23802$as_echo_n "checking if packaged modules are kept... " >&6; }
23803    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23804$as_echo "no" >&6; }
23805    JLINK_KEEP_PACKAGED_MODULES=false
23806  elif test "x$enable_keep_packaged_modules" = "x"; then
23807    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
23808$as_echo "yes (default)" >&6; }
23809    JLINK_KEEP_PACKAGED_MODULES=true
23810  else
23811    as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
23812  fi
23813
23814
23815
23816
23817  # Warn user that old version arguments are deprecated.
23818
23819
23820# Check whether --with-milestone was given.
23821if test "${with_milestone+set}" = set; then :
23822  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
23823$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
23824fi
23825
23826
23827
23828
23829# Check whether --with-update-version was given.
23830if test "${with_update_version+set}" = set; then :
23831  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
23832$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
23833fi
23834
23835
23836
23837
23838# Check whether --with-user-release-suffix was given.
23839if test "${with_user_release_suffix+set}" = set; then :
23840  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
23841$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
23842fi
23843
23844
23845
23846
23847# Check whether --with-build-number was given.
23848if test "${with_build_number+set}" = set; then :
23849  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
23850$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
23851fi
23852
23853
23854
23855  # Source the version numbers file
23856  . $AUTOCONF_DIR/version-numbers
23857
23858  # Some non-version number information is set in that file
23859
23860
23861
23862
23863
23864
23865
23866
23867
23868  # Override version from arguments
23869
23870  # If --with-version-string is set, process it first. It is possible to
23871  # override parts with more specific flags, since these are processed later.
23872
23873# Check whether --with-version-string was given.
23874if test "${with_version_string+set}" = set; then :
23875  withval=$with_version_string;
23876fi
23877
23878  if test "x$with_version_string" = xyes; then
23879    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
23880  elif test "x$with_version_string" != x; then
23881    # Additional [] needed to keep m4 from mangling shell constructs.
23882    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
23883      VERSION_MAJOR=${BASH_REMATCH[1]}
23884      VERSION_MINOR=${BASH_REMATCH[3]}
23885      VERSION_SECURITY=${BASH_REMATCH[5]}
23886      VERSION_PATCH=${BASH_REMATCH[7]}
23887      VERSION_PRE=${BASH_REMATCH[9]}
23888      version_plus_separator=${BASH_REMATCH[11]}
23889      VERSION_BUILD=${BASH_REMATCH[12]}
23890      VERSION_OPT=${BASH_REMATCH[14]}
23891      # Unspecified numerical fields are interpreted as 0.
23892      if test "x$VERSION_MINOR" = x; then
23893        VERSION_MINOR=0
23894      fi
23895      if test "x$VERSION_SECURITY" = x; then
23896        VERSION_SECURITY=0
23897      fi
23898      if test "x$VERSION_PATCH" = x; then
23899        VERSION_PATCH=0
23900      fi
23901      if test "x$version_plus_separator" != x \
23902          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
23903        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
23904      fi
23905      # Stop the version part process from setting default values.
23906      # We still allow them to explicitely override though.
23907      NO_DEFAULT_VERSION_PARTS=true
23908    else
23909      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
23910    fi
23911  fi
23912
23913
23914# Check whether --with-version-pre was given.
23915if test "${with_version_pre+set}" = set; then :
23916  withval=$with_version_pre; with_version_pre_present=true
23917else
23918  with_version_pre_present=false
23919fi
23920
23921
23922  if test "x$with_version_pre_present" = xtrue; then
23923    if test "x$with_version_pre" = xyes; then
23924      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
23925    elif test "x$with_version_pre" = xno; then
23926      # Interpret --without-* as empty string instead of the literal "no"
23927      VERSION_PRE=
23928    else
23929      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
23930       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
23931      if test "x$VERSION_PRE" != "x$with_version_pre"; then
23932        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
23933$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
23934      fi
23935    fi
23936  else
23937    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23938      # Default is to use "internal" as pre
23939      VERSION_PRE="internal"
23940    fi
23941  fi
23942
23943
23944# Check whether --with-version-opt was given.
23945if test "${with_version_opt+set}" = set; then :
23946  withval=$with_version_opt; with_version_opt_present=true
23947else
23948  with_version_opt_present=false
23949fi
23950
23951
23952  if test "x$with_version_opt_present" = xtrue; then
23953    if test "x$with_version_opt" = xyes; then
23954      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
23955    elif test "x$with_version_opt" = xno; then
23956      # Interpret --without-* as empty string instead of the literal "no"
23957      VERSION_OPT=
23958    else
23959      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
23960       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
23961      if test "x$VERSION_OPT" != "x$with_version_opt"; then
23962        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
23963$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
23964      fi
23965    fi
23966  else
23967    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23968      # Default is to calculate a string like this <timestamp>.<username>.<base dir name>
23969      timestamp=`$DATE '+%Y-%m-%d-%H%M%S'`
23970      # Outer [ ] to quote m4.
23971       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
23972      VERSION_OPT="$timestamp.$USERNAME.$basedirname"
23973    fi
23974  fi
23975
23976
23977# Check whether --with-version-build was given.
23978if test "${with_version_build+set}" = set; then :
23979  withval=$with_version_build; with_version_build_present=true
23980else
23981  with_version_build_present=false
23982fi
23983
23984
23985  if test "x$with_version_build_present" = xtrue; then
23986    if test "x$with_version_build" = xyes; then
23987      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
23988    elif test "x$with_version_build" = xno; then
23989      # Interpret --without-* as empty string instead of the literal "no"
23990      VERSION_BUILD=
23991    elif test "x$with_version_build" = x; then
23992      VERSION_BUILD=
23993    else
23994
23995  # Additional [] needed to keep m4 from mangling shell constructs.
23996  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23997    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
23998  fi
23999  # Extract the version number without leading zeros.
24000  cleaned_value=${BASH_REMATCH[1]}
24001  if test "x$cleaned_value" = x; then
24002    # Special case for zero
24003    cleaned_value=${BASH_REMATCH[2]}
24004  fi
24005
24006  if test $cleaned_value -gt 255; then
24007    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
24008  fi
24009  if test "x$cleaned_value" != "x$with_version_build"; then
24010    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
24011$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
24012  fi
24013  VERSION_BUILD=$cleaned_value
24014
24015    fi
24016  else
24017    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24018      # Default is to not have a build number.
24019      VERSION_BUILD=""
24020      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
24021      VERSION_BUILD=0
24022    fi
24023  fi
24024
24025
24026# Check whether --with-version-major was given.
24027if test "${with_version_major+set}" = set; then :
24028  withval=$with_version_major; with_version_major_present=true
24029else
24030  with_version_major_present=false
24031fi
24032
24033
24034  if test "x$with_version_major_present" = xtrue; then
24035    if test "x$with_version_major" = xyes; then
24036      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
24037    else
24038
24039  # Additional [] needed to keep m4 from mangling shell constructs.
24040  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24041    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
24042  fi
24043  # Extract the version number without leading zeros.
24044  cleaned_value=${BASH_REMATCH[1]}
24045  if test "x$cleaned_value" = x; then
24046    # Special case for zero
24047    cleaned_value=${BASH_REMATCH[2]}
24048  fi
24049
24050  if test $cleaned_value -gt 255; then
24051    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
24052  fi
24053  if test "x$cleaned_value" != "x$with_version_major"; then
24054    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
24055$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
24056  fi
24057  VERSION_MAJOR=$cleaned_value
24058
24059    fi
24060  else
24061    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24062      # Default is to get value from version-numbers
24063      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
24064    fi
24065  fi
24066
24067
24068# Check whether --with-version-minor was given.
24069if test "${with_version_minor+set}" = set; then :
24070  withval=$with_version_minor; with_version_minor_present=true
24071else
24072  with_version_minor_present=false
24073fi
24074
24075
24076  if test "x$with_version_minor_present" = xtrue; then
24077    if test "x$with_version_minor" = xyes; then
24078      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
24079    elif test "x$with_version_minor" = xno; then
24080      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24081      VERSION_MINOR=0
24082    elif test "x$with_version_minor" = x; then
24083      VERSION_MINOR=0
24084    else
24085
24086  # Additional [] needed to keep m4 from mangling shell constructs.
24087  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24088    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
24089  fi
24090  # Extract the version number without leading zeros.
24091  cleaned_value=${BASH_REMATCH[1]}
24092  if test "x$cleaned_value" = x; then
24093    # Special case for zero
24094    cleaned_value=${BASH_REMATCH[2]}
24095  fi
24096
24097  if test $cleaned_value -gt 255; then
24098    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
24099  fi
24100  if test "x$cleaned_value" != "x$with_version_minor"; then
24101    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
24102$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
24103  fi
24104  VERSION_MINOR=$cleaned_value
24105
24106    fi
24107  else
24108    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24109      # Default is 0, if unspecified
24110      VERSION_MINOR=0
24111    fi
24112  fi
24113
24114
24115# Check whether --with-version-security was given.
24116if test "${with_version_security+set}" = set; then :
24117  withval=$with_version_security; with_version_security_present=true
24118else
24119  with_version_security_present=false
24120fi
24121
24122
24123  if test "x$with_version_security_present" = xtrue; then
24124    if test "x$with_version_security" = xyes; then
24125      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
24126    elif test "x$with_version_security" = xno; then
24127      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24128      VERSION_SECURITY=0
24129    elif test "x$with_version_security" = x; then
24130      VERSION_SECURITY=0
24131    else
24132
24133  # Additional [] needed to keep m4 from mangling shell constructs.
24134  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24135    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
24136  fi
24137  # Extract the version number without leading zeros.
24138  cleaned_value=${BASH_REMATCH[1]}
24139  if test "x$cleaned_value" = x; then
24140    # Special case for zero
24141    cleaned_value=${BASH_REMATCH[2]}
24142  fi
24143
24144  if test $cleaned_value -gt 255; then
24145    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
24146  fi
24147  if test "x$cleaned_value" != "x$with_version_security"; then
24148    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
24149$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
24150  fi
24151  VERSION_SECURITY=$cleaned_value
24152
24153    fi
24154  else
24155    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24156      # Default is 0, if unspecified
24157      VERSION_SECURITY=0
24158    fi
24159  fi
24160
24161
24162# Check whether --with-version-patch was given.
24163if test "${with_version_patch+set}" = set; then :
24164  withval=$with_version_patch; with_version_patch_present=true
24165else
24166  with_version_patch_present=false
24167fi
24168
24169
24170  if test "x$with_version_patch_present" = xtrue; then
24171    if test "x$with_version_patch" = xyes; then
24172      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
24173    elif test "x$with_version_patch" = xno; then
24174      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24175      VERSION_PATCH=0
24176    elif test "x$with_version_patch" = x; then
24177      VERSION_PATCH=0
24178    else
24179
24180  # Additional [] needed to keep m4 from mangling shell constructs.
24181  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24182    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
24183  fi
24184  # Extract the version number without leading zeros.
24185  cleaned_value=${BASH_REMATCH[1]}
24186  if test "x$cleaned_value" = x; then
24187    # Special case for zero
24188    cleaned_value=${BASH_REMATCH[2]}
24189  fi
24190
24191  if test $cleaned_value -gt 255; then
24192    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
24193  fi
24194  if test "x$cleaned_value" != "x$with_version_patch"; then
24195    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
24196$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
24197  fi
24198  VERSION_PATCH=$cleaned_value
24199
24200    fi
24201  else
24202    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24203      # Default is 0, if unspecified
24204      VERSION_PATCH=0
24205    fi
24206  fi
24207
24208  # Calculate derived version properties
24209
24210  # Set VERSION_IS_GA based on if VERSION_PRE has a value
24211  if test "x$VERSION_PRE" = x; then
24212    VERSION_IS_GA=true
24213  else
24214    VERSION_IS_GA=false
24215  fi
24216
24217  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
24218  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
24219
24220  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
24221  # Strip trailing zeroes from stripped_version_number
24222  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
24223  VERSION_NUMBER=$stripped_version_number
24224
24225  # The complete version string, with additional build information
24226  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
24227    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24228  else
24229    # If either build or opt is set, we need a + separator
24230    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
24231  fi
24232
24233  # The short version string, just VERSION_NUMBER and PRE, if present.
24234  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24235
24236  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
24237$as_echo_n "checking for version string... " >&6; }
24238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
24239$as_echo "$VERSION_STRING" >&6; }
24240
24241
24242
24243
24244
24245
24246
24247
24248
24249
24250
24251
24252
24253
24254
24255###############################################################################
24256#
24257# Setup BootJDK, used to bootstrap the build.
24258#
24259###############################################################################
24260
24261
24262  BOOT_JDK_FOUND=no
24263
24264# Check whether --with-boot-jdk was given.
24265if test "${with_boot_jdk+set}" = set; then :
24266  withval=$with_boot_jdk;
24267fi
24268
24269
24270  # We look for the Boot JDK through various means, going from more certain to
24271  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
24272  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
24273  # must check if this is indeed valid; otherwise we'll continue looking.
24274
24275  # Test: Is bootjdk explicitely set by command line arguments?
24276
24277  if test "x$BOOT_JDK_FOUND" = xno; then
24278    # Now execute the test
24279
24280  if test "x$with_boot_jdk" != x; then
24281    BOOT_JDK=$with_boot_jdk
24282    BOOT_JDK_FOUND=maybe
24283    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
24284$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
24285  fi
24286
24287
24288    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24289    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24290      # Do we have a bin/java?
24291      if test ! -x "$BOOT_JDK/bin/java"; then
24292        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24293$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24294        BOOT_JDK_FOUND=no
24295      else
24296        # Do we have a bin/javac?
24297        if test ! -x "$BOOT_JDK/bin/javac"; then
24298          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24299$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24300          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24301$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24302          BOOT_JDK_FOUND=no
24303        else
24304          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24305          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24306
24307          # Extra M4 quote needed to protect [] in grep expression.
24308          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24309          if test "x$FOUND_CORRECT_VERSION" = x; then
24310            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24311$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24312            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24313$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24314            BOOT_JDK_FOUND=no
24315          else
24316            # We're done! :-)
24317            BOOT_JDK_FOUND=yes
24318
24319  # Only process if variable expands to non-empty
24320
24321  if test "x$BOOT_JDK" != x; then
24322    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24323
24324  # Input might be given as Windows format, start by converting to
24325  # unix format.
24326  path="$BOOT_JDK"
24327  new_path=`$CYGPATH -u "$path"`
24328
24329  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24330  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24331  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24332  # "foo.exe" is OK but "foo" is an error.
24333  #
24334  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24335  # It is also a way to make sure we got the proper file name for the real test later on.
24336  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24337  if test "x$test_shortpath" = x; then
24338    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24339$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24340    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24341  fi
24342
24343  # Call helper function which possibly converts this using DOS-style short mode.
24344  # If so, the updated path is stored in $new_path.
24345
24346  input_path="$new_path"
24347  # Check if we need to convert this using DOS-style short mode. If the path
24348  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24349  # take no chances and rewrite it.
24350  # Note: m4 eats our [], so we need to use [ and ] instead.
24351  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24352  if test "x$has_forbidden_chars" != x; then
24353    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24354    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24355    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24356    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24357      # Going to short mode and back again did indeed matter. Since short mode is
24358      # case insensitive, let's make it lowercase to improve readability.
24359      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24360      # Now convert it back to Unix-style (cygpath)
24361      input_path=`$CYGPATH -u "$shortmode_path"`
24362      new_path="$input_path"
24363    fi
24364  fi
24365
24366  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24367  if test "x$test_cygdrive_prefix" = x; then
24368    # As a simple fix, exclude /usr/bin since it's not a real path.
24369    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24370      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24371      # a path prefixed by /cygdrive for fixpath to work.
24372      new_path="$CYGWIN_ROOT_PATH$input_path"
24373    fi
24374  fi
24375
24376
24377  if test "x$path" != "x$new_path"; then
24378    BOOT_JDK="$new_path"
24379    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24380$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24381  fi
24382
24383    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24384
24385  path="$BOOT_JDK"
24386  has_colon=`$ECHO $path | $GREP ^.:`
24387  new_path="$path"
24388  if test "x$has_colon" = x; then
24389    # Not in mixed or Windows style, start by that.
24390    new_path=`cmd //c echo $path`
24391  fi
24392
24393
24394  input_path="$new_path"
24395  # Check if we need to convert this using DOS-style short mode. If the path
24396  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24397  # take no chances and rewrite it.
24398  # Note: m4 eats our [], so we need to use [ and ] instead.
24399  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24400  if test "x$has_forbidden_chars" != x; then
24401    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24402    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24403  fi
24404
24405
24406  windows_path="$new_path"
24407  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24408    unix_path=`$CYGPATH -u "$windows_path"`
24409    new_path="$unix_path"
24410  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24411    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24412    new_path="$unix_path"
24413  fi
24414
24415  if test "x$path" != "x$new_path"; then
24416    BOOT_JDK="$new_path"
24417    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24418$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24419  fi
24420
24421  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24422  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24423
24424    else
24425      # We're on a unix platform. Hooray! :)
24426      path="$BOOT_JDK"
24427      has_space=`$ECHO "$path" | $GREP " "`
24428      if test "x$has_space" != x; then
24429        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24430$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24431        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24432      fi
24433
24434      # Use eval to expand a potential ~
24435      eval path="$path"
24436      if test ! -f "$path" && test ! -d "$path"; then
24437        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24438      fi
24439
24440      if test -d "$path"; then
24441        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24442      else
24443        dir="`$DIRNAME "$path"`"
24444        base="`$BASENAME "$path"`"
24445        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24446      fi
24447    fi
24448  fi
24449
24450            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24451$as_echo_n "checking for Boot JDK... " >&6; }
24452            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24453$as_echo "$BOOT_JDK" >&6; }
24454            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24455$as_echo_n "checking Boot JDK version... " >&6; }
24456            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24457            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24458$as_echo "$BOOT_JDK_VERSION" >&6; }
24459          fi # end check jdk version
24460        fi # end check javac
24461      fi # end check java
24462    fi # end check boot jdk found
24463  fi
24464
24465  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
24466    # Having specified an argument which is incorrect will produce an instant failure;
24467    # we should not go on looking
24468    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
24469  fi
24470
24471  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
24472
24473  if test "x$BOOT_JDK_FOUND" = xno; then
24474    # Now execute the test
24475
24476  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
24477    # First check at user selected default
24478
24479  if test "x$BOOT_JDK_FOUND" = xno; then
24480    # Now execute the test
24481
24482  if test -x /usr/libexec/java_home; then
24483    BOOT_JDK=`/usr/libexec/java_home `
24484    BOOT_JDK_FOUND=maybe
24485    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
24486$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
24487  fi
24488
24489
24490    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24491    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24492      # Do we have a bin/java?
24493      if test ! -x "$BOOT_JDK/bin/java"; then
24494        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24495$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24496        BOOT_JDK_FOUND=no
24497      else
24498        # Do we have a bin/javac?
24499        if test ! -x "$BOOT_JDK/bin/javac"; then
24500          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24501$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24502          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24503$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24504          BOOT_JDK_FOUND=no
24505        else
24506          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24507          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24508
24509          # Extra M4 quote needed to protect [] in grep expression.
24510          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24511          if test "x$FOUND_CORRECT_VERSION" = x; then
24512            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24513$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24514            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24515$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24516            BOOT_JDK_FOUND=no
24517          else
24518            # We're done! :-)
24519            BOOT_JDK_FOUND=yes
24520
24521  # Only process if variable expands to non-empty
24522
24523  if test "x$BOOT_JDK" != x; then
24524    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24525
24526  # Input might be given as Windows format, start by converting to
24527  # unix format.
24528  path="$BOOT_JDK"
24529  new_path=`$CYGPATH -u "$path"`
24530
24531  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24532  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24533  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24534  # "foo.exe" is OK but "foo" is an error.
24535  #
24536  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24537  # It is also a way to make sure we got the proper file name for the real test later on.
24538  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24539  if test "x$test_shortpath" = x; then
24540    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24541$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24542    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24543  fi
24544
24545  # Call helper function which possibly converts this using DOS-style short mode.
24546  # If so, the updated path is stored in $new_path.
24547
24548  input_path="$new_path"
24549  # Check if we need to convert this using DOS-style short mode. If the path
24550  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24551  # take no chances and rewrite it.
24552  # Note: m4 eats our [], so we need to use [ and ] instead.
24553  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24554  if test "x$has_forbidden_chars" != x; then
24555    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24556    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24557    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24558    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24559      # Going to short mode and back again did indeed matter. Since short mode is
24560      # case insensitive, let's make it lowercase to improve readability.
24561      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24562      # Now convert it back to Unix-style (cygpath)
24563      input_path=`$CYGPATH -u "$shortmode_path"`
24564      new_path="$input_path"
24565    fi
24566  fi
24567
24568  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24569  if test "x$test_cygdrive_prefix" = x; then
24570    # As a simple fix, exclude /usr/bin since it's not a real path.
24571    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24572      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24573      # a path prefixed by /cygdrive for fixpath to work.
24574      new_path="$CYGWIN_ROOT_PATH$input_path"
24575    fi
24576  fi
24577
24578
24579  if test "x$path" != "x$new_path"; then
24580    BOOT_JDK="$new_path"
24581    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24582$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24583  fi
24584
24585    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24586
24587  path="$BOOT_JDK"
24588  has_colon=`$ECHO $path | $GREP ^.:`
24589  new_path="$path"
24590  if test "x$has_colon" = x; then
24591    # Not in mixed or Windows style, start by that.
24592    new_path=`cmd //c echo $path`
24593  fi
24594
24595
24596  input_path="$new_path"
24597  # Check if we need to convert this using DOS-style short mode. If the path
24598  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24599  # take no chances and rewrite it.
24600  # Note: m4 eats our [], so we need to use [ and ] instead.
24601  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24602  if test "x$has_forbidden_chars" != x; then
24603    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24604    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24605  fi
24606
24607
24608  windows_path="$new_path"
24609  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24610    unix_path=`$CYGPATH -u "$windows_path"`
24611    new_path="$unix_path"
24612  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24613    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24614    new_path="$unix_path"
24615  fi
24616
24617  if test "x$path" != "x$new_path"; then
24618    BOOT_JDK="$new_path"
24619    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24620$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24621  fi
24622
24623  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24624  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24625
24626    else
24627      # We're on a unix platform. Hooray! :)
24628      path="$BOOT_JDK"
24629      has_space=`$ECHO "$path" | $GREP " "`
24630      if test "x$has_space" != x; then
24631        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24632$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24633        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24634      fi
24635
24636      # Use eval to expand a potential ~
24637      eval path="$path"
24638      if test ! -f "$path" && test ! -d "$path"; then
24639        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24640      fi
24641
24642      if test -d "$path"; then
24643        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24644      else
24645        dir="`$DIRNAME "$path"`"
24646        base="`$BASENAME "$path"`"
24647        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24648      fi
24649    fi
24650  fi
24651
24652            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24653$as_echo_n "checking for Boot JDK... " >&6; }
24654            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24655$as_echo "$BOOT_JDK" >&6; }
24656            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24657$as_echo_n "checking Boot JDK version... " >&6; }
24658            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24659            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24660$as_echo "$BOOT_JDK_VERSION" >&6; }
24661          fi # end check jdk version
24662        fi # end check javac
24663      fi # end check java
24664    fi # end check boot jdk found
24665  fi
24666
24667    # If that did not work out (e.g. too old), try explicit versions instead
24668
24669  if test "x$BOOT_JDK_FOUND" = xno; then
24670    # Now execute the test
24671
24672  if test -x /usr/libexec/java_home; then
24673    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
24674    BOOT_JDK_FOUND=maybe
24675    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
24676$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
24677  fi
24678
24679
24680    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24681    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24682      # Do we have a bin/java?
24683      if test ! -x "$BOOT_JDK/bin/java"; then
24684        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24685$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24686        BOOT_JDK_FOUND=no
24687      else
24688        # Do we have a bin/javac?
24689        if test ! -x "$BOOT_JDK/bin/javac"; then
24690          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24691$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24692          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24693$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24694          BOOT_JDK_FOUND=no
24695        else
24696          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24697          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24698
24699          # Extra M4 quote needed to protect [] in grep expression.
24700          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24701          if test "x$FOUND_CORRECT_VERSION" = x; then
24702            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24703$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24704            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24705$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24706            BOOT_JDK_FOUND=no
24707          else
24708            # We're done! :-)
24709            BOOT_JDK_FOUND=yes
24710
24711  # Only process if variable expands to non-empty
24712
24713  if test "x$BOOT_JDK" != x; then
24714    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24715
24716  # Input might be given as Windows format, start by converting to
24717  # unix format.
24718  path="$BOOT_JDK"
24719  new_path=`$CYGPATH -u "$path"`
24720
24721  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24722  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24723  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24724  # "foo.exe" is OK but "foo" is an error.
24725  #
24726  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24727  # It is also a way to make sure we got the proper file name for the real test later on.
24728  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24729  if test "x$test_shortpath" = x; then
24730    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24731$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24732    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24733  fi
24734
24735  # Call helper function which possibly converts this using DOS-style short mode.
24736  # If so, the updated path is stored in $new_path.
24737
24738  input_path="$new_path"
24739  # Check if we need to convert this using DOS-style short mode. If the path
24740  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24741  # take no chances and rewrite it.
24742  # Note: m4 eats our [], so we need to use [ and ] instead.
24743  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24744  if test "x$has_forbidden_chars" != x; then
24745    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24746    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24747    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24748    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24749      # Going to short mode and back again did indeed matter. Since short mode is
24750      # case insensitive, let's make it lowercase to improve readability.
24751      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24752      # Now convert it back to Unix-style (cygpath)
24753      input_path=`$CYGPATH -u "$shortmode_path"`
24754      new_path="$input_path"
24755    fi
24756  fi
24757
24758  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24759  if test "x$test_cygdrive_prefix" = x; then
24760    # As a simple fix, exclude /usr/bin since it's not a real path.
24761    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24762      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24763      # a path prefixed by /cygdrive for fixpath to work.
24764      new_path="$CYGWIN_ROOT_PATH$input_path"
24765    fi
24766  fi
24767
24768
24769  if test "x$path" != "x$new_path"; then
24770    BOOT_JDK="$new_path"
24771    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24772$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24773  fi
24774
24775    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24776
24777  path="$BOOT_JDK"
24778  has_colon=`$ECHO $path | $GREP ^.:`
24779  new_path="$path"
24780  if test "x$has_colon" = x; then
24781    # Not in mixed or Windows style, start by that.
24782    new_path=`cmd //c echo $path`
24783  fi
24784
24785
24786  input_path="$new_path"
24787  # Check if we need to convert this using DOS-style short mode. If the path
24788  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24789  # take no chances and rewrite it.
24790  # Note: m4 eats our [], so we need to use [ and ] instead.
24791  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24792  if test "x$has_forbidden_chars" != x; then
24793    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24794    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24795  fi
24796
24797
24798  windows_path="$new_path"
24799  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24800    unix_path=`$CYGPATH -u "$windows_path"`
24801    new_path="$unix_path"
24802  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24803    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24804    new_path="$unix_path"
24805  fi
24806
24807  if test "x$path" != "x$new_path"; then
24808    BOOT_JDK="$new_path"
24809    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24810$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24811  fi
24812
24813  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24814  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24815
24816    else
24817      # We're on a unix platform. Hooray! :)
24818      path="$BOOT_JDK"
24819      has_space=`$ECHO "$path" | $GREP " "`
24820      if test "x$has_space" != x; then
24821        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24822$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24823        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24824      fi
24825
24826      # Use eval to expand a potential ~
24827      eval path="$path"
24828      if test ! -f "$path" && test ! -d "$path"; then
24829        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24830      fi
24831
24832      if test -d "$path"; then
24833        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24834      else
24835        dir="`$DIRNAME "$path"`"
24836        base="`$BASENAME "$path"`"
24837        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24838      fi
24839    fi
24840  fi
24841
24842            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24843$as_echo_n "checking for Boot JDK... " >&6; }
24844            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24845$as_echo "$BOOT_JDK" >&6; }
24846            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24847$as_echo_n "checking Boot JDK version... " >&6; }
24848            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24849            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24850$as_echo "$BOOT_JDK_VERSION" >&6; }
24851          fi # end check jdk version
24852        fi # end check javac
24853      fi # end check java
24854    fi # end check boot jdk found
24855  fi
24856
24857
24858  if test "x$BOOT_JDK_FOUND" = xno; then
24859    # Now execute the test
24860
24861  if test -x /usr/libexec/java_home; then
24862    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
24863    BOOT_JDK_FOUND=maybe
24864    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
24865$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
24866  fi
24867
24868
24869    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24870    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24871      # Do we have a bin/java?
24872      if test ! -x "$BOOT_JDK/bin/java"; then
24873        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24874$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24875        BOOT_JDK_FOUND=no
24876      else
24877        # Do we have a bin/javac?
24878        if test ! -x "$BOOT_JDK/bin/javac"; then
24879          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24880$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24881          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24882$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24883          BOOT_JDK_FOUND=no
24884        else
24885          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24886          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24887
24888          # Extra M4 quote needed to protect [] in grep expression.
24889          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24890          if test "x$FOUND_CORRECT_VERSION" = x; then
24891            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24892$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24893            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24894$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24895            BOOT_JDK_FOUND=no
24896          else
24897            # We're done! :-)
24898            BOOT_JDK_FOUND=yes
24899
24900  # Only process if variable expands to non-empty
24901
24902  if test "x$BOOT_JDK" != x; then
24903    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24904
24905  # Input might be given as Windows format, start by converting to
24906  # unix format.
24907  path="$BOOT_JDK"
24908  new_path=`$CYGPATH -u "$path"`
24909
24910  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24911  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24912  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24913  # "foo.exe" is OK but "foo" is an error.
24914  #
24915  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24916  # It is also a way to make sure we got the proper file name for the real test later on.
24917  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24918  if test "x$test_shortpath" = 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 $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24922  fi
24923
24924  # Call helper function which possibly converts this using DOS-style short mode.
24925  # If so, the updated path is stored in $new_path.
24926
24927  input_path="$new_path"
24928  # Check if we need to convert this using DOS-style short mode. If the path
24929  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24930  # take no chances and rewrite it.
24931  # Note: m4 eats our [], so we need to use [ and ] instead.
24932  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24933  if test "x$has_forbidden_chars" != x; then
24934    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24935    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24936    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24937    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24938      # Going to short mode and back again did indeed matter. Since short mode is
24939      # case insensitive, let's make it lowercase to improve readability.
24940      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24941      # Now convert it back to Unix-style (cygpath)
24942      input_path=`$CYGPATH -u "$shortmode_path"`
24943      new_path="$input_path"
24944    fi
24945  fi
24946
24947  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24948  if test "x$test_cygdrive_prefix" = x; then
24949    # As a simple fix, exclude /usr/bin since it's not a real path.
24950    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24951      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24952      # a path prefixed by /cygdrive for fixpath to work.
24953      new_path="$CYGWIN_ROOT_PATH$input_path"
24954    fi
24955  fi
24956
24957
24958  if test "x$path" != "x$new_path"; then
24959    BOOT_JDK="$new_path"
24960    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24961$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24962  fi
24963
24964    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24965
24966  path="$BOOT_JDK"
24967  has_colon=`$ECHO $path | $GREP ^.:`
24968  new_path="$path"
24969  if test "x$has_colon" = x; then
24970    # Not in mixed or Windows style, start by that.
24971    new_path=`cmd //c echo $path`
24972  fi
24973
24974
24975  input_path="$new_path"
24976  # Check if we need to convert this using DOS-style short mode. If the path
24977  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24978  # take no chances and rewrite it.
24979  # Note: m4 eats our [], so we need to use [ and ] instead.
24980  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24981  if test "x$has_forbidden_chars" != x; then
24982    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24983    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24984  fi
24985
24986
24987  windows_path="$new_path"
24988  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24989    unix_path=`$CYGPATH -u "$windows_path"`
24990    new_path="$unix_path"
24991  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24992    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24993    new_path="$unix_path"
24994  fi
24995
24996  if test "x$path" != "x$new_path"; then
24997    BOOT_JDK="$new_path"
24998    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24999$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25000  fi
25001
25002  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25003  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25004
25005    else
25006      # We're on a unix platform. Hooray! :)
25007      path="$BOOT_JDK"
25008      has_space=`$ECHO "$path" | $GREP " "`
25009      if test "x$has_space" != x; then
25010        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25011$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25012        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25013      fi
25014
25015      # Use eval to expand a potential ~
25016      eval path="$path"
25017      if test ! -f "$path" && test ! -d "$path"; then
25018        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25019      fi
25020
25021      if test -d "$path"; then
25022        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25023      else
25024        dir="`$DIRNAME "$path"`"
25025        base="`$BASENAME "$path"`"
25026        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25027      fi
25028    fi
25029  fi
25030
25031            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25032$as_echo_n "checking for Boot JDK... " >&6; }
25033            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25034$as_echo "$BOOT_JDK" >&6; }
25035            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25036$as_echo_n "checking Boot JDK version... " >&6; }
25037            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25038            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25039$as_echo "$BOOT_JDK_VERSION" >&6; }
25040          fi # end check jdk version
25041        fi # end check javac
25042      fi # end check java
25043    fi # end check boot jdk found
25044  fi
25045
25046
25047  if test "x$BOOT_JDK_FOUND" = xno; then
25048    # Now execute the test
25049
25050  if test -x /usr/libexec/java_home; then
25051    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
25052    BOOT_JDK_FOUND=maybe
25053    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
25054$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
25055  fi
25056
25057
25058    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25059    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25060      # Do we have a bin/java?
25061      if test ! -x "$BOOT_JDK/bin/java"; then
25062        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25063$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25064        BOOT_JDK_FOUND=no
25065      else
25066        # Do we have a bin/javac?
25067        if test ! -x "$BOOT_JDK/bin/javac"; then
25068          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25069$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25070          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25071$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25072          BOOT_JDK_FOUND=no
25073        else
25074          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25075          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25076
25077          # Extra M4 quote needed to protect [] in grep expression.
25078          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25079          if test "x$FOUND_CORRECT_VERSION" = x; then
25080            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25081$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25082            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25083$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25084            BOOT_JDK_FOUND=no
25085          else
25086            # We're done! :-)
25087            BOOT_JDK_FOUND=yes
25088
25089  # Only process if variable expands to non-empty
25090
25091  if test "x$BOOT_JDK" != x; then
25092    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25093
25094  # Input might be given as Windows format, start by converting to
25095  # unix format.
25096  path="$BOOT_JDK"
25097  new_path=`$CYGPATH -u "$path"`
25098
25099  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25100  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25101  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25102  # "foo.exe" is OK but "foo" is an error.
25103  #
25104  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25105  # It is also a way to make sure we got the proper file name for the real test later on.
25106  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25107  if test "x$test_shortpath" = x; then
25108    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25109$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25110    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25111  fi
25112
25113  # Call helper function which possibly converts this using DOS-style short mode.
25114  # If so, the updated path is stored in $new_path.
25115
25116  input_path="$new_path"
25117  # Check if we need to convert this using DOS-style short mode. If the path
25118  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25119  # take no chances and rewrite it.
25120  # Note: m4 eats our [], so we need to use [ and ] instead.
25121  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25122  if test "x$has_forbidden_chars" != x; then
25123    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25124    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25125    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25126    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25127      # Going to short mode and back again did indeed matter. Since short mode is
25128      # case insensitive, let's make it lowercase to improve readability.
25129      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25130      # Now convert it back to Unix-style (cygpath)
25131      input_path=`$CYGPATH -u "$shortmode_path"`
25132      new_path="$input_path"
25133    fi
25134  fi
25135
25136  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25137  if test "x$test_cygdrive_prefix" = x; then
25138    # As a simple fix, exclude /usr/bin since it's not a real path.
25139    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25140      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25141      # a path prefixed by /cygdrive for fixpath to work.
25142      new_path="$CYGWIN_ROOT_PATH$input_path"
25143    fi
25144  fi
25145
25146
25147  if test "x$path" != "x$new_path"; then
25148    BOOT_JDK="$new_path"
25149    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25150$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25151  fi
25152
25153    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25154
25155  path="$BOOT_JDK"
25156  has_colon=`$ECHO $path | $GREP ^.:`
25157  new_path="$path"
25158  if test "x$has_colon" = x; then
25159    # Not in mixed or Windows style, start by that.
25160    new_path=`cmd //c echo $path`
25161  fi
25162
25163
25164  input_path="$new_path"
25165  # Check if we need to convert this using DOS-style short mode. If the path
25166  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25167  # take no chances and rewrite it.
25168  # Note: m4 eats our [], so we need to use [ and ] instead.
25169  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25170  if test "x$has_forbidden_chars" != x; then
25171    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25172    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25173  fi
25174
25175
25176  windows_path="$new_path"
25177  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25178    unix_path=`$CYGPATH -u "$windows_path"`
25179    new_path="$unix_path"
25180  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25181    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25182    new_path="$unix_path"
25183  fi
25184
25185  if test "x$path" != "x$new_path"; then
25186    BOOT_JDK="$new_path"
25187    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25188$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25189  fi
25190
25191  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25192  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25193
25194    else
25195      # We're on a unix platform. Hooray! :)
25196      path="$BOOT_JDK"
25197      has_space=`$ECHO "$path" | $GREP " "`
25198      if test "x$has_space" != x; then
25199        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25200$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25201        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25202      fi
25203
25204      # Use eval to expand a potential ~
25205      eval path="$path"
25206      if test ! -f "$path" && test ! -d "$path"; then
25207        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25208      fi
25209
25210      if test -d "$path"; then
25211        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25212      else
25213        dir="`$DIRNAME "$path"`"
25214        base="`$BASENAME "$path"`"
25215        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25216      fi
25217    fi
25218  fi
25219
25220            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25221$as_echo_n "checking for Boot JDK... " >&6; }
25222            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25223$as_echo "$BOOT_JDK" >&6; }
25224            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25225$as_echo_n "checking Boot JDK version... " >&6; }
25226            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25227            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25228$as_echo "$BOOT_JDK_VERSION" >&6; }
25229          fi # end check jdk version
25230        fi # end check javac
25231      fi # end check java
25232    fi # end check boot jdk found
25233  fi
25234
25235  fi
25236
25237
25238    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25239    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25240      # Do we have a bin/java?
25241      if test ! -x "$BOOT_JDK/bin/java"; then
25242        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25243$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25244        BOOT_JDK_FOUND=no
25245      else
25246        # Do we have a bin/javac?
25247        if test ! -x "$BOOT_JDK/bin/javac"; then
25248          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25249$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25250          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25251$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25252          BOOT_JDK_FOUND=no
25253        else
25254          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25255          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25256
25257          # Extra M4 quote needed to protect [] in grep expression.
25258          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25259          if test "x$FOUND_CORRECT_VERSION" = x; then
25260            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25261$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25262            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25263$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25264            BOOT_JDK_FOUND=no
25265          else
25266            # We're done! :-)
25267            BOOT_JDK_FOUND=yes
25268
25269  # Only process if variable expands to non-empty
25270
25271  if test "x$BOOT_JDK" != x; then
25272    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25273
25274  # Input might be given as Windows format, start by converting to
25275  # unix format.
25276  path="$BOOT_JDK"
25277  new_path=`$CYGPATH -u "$path"`
25278
25279  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25280  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25281  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25282  # "foo.exe" is OK but "foo" is an error.
25283  #
25284  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25285  # It is also a way to make sure we got the proper file name for the real test later on.
25286  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25287  if test "x$test_shortpath" = x; then
25288    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25289$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25290    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25291  fi
25292
25293  # Call helper function which possibly converts this using DOS-style short mode.
25294  # If so, the updated path is stored in $new_path.
25295
25296  input_path="$new_path"
25297  # Check if we need to convert this using DOS-style short mode. If the path
25298  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25299  # take no chances and rewrite it.
25300  # Note: m4 eats our [], so we need to use [ and ] instead.
25301  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25302  if test "x$has_forbidden_chars" != x; then
25303    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25304    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25305    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25306    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25307      # Going to short mode and back again did indeed matter. Since short mode is
25308      # case insensitive, let's make it lowercase to improve readability.
25309      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25310      # Now convert it back to Unix-style (cygpath)
25311      input_path=`$CYGPATH -u "$shortmode_path"`
25312      new_path="$input_path"
25313    fi
25314  fi
25315
25316  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25317  if test "x$test_cygdrive_prefix" = x; then
25318    # As a simple fix, exclude /usr/bin since it's not a real path.
25319    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25320      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25321      # a path prefixed by /cygdrive for fixpath to work.
25322      new_path="$CYGWIN_ROOT_PATH$input_path"
25323    fi
25324  fi
25325
25326
25327  if test "x$path" != "x$new_path"; then
25328    BOOT_JDK="$new_path"
25329    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25330$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25331  fi
25332
25333    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25334
25335  path="$BOOT_JDK"
25336  has_colon=`$ECHO $path | $GREP ^.:`
25337  new_path="$path"
25338  if test "x$has_colon" = x; then
25339    # Not in mixed or Windows style, start by that.
25340    new_path=`cmd //c echo $path`
25341  fi
25342
25343
25344  input_path="$new_path"
25345  # Check if we need to convert this using DOS-style short mode. If the path
25346  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25347  # take no chances and rewrite it.
25348  # Note: m4 eats our [], so we need to use [ and ] instead.
25349  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25350  if test "x$has_forbidden_chars" != x; then
25351    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25352    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25353  fi
25354
25355
25356  windows_path="$new_path"
25357  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25358    unix_path=`$CYGPATH -u "$windows_path"`
25359    new_path="$unix_path"
25360  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25361    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25362    new_path="$unix_path"
25363  fi
25364
25365  if test "x$path" != "x$new_path"; then
25366    BOOT_JDK="$new_path"
25367    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25368$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25369  fi
25370
25371  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25372  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25373
25374    else
25375      # We're on a unix platform. Hooray! :)
25376      path="$BOOT_JDK"
25377      has_space=`$ECHO "$path" | $GREP " "`
25378      if test "x$has_space" != x; then
25379        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25380$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25381        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25382      fi
25383
25384      # Use eval to expand a potential ~
25385      eval path="$path"
25386      if test ! -f "$path" && test ! -d "$path"; then
25387        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25388      fi
25389
25390      if test -d "$path"; then
25391        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25392      else
25393        dir="`$DIRNAME "$path"`"
25394        base="`$BASENAME "$path"`"
25395        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25396      fi
25397    fi
25398  fi
25399
25400            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25401$as_echo_n "checking for Boot JDK... " >&6; }
25402            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25403$as_echo "$BOOT_JDK" >&6; }
25404            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25405$as_echo_n "checking Boot JDK version... " >&6; }
25406            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25407            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25408$as_echo "$BOOT_JDK_VERSION" >&6; }
25409          fi # end check jdk version
25410        fi # end check javac
25411      fi # end check java
25412    fi # end check boot jdk found
25413  fi
25414
25415
25416  # Test: Is $JAVA_HOME set?
25417
25418  if test "x$BOOT_JDK_FOUND" = xno; then
25419    # Now execute the test
25420
25421  if test "x$JAVA_HOME" != x; then
25422    JAVA_HOME_PROCESSED="$JAVA_HOME"
25423
25424  # Only process if variable expands to non-empty
25425
25426  if test "x$JAVA_HOME_PROCESSED" != x; then
25427    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25428
25429  # Input might be given as Windows format, start by converting to
25430  # unix format.
25431  path="$JAVA_HOME_PROCESSED"
25432  new_path=`$CYGPATH -u "$path"`
25433
25434  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25435  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25436  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25437  # "foo.exe" is OK but "foo" is an error.
25438  #
25439  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25440  # It is also a way to make sure we got the proper file name for the real test later on.
25441  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25442  if test "x$test_shortpath" = x; then
25443    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
25444$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
25445    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
25446  fi
25447
25448  # Call helper function which possibly converts this using DOS-style short mode.
25449  # If so, the updated path is stored in $new_path.
25450
25451  input_path="$new_path"
25452  # Check if we need to convert this using DOS-style short mode. If the path
25453  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25454  # take no chances and rewrite it.
25455  # Note: m4 eats our [], so we need to use [ and ] instead.
25456  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25457  if test "x$has_forbidden_chars" != x; then
25458    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25459    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25460    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25461    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25462      # Going to short mode and back again did indeed matter. Since short mode is
25463      # case insensitive, let's make it lowercase to improve readability.
25464      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25465      # Now convert it back to Unix-style (cygpath)
25466      input_path=`$CYGPATH -u "$shortmode_path"`
25467      new_path="$input_path"
25468    fi
25469  fi
25470
25471  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25472  if test "x$test_cygdrive_prefix" = x; then
25473    # As a simple fix, exclude /usr/bin since it's not a real path.
25474    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25475      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25476      # a path prefixed by /cygdrive for fixpath to work.
25477      new_path="$CYGWIN_ROOT_PATH$input_path"
25478    fi
25479  fi
25480
25481
25482  if test "x$path" != "x$new_path"; then
25483    JAVA_HOME_PROCESSED="$new_path"
25484    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
25485$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
25486  fi
25487
25488    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25489
25490  path="$JAVA_HOME_PROCESSED"
25491  has_colon=`$ECHO $path | $GREP ^.:`
25492  new_path="$path"
25493  if test "x$has_colon" = x; then
25494    # Not in mixed or Windows style, start by that.
25495    new_path=`cmd //c echo $path`
25496  fi
25497
25498
25499  input_path="$new_path"
25500  # Check if we need to convert this using DOS-style short mode. If the path
25501  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25502  # take no chances and rewrite it.
25503  # Note: m4 eats our [], so we need to use [ and ] instead.
25504  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25505  if test "x$has_forbidden_chars" != x; then
25506    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25507    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25508  fi
25509
25510
25511  windows_path="$new_path"
25512  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25513    unix_path=`$CYGPATH -u "$windows_path"`
25514    new_path="$unix_path"
25515  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25516    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25517    new_path="$unix_path"
25518  fi
25519
25520  if test "x$path" != "x$new_path"; then
25521    JAVA_HOME_PROCESSED="$new_path"
25522    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
25523$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
25524  fi
25525
25526  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25527  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25528
25529    else
25530      # We're on a unix platform. Hooray! :)
25531      path="$JAVA_HOME_PROCESSED"
25532      has_space=`$ECHO "$path" | $GREP " "`
25533      if test "x$has_space" != x; then
25534        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
25535$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
25536        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25537      fi
25538
25539      # Use eval to expand a potential ~
25540      eval path="$path"
25541      if test ! -f "$path" && test ! -d "$path"; then
25542        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
25543      fi
25544
25545      if test -d "$path"; then
25546        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
25547      else
25548        dir="`$DIRNAME "$path"`"
25549        base="`$BASENAME "$path"`"
25550        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
25551      fi
25552    fi
25553  fi
25554
25555    if test ! -d "$JAVA_HOME_PROCESSED"; then
25556      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
25557$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
25558    else
25559      # Aha, the user has set a JAVA_HOME
25560      # let us use that as the Boot JDK.
25561      BOOT_JDK="$JAVA_HOME_PROCESSED"
25562      BOOT_JDK_FOUND=maybe
25563      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
25564$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
25565    fi
25566  fi
25567
25568
25569    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25570    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25571      # Do we have a bin/java?
25572      if test ! -x "$BOOT_JDK/bin/java"; then
25573        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25574$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25575        BOOT_JDK_FOUND=no
25576      else
25577        # Do we have a bin/javac?
25578        if test ! -x "$BOOT_JDK/bin/javac"; then
25579          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25580$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25581          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25582$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25583          BOOT_JDK_FOUND=no
25584        else
25585          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25586          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25587
25588          # Extra M4 quote needed to protect [] in grep expression.
25589          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25590          if test "x$FOUND_CORRECT_VERSION" = x; then
25591            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25592$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25593            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25594$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25595            BOOT_JDK_FOUND=no
25596          else
25597            # We're done! :-)
25598            BOOT_JDK_FOUND=yes
25599
25600  # Only process if variable expands to non-empty
25601
25602  if test "x$BOOT_JDK" != x; then
25603    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25604
25605  # Input might be given as Windows format, start by converting to
25606  # unix format.
25607  path="$BOOT_JDK"
25608  new_path=`$CYGPATH -u "$path"`
25609
25610  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25611  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25612  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25613  # "foo.exe" is OK but "foo" is an error.
25614  #
25615  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25616  # It is also a way to make sure we got the proper file name for the real test later on.
25617  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25618  if test "x$test_shortpath" = x; then
25619    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25620$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25621    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25622  fi
25623
25624  # Call helper function which possibly converts this using DOS-style short mode.
25625  # If so, the updated path is stored in $new_path.
25626
25627  input_path="$new_path"
25628  # Check if we need to convert this using DOS-style short mode. If the path
25629  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25630  # take no chances and rewrite it.
25631  # Note: m4 eats our [], so we need to use [ and ] instead.
25632  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25633  if test "x$has_forbidden_chars" != x; then
25634    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25635    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25636    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25637    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25638      # Going to short mode and back again did indeed matter. Since short mode is
25639      # case insensitive, let's make it lowercase to improve readability.
25640      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25641      # Now convert it back to Unix-style (cygpath)
25642      input_path=`$CYGPATH -u "$shortmode_path"`
25643      new_path="$input_path"
25644    fi
25645  fi
25646
25647  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25648  if test "x$test_cygdrive_prefix" = x; then
25649    # As a simple fix, exclude /usr/bin since it's not a real path.
25650    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25651      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25652      # a path prefixed by /cygdrive for fixpath to work.
25653      new_path="$CYGWIN_ROOT_PATH$input_path"
25654    fi
25655  fi
25656
25657
25658  if test "x$path" != "x$new_path"; then
25659    BOOT_JDK="$new_path"
25660    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25661$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25662  fi
25663
25664    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25665
25666  path="$BOOT_JDK"
25667  has_colon=`$ECHO $path | $GREP ^.:`
25668  new_path="$path"
25669  if test "x$has_colon" = x; then
25670    # Not in mixed or Windows style, start by that.
25671    new_path=`cmd //c echo $path`
25672  fi
25673
25674
25675  input_path="$new_path"
25676  # Check if we need to convert this using DOS-style short mode. If the path
25677  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25678  # take no chances and rewrite it.
25679  # Note: m4 eats our [], so we need to use [ and ] instead.
25680  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25681  if test "x$has_forbidden_chars" != x; then
25682    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25683    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25684  fi
25685
25686
25687  windows_path="$new_path"
25688  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25689    unix_path=`$CYGPATH -u "$windows_path"`
25690    new_path="$unix_path"
25691  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25692    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25693    new_path="$unix_path"
25694  fi
25695
25696  if test "x$path" != "x$new_path"; then
25697    BOOT_JDK="$new_path"
25698    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25699$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25700  fi
25701
25702  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25703  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25704
25705    else
25706      # We're on a unix platform. Hooray! :)
25707      path="$BOOT_JDK"
25708      has_space=`$ECHO "$path" | $GREP " "`
25709      if test "x$has_space" != x; then
25710        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25711$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25712        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25713      fi
25714
25715      # Use eval to expand a potential ~
25716      eval path="$path"
25717      if test ! -f "$path" && test ! -d "$path"; then
25718        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25719      fi
25720
25721      if test -d "$path"; then
25722        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25723      else
25724        dir="`$DIRNAME "$path"`"
25725        base="`$BASENAME "$path"`"
25726        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25727      fi
25728    fi
25729  fi
25730
25731            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25732$as_echo_n "checking for Boot JDK... " >&6; }
25733            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25734$as_echo "$BOOT_JDK" >&6; }
25735            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25736$as_echo_n "checking Boot JDK version... " >&6; }
25737            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25738            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25739$as_echo "$BOOT_JDK_VERSION" >&6; }
25740          fi # end check jdk version
25741        fi # end check javac
25742      fi # end check java
25743    fi # end check boot jdk found
25744  fi
25745
25746
25747  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
25748
25749  if test "x$BOOT_JDK_FOUND" = xno; then
25750    # Now execute the test
25751
25752  # Extract the first word of "javac", so it can be a program name with args.
25753set dummy javac; ac_word=$2
25754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25755$as_echo_n "checking for $ac_word... " >&6; }
25756if ${ac_cv_path_JAVAC_CHECK+:} false; then :
25757  $as_echo_n "(cached) " >&6
25758else
25759  case $JAVAC_CHECK in
25760  [\\/]* | ?:[\\/]*)
25761  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
25762  ;;
25763  *)
25764  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25765for as_dir in $PATH
25766do
25767  IFS=$as_save_IFS
25768  test -z "$as_dir" && as_dir=.
25769    for ac_exec_ext in '' $ac_executable_extensions; do
25770  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25771    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
25772    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25773    break 2
25774  fi
25775done
25776  done
25777IFS=$as_save_IFS
25778
25779  ;;
25780esac
25781fi
25782JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
25783if test -n "$JAVAC_CHECK"; then
25784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
25785$as_echo "$JAVAC_CHECK" >&6; }
25786else
25787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25788$as_echo "no" >&6; }
25789fi
25790
25791
25792  # Extract the first word of "java", so it can be a program name with args.
25793set dummy java; ac_word=$2
25794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25795$as_echo_n "checking for $ac_word... " >&6; }
25796if ${ac_cv_path_JAVA_CHECK+:} false; then :
25797  $as_echo_n "(cached) " >&6
25798else
25799  case $JAVA_CHECK in
25800  [\\/]* | ?:[\\/]*)
25801  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
25802  ;;
25803  *)
25804  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25805for as_dir in $PATH
25806do
25807  IFS=$as_save_IFS
25808  test -z "$as_dir" && as_dir=.
25809    for ac_exec_ext in '' $ac_executable_extensions; do
25810  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25811    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
25812    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25813    break 2
25814  fi
25815done
25816  done
25817IFS=$as_save_IFS
25818
25819  ;;
25820esac
25821fi
25822JAVA_CHECK=$ac_cv_path_JAVA_CHECK
25823if test -n "$JAVA_CHECK"; then
25824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
25825$as_echo "$JAVA_CHECK" >&6; }
25826else
25827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25828$as_echo "no" >&6; }
25829fi
25830
25831
25832  BINARY="$JAVAC_CHECK"
25833  if test "x$JAVAC_CHECK" = x; then
25834    BINARY="$JAVA_CHECK"
25835  fi
25836  if test "x$BINARY" != x; then
25837    # So there is a java(c) binary, it might be part of a JDK.
25838    # Lets find the JDK/JRE directory by following symbolic links.
25839    # Linux/GNU systems often have links from /usr/bin/java to
25840    # /etc/alternatives/java to the real JDK binary.
25841
25842  if test "x$OPENJDK_BUILD_OS" != xwindows; then
25843    # Follow a chain of symbolic links. Use readlink
25844    # where it exists, else fall back to horribly
25845    # complicated shell code.
25846    if test "x$READLINK_TESTED" != yes; then
25847      # On MacOSX there is a readlink tool with a different
25848      # purpose than the GNU readlink tool. Check the found readlink.
25849      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
25850      if test "x$ISGNU" = x; then
25851        # A readlink that we do not know how to use.
25852        # Are there other non-GNU readlinks out there?
25853        READLINK_TESTED=yes
25854        READLINK=
25855      fi
25856    fi
25857
25858    if test "x$READLINK" != x; then
25859      BINARY=`$READLINK -f $BINARY`
25860    else
25861      # Save the current directory for restoring afterwards
25862      STARTDIR=$PWD
25863      COUNTER=0
25864      sym_link_dir=`$DIRNAME $BINARY`
25865      sym_link_file=`$BASENAME $BINARY`
25866      cd $sym_link_dir
25867      # Use -P flag to resolve symlinks in directories.
25868      cd `$THEPWDCMD -P`
25869      sym_link_dir=`$THEPWDCMD -P`
25870      # Resolve file symlinks
25871      while test $COUNTER -lt 20; do
25872        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
25873        if test "x$ISLINK" == x; then
25874          # This is not a symbolic link! We are done!
25875          break
25876        fi
25877        # Again resolve directory symlinks since the target of the just found
25878        # link could be in a different directory
25879        cd `$DIRNAME $ISLINK`
25880        sym_link_dir=`$THEPWDCMD -P`
25881        sym_link_file=`$BASENAME $ISLINK`
25882        let COUNTER=COUNTER+1
25883      done
25884      cd $STARTDIR
25885      BINARY=$sym_link_dir/$sym_link_file
25886    fi
25887  fi
25888
25889    BOOT_JDK=`dirname "$BINARY"`
25890    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
25891    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
25892      # Looks like we found ourselves an JDK
25893      BOOT_JDK_FOUND=maybe
25894      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
25895$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
25896    fi
25897  fi
25898
25899
25900    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25901    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25902      # Do we have a bin/java?
25903      if test ! -x "$BOOT_JDK/bin/java"; then
25904        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25905$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25906        BOOT_JDK_FOUND=no
25907      else
25908        # Do we have a bin/javac?
25909        if test ! -x "$BOOT_JDK/bin/javac"; then
25910          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25911$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25912          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25913$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25914          BOOT_JDK_FOUND=no
25915        else
25916          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25917          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25918
25919          # Extra M4 quote needed to protect [] in grep expression.
25920          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25921          if test "x$FOUND_CORRECT_VERSION" = x; then
25922            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25923$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25924            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25925$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25926            BOOT_JDK_FOUND=no
25927          else
25928            # We're done! :-)
25929            BOOT_JDK_FOUND=yes
25930
25931  # Only process if variable expands to non-empty
25932
25933  if test "x$BOOT_JDK" != x; then
25934    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25935
25936  # Input might be given as Windows format, start by converting to
25937  # unix format.
25938  path="$BOOT_JDK"
25939  new_path=`$CYGPATH -u "$path"`
25940
25941  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25942  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25943  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25944  # "foo.exe" is OK but "foo" is an error.
25945  #
25946  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25947  # It is also a way to make sure we got the proper file name for the real test later on.
25948  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25949  if test "x$test_shortpath" = x; then
25950    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25951$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25952    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25953  fi
25954
25955  # Call helper function which possibly converts this using DOS-style short mode.
25956  # If so, the updated path is stored in $new_path.
25957
25958  input_path="$new_path"
25959  # Check if we need to convert this using DOS-style short mode. If the path
25960  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25961  # take no chances and rewrite it.
25962  # Note: m4 eats our [], so we need to use [ and ] instead.
25963  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25964  if test "x$has_forbidden_chars" != x; then
25965    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25966    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25967    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25968    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25969      # Going to short mode and back again did indeed matter. Since short mode is
25970      # case insensitive, let's make it lowercase to improve readability.
25971      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25972      # Now convert it back to Unix-style (cygpath)
25973      input_path=`$CYGPATH -u "$shortmode_path"`
25974      new_path="$input_path"
25975    fi
25976  fi
25977
25978  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25979  if test "x$test_cygdrive_prefix" = x; then
25980    # As a simple fix, exclude /usr/bin since it's not a real path.
25981    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25982      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25983      # a path prefixed by /cygdrive for fixpath to work.
25984      new_path="$CYGWIN_ROOT_PATH$input_path"
25985    fi
25986  fi
25987
25988
25989  if test "x$path" != "x$new_path"; then
25990    BOOT_JDK="$new_path"
25991    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25992$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25993  fi
25994
25995    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25996
25997  path="$BOOT_JDK"
25998  has_colon=`$ECHO $path | $GREP ^.:`
25999  new_path="$path"
26000  if test "x$has_colon" = x; then
26001    # Not in mixed or Windows style, start by that.
26002    new_path=`cmd //c echo $path`
26003  fi
26004
26005
26006  input_path="$new_path"
26007  # Check if we need to convert this using DOS-style short mode. If the path
26008  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26009  # take no chances and rewrite it.
26010  # Note: m4 eats our [], so we need to use [ and ] instead.
26011  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26012  if test "x$has_forbidden_chars" != x; then
26013    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26014    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26015  fi
26016
26017
26018  windows_path="$new_path"
26019  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26020    unix_path=`$CYGPATH -u "$windows_path"`
26021    new_path="$unix_path"
26022  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26023    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26024    new_path="$unix_path"
26025  fi
26026
26027  if test "x$path" != "x$new_path"; then
26028    BOOT_JDK="$new_path"
26029    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26030$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26031  fi
26032
26033  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26034  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26035
26036    else
26037      # We're on a unix platform. Hooray! :)
26038      path="$BOOT_JDK"
26039      has_space=`$ECHO "$path" | $GREP " "`
26040      if test "x$has_space" != x; then
26041        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26042$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26043        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26044      fi
26045
26046      # Use eval to expand a potential ~
26047      eval path="$path"
26048      if test ! -f "$path" && test ! -d "$path"; then
26049        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26050      fi
26051
26052      if test -d "$path"; then
26053        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26054      else
26055        dir="`$DIRNAME "$path"`"
26056        base="`$BASENAME "$path"`"
26057        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26058      fi
26059    fi
26060  fi
26061
26062            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26063$as_echo_n "checking for Boot JDK... " >&6; }
26064            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26065$as_echo "$BOOT_JDK" >&6; }
26066            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26067$as_echo_n "checking Boot JDK version... " >&6; }
26068            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26069            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26070$as_echo "$BOOT_JDK_VERSION" >&6; }
26071          fi # end check jdk version
26072        fi # end check javac
26073      fi # end check java
26074    fi # end check boot jdk found
26075  fi
26076
26077
26078  # Test: Is there a JDK installed in default, well-known locations?
26079
26080  if test "x$BOOT_JDK_FOUND" = xno; then
26081    # Now execute the test
26082
26083  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26084
26085  if test "x$BOOT_JDK_FOUND" = xno; then
26086    # Now execute the test
26087
26088  if test "x$ProgramW6432" != x; then
26089    VIRTUAL_DIR="$ProgramW6432/Java"
26090
26091  windows_path="$VIRTUAL_DIR"
26092  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26093    unix_path=`$CYGPATH -u "$windows_path"`
26094    VIRTUAL_DIR="$unix_path"
26095  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26096    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26097    VIRTUAL_DIR="$unix_path"
26098  fi
26099
26100
26101  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26102  BOOT_JDK_SUFFIX=""
26103  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26104  if test "x$ALL_JDKS_FOUND" != x; then
26105    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26106
26107  if test "x$BOOT_JDK_FOUND" = xno; then
26108    # Now execute the test
26109
26110        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26111        if test -d "$BOOT_JDK"; then
26112          BOOT_JDK_FOUND=maybe
26113          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26114$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26115        fi
26116
26117
26118    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26119    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26120      # Do we have a bin/java?
26121      if test ! -x "$BOOT_JDK/bin/java"; then
26122        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26123$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26124        BOOT_JDK_FOUND=no
26125      else
26126        # Do we have a bin/javac?
26127        if test ! -x "$BOOT_JDK/bin/javac"; then
26128          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26129$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26130          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26131$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26132          BOOT_JDK_FOUND=no
26133        else
26134          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26135          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26136
26137          # Extra M4 quote needed to protect [] in grep expression.
26138          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26139          if test "x$FOUND_CORRECT_VERSION" = x; then
26140            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26141$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26142            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26143$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26144            BOOT_JDK_FOUND=no
26145          else
26146            # We're done! :-)
26147            BOOT_JDK_FOUND=yes
26148
26149  # Only process if variable expands to non-empty
26150
26151  if test "x$BOOT_JDK" != x; then
26152    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26153
26154  # Input might be given as Windows format, start by converting to
26155  # unix format.
26156  path="$BOOT_JDK"
26157  new_path=`$CYGPATH -u "$path"`
26158
26159  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26160  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26161  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26162  # "foo.exe" is OK but "foo" is an error.
26163  #
26164  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26165  # It is also a way to make sure we got the proper file name for the real test later on.
26166  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26167  if test "x$test_shortpath" = x; then
26168    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26169$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26170    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26171  fi
26172
26173  # Call helper function which possibly converts this using DOS-style short mode.
26174  # If so, the updated path is stored in $new_path.
26175
26176  input_path="$new_path"
26177  # Check if we need to convert this using DOS-style short mode. If the path
26178  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26179  # take no chances and rewrite it.
26180  # Note: m4 eats our [], so we need to use [ and ] instead.
26181  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26182  if test "x$has_forbidden_chars" != x; then
26183    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26184    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26185    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26186    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26187      # Going to short mode and back again did indeed matter. Since short mode is
26188      # case insensitive, let's make it lowercase to improve readability.
26189      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26190      # Now convert it back to Unix-style (cygpath)
26191      input_path=`$CYGPATH -u "$shortmode_path"`
26192      new_path="$input_path"
26193    fi
26194  fi
26195
26196  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26197  if test "x$test_cygdrive_prefix" = x; then
26198    # As a simple fix, exclude /usr/bin since it's not a real path.
26199    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26200      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26201      # a path prefixed by /cygdrive for fixpath to work.
26202      new_path="$CYGWIN_ROOT_PATH$input_path"
26203    fi
26204  fi
26205
26206
26207  if test "x$path" != "x$new_path"; then
26208    BOOT_JDK="$new_path"
26209    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26210$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26211  fi
26212
26213    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26214
26215  path="$BOOT_JDK"
26216  has_colon=`$ECHO $path | $GREP ^.:`
26217  new_path="$path"
26218  if test "x$has_colon" = x; then
26219    # Not in mixed or Windows style, start by that.
26220    new_path=`cmd //c echo $path`
26221  fi
26222
26223
26224  input_path="$new_path"
26225  # Check if we need to convert this using DOS-style short mode. If the path
26226  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26227  # take no chances and rewrite it.
26228  # Note: m4 eats our [], so we need to use [ and ] instead.
26229  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26230  if test "x$has_forbidden_chars" != x; then
26231    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26232    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26233  fi
26234
26235
26236  windows_path="$new_path"
26237  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26238    unix_path=`$CYGPATH -u "$windows_path"`
26239    new_path="$unix_path"
26240  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26241    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26242    new_path="$unix_path"
26243  fi
26244
26245  if test "x$path" != "x$new_path"; then
26246    BOOT_JDK="$new_path"
26247    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26248$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26249  fi
26250
26251  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26252  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26253
26254    else
26255      # We're on a unix platform. Hooray! :)
26256      path="$BOOT_JDK"
26257      has_space=`$ECHO "$path" | $GREP " "`
26258      if test "x$has_space" != x; then
26259        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26260$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26261        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26262      fi
26263
26264      # Use eval to expand a potential ~
26265      eval path="$path"
26266      if test ! -f "$path" && test ! -d "$path"; then
26267        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26268      fi
26269
26270      if test -d "$path"; then
26271        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26272      else
26273        dir="`$DIRNAME "$path"`"
26274        base="`$BASENAME "$path"`"
26275        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26276      fi
26277    fi
26278  fi
26279
26280            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26281$as_echo_n "checking for Boot JDK... " >&6; }
26282            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26283$as_echo "$BOOT_JDK" >&6; }
26284            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26285$as_echo_n "checking Boot JDK version... " >&6; }
26286            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26287            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26288$as_echo "$BOOT_JDK_VERSION" >&6; }
26289          fi # end check jdk version
26290        fi # end check javac
26291      fi # end check java
26292    fi # end check boot jdk found
26293  fi
26294
26295    done
26296  fi
26297
26298  fi
26299
26300
26301    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26302    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26303      # Do we have a bin/java?
26304      if test ! -x "$BOOT_JDK/bin/java"; then
26305        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26306$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26307        BOOT_JDK_FOUND=no
26308      else
26309        # Do we have a bin/javac?
26310        if test ! -x "$BOOT_JDK/bin/javac"; then
26311          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26312$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26313          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26314$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26315          BOOT_JDK_FOUND=no
26316        else
26317          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26318          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26319
26320          # Extra M4 quote needed to protect [] in grep expression.
26321          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26322          if test "x$FOUND_CORRECT_VERSION" = x; then
26323            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26324$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26325            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26326$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26327            BOOT_JDK_FOUND=no
26328          else
26329            # We're done! :-)
26330            BOOT_JDK_FOUND=yes
26331
26332  # Only process if variable expands to non-empty
26333
26334  if test "x$BOOT_JDK" != x; then
26335    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26336
26337  # Input might be given as Windows format, start by converting to
26338  # unix format.
26339  path="$BOOT_JDK"
26340  new_path=`$CYGPATH -u "$path"`
26341
26342  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26343  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26344  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26345  # "foo.exe" is OK but "foo" is an error.
26346  #
26347  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26348  # It is also a way to make sure we got the proper file name for the real test later on.
26349  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26350  if test "x$test_shortpath" = x; then
26351    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26352$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26353    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26354  fi
26355
26356  # Call helper function which possibly converts this using DOS-style short mode.
26357  # If so, the updated path is stored in $new_path.
26358
26359  input_path="$new_path"
26360  # Check if we need to convert this using DOS-style short mode. If the path
26361  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26362  # take no chances and rewrite it.
26363  # Note: m4 eats our [], so we need to use [ and ] instead.
26364  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26365  if test "x$has_forbidden_chars" != x; then
26366    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26367    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26368    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26369    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26370      # Going to short mode and back again did indeed matter. Since short mode is
26371      # case insensitive, let's make it lowercase to improve readability.
26372      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26373      # Now convert it back to Unix-style (cygpath)
26374      input_path=`$CYGPATH -u "$shortmode_path"`
26375      new_path="$input_path"
26376    fi
26377  fi
26378
26379  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26380  if test "x$test_cygdrive_prefix" = x; then
26381    # As a simple fix, exclude /usr/bin since it's not a real path.
26382    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26383      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26384      # a path prefixed by /cygdrive for fixpath to work.
26385      new_path="$CYGWIN_ROOT_PATH$input_path"
26386    fi
26387  fi
26388
26389
26390  if test "x$path" != "x$new_path"; then
26391    BOOT_JDK="$new_path"
26392    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26393$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26394  fi
26395
26396    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26397
26398  path="$BOOT_JDK"
26399  has_colon=`$ECHO $path | $GREP ^.:`
26400  new_path="$path"
26401  if test "x$has_colon" = x; then
26402    # Not in mixed or Windows style, start by that.
26403    new_path=`cmd //c echo $path`
26404  fi
26405
26406
26407  input_path="$new_path"
26408  # Check if we need to convert this using DOS-style short mode. If the path
26409  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26410  # take no chances and rewrite it.
26411  # Note: m4 eats our [], so we need to use [ and ] instead.
26412  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26413  if test "x$has_forbidden_chars" != x; then
26414    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26415    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26416  fi
26417
26418
26419  windows_path="$new_path"
26420  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26421    unix_path=`$CYGPATH -u "$windows_path"`
26422    new_path="$unix_path"
26423  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26424    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26425    new_path="$unix_path"
26426  fi
26427
26428  if test "x$path" != "x$new_path"; then
26429    BOOT_JDK="$new_path"
26430    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26431$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26432  fi
26433
26434  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26435  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26436
26437    else
26438      # We're on a unix platform. Hooray! :)
26439      path="$BOOT_JDK"
26440      has_space=`$ECHO "$path" | $GREP " "`
26441      if test "x$has_space" != x; then
26442        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26443$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26444        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26445      fi
26446
26447      # Use eval to expand a potential ~
26448      eval path="$path"
26449      if test ! -f "$path" && test ! -d "$path"; then
26450        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26451      fi
26452
26453      if test -d "$path"; then
26454        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26455      else
26456        dir="`$DIRNAME "$path"`"
26457        base="`$BASENAME "$path"`"
26458        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26459      fi
26460    fi
26461  fi
26462
26463            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26464$as_echo_n "checking for Boot JDK... " >&6; }
26465            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26466$as_echo "$BOOT_JDK" >&6; }
26467            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26468$as_echo_n "checking Boot JDK version... " >&6; }
26469            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26470            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26471$as_echo "$BOOT_JDK_VERSION" >&6; }
26472          fi # end check jdk version
26473        fi # end check javac
26474      fi # end check java
26475    fi # end check boot jdk found
26476  fi
26477
26478
26479  if test "x$BOOT_JDK_FOUND" = xno; then
26480    # Now execute the test
26481
26482  if test "x$PROGRAMW6432" != x; then
26483    VIRTUAL_DIR="$PROGRAMW6432/Java"
26484
26485  windows_path="$VIRTUAL_DIR"
26486  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26487    unix_path=`$CYGPATH -u "$windows_path"`
26488    VIRTUAL_DIR="$unix_path"
26489  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26490    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26491    VIRTUAL_DIR="$unix_path"
26492  fi
26493
26494
26495  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26496  BOOT_JDK_SUFFIX=""
26497  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26498  if test "x$ALL_JDKS_FOUND" != x; then
26499    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26500
26501  if test "x$BOOT_JDK_FOUND" = xno; then
26502    # Now execute the test
26503
26504        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26505        if test -d "$BOOT_JDK"; then
26506          BOOT_JDK_FOUND=maybe
26507          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26508$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26509        fi
26510
26511
26512    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26513    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26514      # Do we have a bin/java?
26515      if test ! -x "$BOOT_JDK/bin/java"; then
26516        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26517$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26518        BOOT_JDK_FOUND=no
26519      else
26520        # Do we have a bin/javac?
26521        if test ! -x "$BOOT_JDK/bin/javac"; then
26522          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26523$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26524          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26525$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26526          BOOT_JDK_FOUND=no
26527        else
26528          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26529          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26530
26531          # Extra M4 quote needed to protect [] in grep expression.
26532          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26533          if test "x$FOUND_CORRECT_VERSION" = x; then
26534            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26535$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26536            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26537$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26538            BOOT_JDK_FOUND=no
26539          else
26540            # We're done! :-)
26541            BOOT_JDK_FOUND=yes
26542
26543  # Only process if variable expands to non-empty
26544
26545  if test "x$BOOT_JDK" != x; then
26546    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26547
26548  # Input might be given as Windows format, start by converting to
26549  # unix format.
26550  path="$BOOT_JDK"
26551  new_path=`$CYGPATH -u "$path"`
26552
26553  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26554  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26555  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26556  # "foo.exe" is OK but "foo" is an error.
26557  #
26558  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26559  # It is also a way to make sure we got the proper file name for the real test later on.
26560  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26561  if test "x$test_shortpath" = x; then
26562    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26563$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26564    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26565  fi
26566
26567  # Call helper function which possibly converts this using DOS-style short mode.
26568  # If so, the updated path is stored in $new_path.
26569
26570  input_path="$new_path"
26571  # Check if we need to convert this using DOS-style short mode. If the path
26572  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26573  # take no chances and rewrite it.
26574  # Note: m4 eats our [], so we need to use [ and ] instead.
26575  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26576  if test "x$has_forbidden_chars" != x; then
26577    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26578    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26579    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26580    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26581      # Going to short mode and back again did indeed matter. Since short mode is
26582      # case insensitive, let's make it lowercase to improve readability.
26583      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26584      # Now convert it back to Unix-style (cygpath)
26585      input_path=`$CYGPATH -u "$shortmode_path"`
26586      new_path="$input_path"
26587    fi
26588  fi
26589
26590  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26591  if test "x$test_cygdrive_prefix" = x; then
26592    # As a simple fix, exclude /usr/bin since it's not a real path.
26593    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26594      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26595      # a path prefixed by /cygdrive for fixpath to work.
26596      new_path="$CYGWIN_ROOT_PATH$input_path"
26597    fi
26598  fi
26599
26600
26601  if test "x$path" != "x$new_path"; then
26602    BOOT_JDK="$new_path"
26603    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26604$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26605  fi
26606
26607    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26608
26609  path="$BOOT_JDK"
26610  has_colon=`$ECHO $path | $GREP ^.:`
26611  new_path="$path"
26612  if test "x$has_colon" = x; then
26613    # Not in mixed or Windows style, start by that.
26614    new_path=`cmd //c echo $path`
26615  fi
26616
26617
26618  input_path="$new_path"
26619  # Check if we need to convert this using DOS-style short mode. If the path
26620  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26621  # take no chances and rewrite it.
26622  # Note: m4 eats our [], so we need to use [ and ] instead.
26623  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26624  if test "x$has_forbidden_chars" != x; then
26625    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26626    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26627  fi
26628
26629
26630  windows_path="$new_path"
26631  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26632    unix_path=`$CYGPATH -u "$windows_path"`
26633    new_path="$unix_path"
26634  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26635    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26636    new_path="$unix_path"
26637  fi
26638
26639  if test "x$path" != "x$new_path"; then
26640    BOOT_JDK="$new_path"
26641    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26642$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26643  fi
26644
26645  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26646  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26647
26648    else
26649      # We're on a unix platform. Hooray! :)
26650      path="$BOOT_JDK"
26651      has_space=`$ECHO "$path" | $GREP " "`
26652      if test "x$has_space" != x; then
26653        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26654$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26655        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26656      fi
26657
26658      # Use eval to expand a potential ~
26659      eval path="$path"
26660      if test ! -f "$path" && test ! -d "$path"; then
26661        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26662      fi
26663
26664      if test -d "$path"; then
26665        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26666      else
26667        dir="`$DIRNAME "$path"`"
26668        base="`$BASENAME "$path"`"
26669        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26670      fi
26671    fi
26672  fi
26673
26674            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26675$as_echo_n "checking for Boot JDK... " >&6; }
26676            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26677$as_echo "$BOOT_JDK" >&6; }
26678            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26679$as_echo_n "checking Boot JDK version... " >&6; }
26680            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26681            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26682$as_echo "$BOOT_JDK_VERSION" >&6; }
26683          fi # end check jdk version
26684        fi # end check javac
26685      fi # end check java
26686    fi # end check boot jdk found
26687  fi
26688
26689    done
26690  fi
26691
26692  fi
26693
26694
26695    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26696    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26697      # Do we have a bin/java?
26698      if test ! -x "$BOOT_JDK/bin/java"; then
26699        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26700$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26701        BOOT_JDK_FOUND=no
26702      else
26703        # Do we have a bin/javac?
26704        if test ! -x "$BOOT_JDK/bin/javac"; then
26705          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26706$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26707          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26708$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26709          BOOT_JDK_FOUND=no
26710        else
26711          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26712          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26713
26714          # Extra M4 quote needed to protect [] in grep expression.
26715          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26716          if test "x$FOUND_CORRECT_VERSION" = x; then
26717            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26718$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26719            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26720$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26721            BOOT_JDK_FOUND=no
26722          else
26723            # We're done! :-)
26724            BOOT_JDK_FOUND=yes
26725
26726  # Only process if variable expands to non-empty
26727
26728  if test "x$BOOT_JDK" != x; then
26729    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26730
26731  # Input might be given as Windows format, start by converting to
26732  # unix format.
26733  path="$BOOT_JDK"
26734  new_path=`$CYGPATH -u "$path"`
26735
26736  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26737  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26738  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26739  # "foo.exe" is OK but "foo" is an error.
26740  #
26741  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26742  # It is also a way to make sure we got the proper file name for the real test later on.
26743  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26744  if test "x$test_shortpath" = x; then
26745    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26746$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26747    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26748  fi
26749
26750  # Call helper function which possibly converts this using DOS-style short mode.
26751  # If so, the updated path is stored in $new_path.
26752
26753  input_path="$new_path"
26754  # Check if we need to convert this using DOS-style short mode. If the path
26755  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26756  # take no chances and rewrite it.
26757  # Note: m4 eats our [], so we need to use [ and ] instead.
26758  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26759  if test "x$has_forbidden_chars" != x; then
26760    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26761    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26762    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26763    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26764      # Going to short mode and back again did indeed matter. Since short mode is
26765      # case insensitive, let's make it lowercase to improve readability.
26766      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26767      # Now convert it back to Unix-style (cygpath)
26768      input_path=`$CYGPATH -u "$shortmode_path"`
26769      new_path="$input_path"
26770    fi
26771  fi
26772
26773  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26774  if test "x$test_cygdrive_prefix" = x; then
26775    # As a simple fix, exclude /usr/bin since it's not a real path.
26776    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26777      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26778      # a path prefixed by /cygdrive for fixpath to work.
26779      new_path="$CYGWIN_ROOT_PATH$input_path"
26780    fi
26781  fi
26782
26783
26784  if test "x$path" != "x$new_path"; then
26785    BOOT_JDK="$new_path"
26786    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26787$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26788  fi
26789
26790    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26791
26792  path="$BOOT_JDK"
26793  has_colon=`$ECHO $path | $GREP ^.:`
26794  new_path="$path"
26795  if test "x$has_colon" = x; then
26796    # Not in mixed or Windows style, start by that.
26797    new_path=`cmd //c echo $path`
26798  fi
26799
26800
26801  input_path="$new_path"
26802  # Check if we need to convert this using DOS-style short mode. If the path
26803  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26804  # take no chances and rewrite it.
26805  # Note: m4 eats our [], so we need to use [ and ] instead.
26806  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26807  if test "x$has_forbidden_chars" != x; then
26808    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26809    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26810  fi
26811
26812
26813  windows_path="$new_path"
26814  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26815    unix_path=`$CYGPATH -u "$windows_path"`
26816    new_path="$unix_path"
26817  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26818    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26819    new_path="$unix_path"
26820  fi
26821
26822  if test "x$path" != "x$new_path"; then
26823    BOOT_JDK="$new_path"
26824    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26825$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26826  fi
26827
26828  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26829  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26830
26831    else
26832      # We're on a unix platform. Hooray! :)
26833      path="$BOOT_JDK"
26834      has_space=`$ECHO "$path" | $GREP " "`
26835      if test "x$has_space" != x; then
26836        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26837$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26838        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26839      fi
26840
26841      # Use eval to expand a potential ~
26842      eval path="$path"
26843      if test ! -f "$path" && test ! -d "$path"; then
26844        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26845      fi
26846
26847      if test -d "$path"; then
26848        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26849      else
26850        dir="`$DIRNAME "$path"`"
26851        base="`$BASENAME "$path"`"
26852        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26853      fi
26854    fi
26855  fi
26856
26857            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26858$as_echo_n "checking for Boot JDK... " >&6; }
26859            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26860$as_echo "$BOOT_JDK" >&6; }
26861            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26862$as_echo_n "checking Boot JDK version... " >&6; }
26863            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26864            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26865$as_echo "$BOOT_JDK_VERSION" >&6; }
26866          fi # end check jdk version
26867        fi # end check javac
26868      fi # end check java
26869    fi # end check boot jdk found
26870  fi
26871
26872
26873  if test "x$BOOT_JDK_FOUND" = xno; then
26874    # Now execute the test
26875
26876  if test "x$PROGRAMFILES" != x; then
26877    VIRTUAL_DIR="$PROGRAMFILES/Java"
26878
26879  windows_path="$VIRTUAL_DIR"
26880  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26881    unix_path=`$CYGPATH -u "$windows_path"`
26882    VIRTUAL_DIR="$unix_path"
26883  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26884    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26885    VIRTUAL_DIR="$unix_path"
26886  fi
26887
26888
26889  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26890  BOOT_JDK_SUFFIX=""
26891  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26892  if test "x$ALL_JDKS_FOUND" != x; then
26893    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26894
26895  if test "x$BOOT_JDK_FOUND" = xno; then
26896    # Now execute the test
26897
26898        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26899        if test -d "$BOOT_JDK"; then
26900          BOOT_JDK_FOUND=maybe
26901          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26902$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26903        fi
26904
26905
26906    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26907    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26908      # Do we have a bin/java?
26909      if test ! -x "$BOOT_JDK/bin/java"; then
26910        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26911$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26912        BOOT_JDK_FOUND=no
26913      else
26914        # Do we have a bin/javac?
26915        if test ! -x "$BOOT_JDK/bin/javac"; then
26916          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26917$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26918          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26919$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26920          BOOT_JDK_FOUND=no
26921        else
26922          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26923          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26924
26925          # Extra M4 quote needed to protect [] in grep expression.
26926          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26927          if test "x$FOUND_CORRECT_VERSION" = x; then
26928            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26929$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26930            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26931$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26932            BOOT_JDK_FOUND=no
26933          else
26934            # We're done! :-)
26935            BOOT_JDK_FOUND=yes
26936
26937  # Only process if variable expands to non-empty
26938
26939  if test "x$BOOT_JDK" != x; then
26940    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26941
26942  # Input might be given as Windows format, start by converting to
26943  # unix format.
26944  path="$BOOT_JDK"
26945  new_path=`$CYGPATH -u "$path"`
26946
26947  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26948  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26949  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26950  # "foo.exe" is OK but "foo" is an error.
26951  #
26952  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26953  # It is also a way to make sure we got the proper file name for the real test later on.
26954  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26955  if test "x$test_shortpath" = x; then
26956    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26957$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26958    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26959  fi
26960
26961  # Call helper function which possibly converts this using DOS-style short mode.
26962  # If so, the updated path is stored in $new_path.
26963
26964  input_path="$new_path"
26965  # Check if we need to convert this using DOS-style short mode. If the path
26966  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26967  # take no chances and rewrite it.
26968  # Note: m4 eats our [], so we need to use [ and ] instead.
26969  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26970  if test "x$has_forbidden_chars" != x; then
26971    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26972    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26973    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26974    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26975      # Going to short mode and back again did indeed matter. Since short mode is
26976      # case insensitive, let's make it lowercase to improve readability.
26977      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26978      # Now convert it back to Unix-style (cygpath)
26979      input_path=`$CYGPATH -u "$shortmode_path"`
26980      new_path="$input_path"
26981    fi
26982  fi
26983
26984  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26985  if test "x$test_cygdrive_prefix" = x; then
26986    # As a simple fix, exclude /usr/bin since it's not a real path.
26987    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26988      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26989      # a path prefixed by /cygdrive for fixpath to work.
26990      new_path="$CYGWIN_ROOT_PATH$input_path"
26991    fi
26992  fi
26993
26994
26995  if test "x$path" != "x$new_path"; then
26996    BOOT_JDK="$new_path"
26997    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26998$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26999  fi
27000
27001    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27002
27003  path="$BOOT_JDK"
27004  has_colon=`$ECHO $path | $GREP ^.:`
27005  new_path="$path"
27006  if test "x$has_colon" = x; then
27007    # Not in mixed or Windows style, start by that.
27008    new_path=`cmd //c echo $path`
27009  fi
27010
27011
27012  input_path="$new_path"
27013  # Check if we need to convert this using DOS-style short mode. If the path
27014  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27015  # take no chances and rewrite it.
27016  # Note: m4 eats our [], so we need to use [ and ] instead.
27017  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27018  if test "x$has_forbidden_chars" != x; then
27019    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27020    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27021  fi
27022
27023
27024  windows_path="$new_path"
27025  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27026    unix_path=`$CYGPATH -u "$windows_path"`
27027    new_path="$unix_path"
27028  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27029    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27030    new_path="$unix_path"
27031  fi
27032
27033  if test "x$path" != "x$new_path"; then
27034    BOOT_JDK="$new_path"
27035    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27036$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27037  fi
27038
27039  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27040  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27041
27042    else
27043      # We're on a unix platform. Hooray! :)
27044      path="$BOOT_JDK"
27045      has_space=`$ECHO "$path" | $GREP " "`
27046      if test "x$has_space" != x; then
27047        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27048$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27049        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27050      fi
27051
27052      # Use eval to expand a potential ~
27053      eval path="$path"
27054      if test ! -f "$path" && test ! -d "$path"; then
27055        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27056      fi
27057
27058      if test -d "$path"; then
27059        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27060      else
27061        dir="`$DIRNAME "$path"`"
27062        base="`$BASENAME "$path"`"
27063        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27064      fi
27065    fi
27066  fi
27067
27068            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27069$as_echo_n "checking for Boot JDK... " >&6; }
27070            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27071$as_echo "$BOOT_JDK" >&6; }
27072            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27073$as_echo_n "checking Boot JDK version... " >&6; }
27074            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27075            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27076$as_echo "$BOOT_JDK_VERSION" >&6; }
27077          fi # end check jdk version
27078        fi # end check javac
27079      fi # end check java
27080    fi # end check boot jdk found
27081  fi
27082
27083    done
27084  fi
27085
27086  fi
27087
27088
27089    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27090    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27091      # Do we have a bin/java?
27092      if test ! -x "$BOOT_JDK/bin/java"; then
27093        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27094$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27095        BOOT_JDK_FOUND=no
27096      else
27097        # Do we have a bin/javac?
27098        if test ! -x "$BOOT_JDK/bin/javac"; then
27099          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27100$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27101          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27102$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27103          BOOT_JDK_FOUND=no
27104        else
27105          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27106          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27107
27108          # Extra M4 quote needed to protect [] in grep expression.
27109          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27110          if test "x$FOUND_CORRECT_VERSION" = x; then
27111            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27112$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27113            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27114$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27115            BOOT_JDK_FOUND=no
27116          else
27117            # We're done! :-)
27118            BOOT_JDK_FOUND=yes
27119
27120  # Only process if variable expands to non-empty
27121
27122  if test "x$BOOT_JDK" != x; then
27123    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27124
27125  # Input might be given as Windows format, start by converting to
27126  # unix format.
27127  path="$BOOT_JDK"
27128  new_path=`$CYGPATH -u "$path"`
27129
27130  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27131  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27132  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27133  # "foo.exe" is OK but "foo" is an error.
27134  #
27135  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27136  # It is also a way to make sure we got the proper file name for the real test later on.
27137  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27138  if test "x$test_shortpath" = x; then
27139    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27140$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27141    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27142  fi
27143
27144  # Call helper function which possibly converts this using DOS-style short mode.
27145  # If so, the updated path is stored in $new_path.
27146
27147  input_path="$new_path"
27148  # Check if we need to convert this using DOS-style short mode. If the path
27149  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27150  # take no chances and rewrite it.
27151  # Note: m4 eats our [], so we need to use [ and ] instead.
27152  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27153  if test "x$has_forbidden_chars" != x; then
27154    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27155    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27156    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27157    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27158      # Going to short mode and back again did indeed matter. Since short mode is
27159      # case insensitive, let's make it lowercase to improve readability.
27160      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27161      # Now convert it back to Unix-style (cygpath)
27162      input_path=`$CYGPATH -u "$shortmode_path"`
27163      new_path="$input_path"
27164    fi
27165  fi
27166
27167  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27168  if test "x$test_cygdrive_prefix" = x; then
27169    # As a simple fix, exclude /usr/bin since it's not a real path.
27170    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27171      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27172      # a path prefixed by /cygdrive for fixpath to work.
27173      new_path="$CYGWIN_ROOT_PATH$input_path"
27174    fi
27175  fi
27176
27177
27178  if test "x$path" != "x$new_path"; then
27179    BOOT_JDK="$new_path"
27180    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27181$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27182  fi
27183
27184    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27185
27186  path="$BOOT_JDK"
27187  has_colon=`$ECHO $path | $GREP ^.:`
27188  new_path="$path"
27189  if test "x$has_colon" = x; then
27190    # Not in mixed or Windows style, start by that.
27191    new_path=`cmd //c echo $path`
27192  fi
27193
27194
27195  input_path="$new_path"
27196  # Check if we need to convert this using DOS-style short mode. If the path
27197  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27198  # take no chances and rewrite it.
27199  # Note: m4 eats our [], so we need to use [ and ] instead.
27200  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27201  if test "x$has_forbidden_chars" != x; then
27202    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27203    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27204  fi
27205
27206
27207  windows_path="$new_path"
27208  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27209    unix_path=`$CYGPATH -u "$windows_path"`
27210    new_path="$unix_path"
27211  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27212    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27213    new_path="$unix_path"
27214  fi
27215
27216  if test "x$path" != "x$new_path"; then
27217    BOOT_JDK="$new_path"
27218    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27219$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27220  fi
27221
27222  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27223  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27224
27225    else
27226      # We're on a unix platform. Hooray! :)
27227      path="$BOOT_JDK"
27228      has_space=`$ECHO "$path" | $GREP " "`
27229      if test "x$has_space" != x; then
27230        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27231$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27232        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27233      fi
27234
27235      # Use eval to expand a potential ~
27236      eval path="$path"
27237      if test ! -f "$path" && test ! -d "$path"; then
27238        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27239      fi
27240
27241      if test -d "$path"; then
27242        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27243      else
27244        dir="`$DIRNAME "$path"`"
27245        base="`$BASENAME "$path"`"
27246        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27247      fi
27248    fi
27249  fi
27250
27251            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27252$as_echo_n "checking for Boot JDK... " >&6; }
27253            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27254$as_echo "$BOOT_JDK" >&6; }
27255            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27256$as_echo_n "checking Boot JDK version... " >&6; }
27257            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27258            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27259$as_echo "$BOOT_JDK_VERSION" >&6; }
27260          fi # end check jdk version
27261        fi # end check javac
27262      fi # end check java
27263    fi # end check boot jdk found
27264  fi
27265
27266
27267  if test "x$BOOT_JDK_FOUND" = xno; then
27268    # Now execute the test
27269
27270  if test "x$ProgramFiles" != x; then
27271    VIRTUAL_DIR="$ProgramFiles/Java"
27272
27273  windows_path="$VIRTUAL_DIR"
27274  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27275    unix_path=`$CYGPATH -u "$windows_path"`
27276    VIRTUAL_DIR="$unix_path"
27277  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27278    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27279    VIRTUAL_DIR="$unix_path"
27280  fi
27281
27282
27283  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27284  BOOT_JDK_SUFFIX=""
27285  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27286  if test "x$ALL_JDKS_FOUND" != x; then
27287    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27288
27289  if test "x$BOOT_JDK_FOUND" = xno; then
27290    # Now execute the test
27291
27292        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27293        if test -d "$BOOT_JDK"; then
27294          BOOT_JDK_FOUND=maybe
27295          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27296$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27297        fi
27298
27299
27300    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27301    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27302      # Do we have a bin/java?
27303      if test ! -x "$BOOT_JDK/bin/java"; then
27304        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27305$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27306        BOOT_JDK_FOUND=no
27307      else
27308        # Do we have a bin/javac?
27309        if test ! -x "$BOOT_JDK/bin/javac"; then
27310          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27311$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27312          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27313$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27314          BOOT_JDK_FOUND=no
27315        else
27316          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27317          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27318
27319          # Extra M4 quote needed to protect [] in grep expression.
27320          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27321          if test "x$FOUND_CORRECT_VERSION" = x; then
27322            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27323$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27324            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27325$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27326            BOOT_JDK_FOUND=no
27327          else
27328            # We're done! :-)
27329            BOOT_JDK_FOUND=yes
27330
27331  # Only process if variable expands to non-empty
27332
27333  if test "x$BOOT_JDK" != x; then
27334    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27335
27336  # Input might be given as Windows format, start by converting to
27337  # unix format.
27338  path="$BOOT_JDK"
27339  new_path=`$CYGPATH -u "$path"`
27340
27341  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27342  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27343  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27344  # "foo.exe" is OK but "foo" is an error.
27345  #
27346  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27347  # It is also a way to make sure we got the proper file name for the real test later on.
27348  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27349  if test "x$test_shortpath" = x; then
27350    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27351$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27352    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27353  fi
27354
27355  # Call helper function which possibly converts this using DOS-style short mode.
27356  # If so, the updated path is stored in $new_path.
27357
27358  input_path="$new_path"
27359  # Check if we need to convert this using DOS-style short mode. If the path
27360  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27361  # take no chances and rewrite it.
27362  # Note: m4 eats our [], so we need to use [ and ] instead.
27363  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27364  if test "x$has_forbidden_chars" != x; then
27365    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27366    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27367    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27368    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27369      # Going to short mode and back again did indeed matter. Since short mode is
27370      # case insensitive, let's make it lowercase to improve readability.
27371      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27372      # Now convert it back to Unix-style (cygpath)
27373      input_path=`$CYGPATH -u "$shortmode_path"`
27374      new_path="$input_path"
27375    fi
27376  fi
27377
27378  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27379  if test "x$test_cygdrive_prefix" = x; then
27380    # As a simple fix, exclude /usr/bin since it's not a real path.
27381    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27382      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27383      # a path prefixed by /cygdrive for fixpath to work.
27384      new_path="$CYGWIN_ROOT_PATH$input_path"
27385    fi
27386  fi
27387
27388
27389  if test "x$path" != "x$new_path"; then
27390    BOOT_JDK="$new_path"
27391    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27392$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27393  fi
27394
27395    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27396
27397  path="$BOOT_JDK"
27398  has_colon=`$ECHO $path | $GREP ^.:`
27399  new_path="$path"
27400  if test "x$has_colon" = x; then
27401    # Not in mixed or Windows style, start by that.
27402    new_path=`cmd //c echo $path`
27403  fi
27404
27405
27406  input_path="$new_path"
27407  # Check if we need to convert this using DOS-style short mode. If the path
27408  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27409  # take no chances and rewrite it.
27410  # Note: m4 eats our [], so we need to use [ and ] instead.
27411  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27412  if test "x$has_forbidden_chars" != x; then
27413    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27414    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27415  fi
27416
27417
27418  windows_path="$new_path"
27419  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27420    unix_path=`$CYGPATH -u "$windows_path"`
27421    new_path="$unix_path"
27422  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27423    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27424    new_path="$unix_path"
27425  fi
27426
27427  if test "x$path" != "x$new_path"; then
27428    BOOT_JDK="$new_path"
27429    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27430$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27431  fi
27432
27433  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27434  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27435
27436    else
27437      # We're on a unix platform. Hooray! :)
27438      path="$BOOT_JDK"
27439      has_space=`$ECHO "$path" | $GREP " "`
27440      if test "x$has_space" != x; then
27441        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27442$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27443        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27444      fi
27445
27446      # Use eval to expand a potential ~
27447      eval path="$path"
27448      if test ! -f "$path" && test ! -d "$path"; then
27449        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27450      fi
27451
27452      if test -d "$path"; then
27453        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27454      else
27455        dir="`$DIRNAME "$path"`"
27456        base="`$BASENAME "$path"`"
27457        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27458      fi
27459    fi
27460  fi
27461
27462            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27463$as_echo_n "checking for Boot JDK... " >&6; }
27464            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27465$as_echo "$BOOT_JDK" >&6; }
27466            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27467$as_echo_n "checking Boot JDK version... " >&6; }
27468            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27469            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27470$as_echo "$BOOT_JDK_VERSION" >&6; }
27471          fi # end check jdk version
27472        fi # end check javac
27473      fi # end check java
27474    fi # end check boot jdk found
27475  fi
27476
27477    done
27478  fi
27479
27480  fi
27481
27482
27483    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27484    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27485      # Do we have a bin/java?
27486      if test ! -x "$BOOT_JDK/bin/java"; then
27487        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27488$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27489        BOOT_JDK_FOUND=no
27490      else
27491        # Do we have a bin/javac?
27492        if test ! -x "$BOOT_JDK/bin/javac"; then
27493          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27494$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27495          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27496$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27497          BOOT_JDK_FOUND=no
27498        else
27499          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27500          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27501
27502          # Extra M4 quote needed to protect [] in grep expression.
27503          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27504          if test "x$FOUND_CORRECT_VERSION" = x; then
27505            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27506$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27507            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27508$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27509            BOOT_JDK_FOUND=no
27510          else
27511            # We're done! :-)
27512            BOOT_JDK_FOUND=yes
27513
27514  # Only process if variable expands to non-empty
27515
27516  if test "x$BOOT_JDK" != x; then
27517    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27518
27519  # Input might be given as Windows format, start by converting to
27520  # unix format.
27521  path="$BOOT_JDK"
27522  new_path=`$CYGPATH -u "$path"`
27523
27524  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27525  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27526  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27527  # "foo.exe" is OK but "foo" is an error.
27528  #
27529  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27530  # It is also a way to make sure we got the proper file name for the real test later on.
27531  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27532  if test "x$test_shortpath" = x; then
27533    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27534$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27535    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27536  fi
27537
27538  # Call helper function which possibly converts this using DOS-style short mode.
27539  # If so, the updated path is stored in $new_path.
27540
27541  input_path="$new_path"
27542  # Check if we need to convert this using DOS-style short mode. If the path
27543  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27544  # take no chances and rewrite it.
27545  # Note: m4 eats our [], so we need to use [ and ] instead.
27546  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27547  if test "x$has_forbidden_chars" != x; then
27548    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27549    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27550    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27551    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27552      # Going to short mode and back again did indeed matter. Since short mode is
27553      # case insensitive, let's make it lowercase to improve readability.
27554      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27555      # Now convert it back to Unix-style (cygpath)
27556      input_path=`$CYGPATH -u "$shortmode_path"`
27557      new_path="$input_path"
27558    fi
27559  fi
27560
27561  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27562  if test "x$test_cygdrive_prefix" = x; then
27563    # As a simple fix, exclude /usr/bin since it's not a real path.
27564    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27565      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27566      # a path prefixed by /cygdrive for fixpath to work.
27567      new_path="$CYGWIN_ROOT_PATH$input_path"
27568    fi
27569  fi
27570
27571
27572  if test "x$path" != "x$new_path"; then
27573    BOOT_JDK="$new_path"
27574    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27575$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27576  fi
27577
27578    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27579
27580  path="$BOOT_JDK"
27581  has_colon=`$ECHO $path | $GREP ^.:`
27582  new_path="$path"
27583  if test "x$has_colon" = x; then
27584    # Not in mixed or Windows style, start by that.
27585    new_path=`cmd //c echo $path`
27586  fi
27587
27588
27589  input_path="$new_path"
27590  # Check if we need to convert this using DOS-style short mode. If the path
27591  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27592  # take no chances and rewrite it.
27593  # Note: m4 eats our [], so we need to use [ and ] instead.
27594  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27595  if test "x$has_forbidden_chars" != x; then
27596    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27597    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27598  fi
27599
27600
27601  windows_path="$new_path"
27602  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27603    unix_path=`$CYGPATH -u "$windows_path"`
27604    new_path="$unix_path"
27605  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27606    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27607    new_path="$unix_path"
27608  fi
27609
27610  if test "x$path" != "x$new_path"; then
27611    BOOT_JDK="$new_path"
27612    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27613$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27614  fi
27615
27616  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27617  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27618
27619    else
27620      # We're on a unix platform. Hooray! :)
27621      path="$BOOT_JDK"
27622      has_space=`$ECHO "$path" | $GREP " "`
27623      if test "x$has_space" != x; then
27624        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27625$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27626        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27627      fi
27628
27629      # Use eval to expand a potential ~
27630      eval path="$path"
27631      if test ! -f "$path" && test ! -d "$path"; then
27632        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27633      fi
27634
27635      if test -d "$path"; then
27636        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27637      else
27638        dir="`$DIRNAME "$path"`"
27639        base="`$BASENAME "$path"`"
27640        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27641      fi
27642    fi
27643  fi
27644
27645            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27646$as_echo_n "checking for Boot JDK... " >&6; }
27647            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27648$as_echo "$BOOT_JDK" >&6; }
27649            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27650$as_echo_n "checking Boot JDK version... " >&6; }
27651            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27652            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27653$as_echo "$BOOT_JDK_VERSION" >&6; }
27654          fi # end check jdk version
27655        fi # end check javac
27656      fi # end check java
27657    fi # end check boot jdk found
27658  fi
27659
27660
27661  if test "x$BOOT_JDK_FOUND" = xno; then
27662    # Now execute the test
27663
27664  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
27665  BOOT_JDK_SUFFIX=""
27666  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27667  if test "x$ALL_JDKS_FOUND" != x; then
27668    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27669
27670  if test "x$BOOT_JDK_FOUND" = xno; then
27671    # Now execute the test
27672
27673        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27674        if test -d "$BOOT_JDK"; then
27675          BOOT_JDK_FOUND=maybe
27676          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27677$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27678        fi
27679
27680
27681    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27682    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27683      # Do we have a bin/java?
27684      if test ! -x "$BOOT_JDK/bin/java"; then
27685        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27686$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27687        BOOT_JDK_FOUND=no
27688      else
27689        # Do we have a bin/javac?
27690        if test ! -x "$BOOT_JDK/bin/javac"; then
27691          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27692$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27693          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27694$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27695          BOOT_JDK_FOUND=no
27696        else
27697          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27698          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27699
27700          # Extra M4 quote needed to protect [] in grep expression.
27701          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27702          if test "x$FOUND_CORRECT_VERSION" = x; then
27703            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27704$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27705            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27706$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27707            BOOT_JDK_FOUND=no
27708          else
27709            # We're done! :-)
27710            BOOT_JDK_FOUND=yes
27711
27712  # Only process if variable expands to non-empty
27713
27714  if test "x$BOOT_JDK" != x; then
27715    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27716
27717  # Input might be given as Windows format, start by converting to
27718  # unix format.
27719  path="$BOOT_JDK"
27720  new_path=`$CYGPATH -u "$path"`
27721
27722  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27723  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27724  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27725  # "foo.exe" is OK but "foo" is an error.
27726  #
27727  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27728  # It is also a way to make sure we got the proper file name for the real test later on.
27729  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27730  if test "x$test_shortpath" = x; then
27731    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27732$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27733    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27734  fi
27735
27736  # Call helper function which possibly converts this using DOS-style short mode.
27737  # If so, the updated path is stored in $new_path.
27738
27739  input_path="$new_path"
27740  # Check if we need to convert this using DOS-style short mode. If the path
27741  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27742  # take no chances and rewrite it.
27743  # Note: m4 eats our [], so we need to use [ and ] instead.
27744  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27745  if test "x$has_forbidden_chars" != x; then
27746    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27747    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27748    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27749    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27750      # Going to short mode and back again did indeed matter. Since short mode is
27751      # case insensitive, let's make it lowercase to improve readability.
27752      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27753      # Now convert it back to Unix-style (cygpath)
27754      input_path=`$CYGPATH -u "$shortmode_path"`
27755      new_path="$input_path"
27756    fi
27757  fi
27758
27759  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27760  if test "x$test_cygdrive_prefix" = x; then
27761    # As a simple fix, exclude /usr/bin since it's not a real path.
27762    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27763      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27764      # a path prefixed by /cygdrive for fixpath to work.
27765      new_path="$CYGWIN_ROOT_PATH$input_path"
27766    fi
27767  fi
27768
27769
27770  if test "x$path" != "x$new_path"; then
27771    BOOT_JDK="$new_path"
27772    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27773$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27774  fi
27775
27776    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27777
27778  path="$BOOT_JDK"
27779  has_colon=`$ECHO $path | $GREP ^.:`
27780  new_path="$path"
27781  if test "x$has_colon" = x; then
27782    # Not in mixed or Windows style, start by that.
27783    new_path=`cmd //c echo $path`
27784  fi
27785
27786
27787  input_path="$new_path"
27788  # Check if we need to convert this using DOS-style short mode. If the path
27789  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27790  # take no chances and rewrite it.
27791  # Note: m4 eats our [], so we need to use [ and ] instead.
27792  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27793  if test "x$has_forbidden_chars" != x; then
27794    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27795    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27796  fi
27797
27798
27799  windows_path="$new_path"
27800  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27801    unix_path=`$CYGPATH -u "$windows_path"`
27802    new_path="$unix_path"
27803  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27804    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27805    new_path="$unix_path"
27806  fi
27807
27808  if test "x$path" != "x$new_path"; then
27809    BOOT_JDK="$new_path"
27810    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27811$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27812  fi
27813
27814  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27815  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27816
27817    else
27818      # We're on a unix platform. Hooray! :)
27819      path="$BOOT_JDK"
27820      has_space=`$ECHO "$path" | $GREP " "`
27821      if test "x$has_space" != x; then
27822        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27823$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27824        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27825      fi
27826
27827      # Use eval to expand a potential ~
27828      eval path="$path"
27829      if test ! -f "$path" && test ! -d "$path"; then
27830        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27831      fi
27832
27833      if test -d "$path"; then
27834        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27835      else
27836        dir="`$DIRNAME "$path"`"
27837        base="`$BASENAME "$path"`"
27838        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27839      fi
27840    fi
27841  fi
27842
27843            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27844$as_echo_n "checking for Boot JDK... " >&6; }
27845            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27846$as_echo "$BOOT_JDK" >&6; }
27847            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27848$as_echo_n "checking Boot JDK version... " >&6; }
27849            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27850            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27851$as_echo "$BOOT_JDK_VERSION" >&6; }
27852          fi # end check jdk version
27853        fi # end check javac
27854      fi # end check java
27855    fi # end check boot jdk found
27856  fi
27857
27858    done
27859  fi
27860
27861
27862    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27863    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27864      # Do we have a bin/java?
27865      if test ! -x "$BOOT_JDK/bin/java"; then
27866        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27867$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27868        BOOT_JDK_FOUND=no
27869      else
27870        # Do we have a bin/javac?
27871        if test ! -x "$BOOT_JDK/bin/javac"; then
27872          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27873$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27874          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27875$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27876          BOOT_JDK_FOUND=no
27877        else
27878          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27879          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27880
27881          # Extra M4 quote needed to protect [] in grep expression.
27882          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27883          if test "x$FOUND_CORRECT_VERSION" = x; then
27884            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27885$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27886            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27887$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27888            BOOT_JDK_FOUND=no
27889          else
27890            # We're done! :-)
27891            BOOT_JDK_FOUND=yes
27892
27893  # Only process if variable expands to non-empty
27894
27895  if test "x$BOOT_JDK" != x; then
27896    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27897
27898  # Input might be given as Windows format, start by converting to
27899  # unix format.
27900  path="$BOOT_JDK"
27901  new_path=`$CYGPATH -u "$path"`
27902
27903  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27904  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27905  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27906  # "foo.exe" is OK but "foo" is an error.
27907  #
27908  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27909  # It is also a way to make sure we got the proper file name for the real test later on.
27910  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27911  if test "x$test_shortpath" = x; then
27912    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27913$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27914    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27915  fi
27916
27917  # Call helper function which possibly converts this using DOS-style short mode.
27918  # If so, the updated path is stored in $new_path.
27919
27920  input_path="$new_path"
27921  # Check if we need to convert this using DOS-style short mode. If the path
27922  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27923  # take no chances and rewrite it.
27924  # Note: m4 eats our [], so we need to use [ and ] instead.
27925  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27926  if test "x$has_forbidden_chars" != x; then
27927    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27928    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27929    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27930    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27931      # Going to short mode and back again did indeed matter. Since short mode is
27932      # case insensitive, let's make it lowercase to improve readability.
27933      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27934      # Now convert it back to Unix-style (cygpath)
27935      input_path=`$CYGPATH -u "$shortmode_path"`
27936      new_path="$input_path"
27937    fi
27938  fi
27939
27940  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27941  if test "x$test_cygdrive_prefix" = x; then
27942    # As a simple fix, exclude /usr/bin since it's not a real path.
27943    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27944      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27945      # a path prefixed by /cygdrive for fixpath to work.
27946      new_path="$CYGWIN_ROOT_PATH$input_path"
27947    fi
27948  fi
27949
27950
27951  if test "x$path" != "x$new_path"; then
27952    BOOT_JDK="$new_path"
27953    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27954$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27955  fi
27956
27957    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27958
27959  path="$BOOT_JDK"
27960  has_colon=`$ECHO $path | $GREP ^.:`
27961  new_path="$path"
27962  if test "x$has_colon" = x; then
27963    # Not in mixed or Windows style, start by that.
27964    new_path=`cmd //c echo $path`
27965  fi
27966
27967
27968  input_path="$new_path"
27969  # Check if we need to convert this using DOS-style short mode. If the path
27970  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27971  # take no chances and rewrite it.
27972  # Note: m4 eats our [], so we need to use [ and ] instead.
27973  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27974  if test "x$has_forbidden_chars" != x; then
27975    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27976    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27977  fi
27978
27979
27980  windows_path="$new_path"
27981  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27982    unix_path=`$CYGPATH -u "$windows_path"`
27983    new_path="$unix_path"
27984  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27985    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27986    new_path="$unix_path"
27987  fi
27988
27989  if test "x$path" != "x$new_path"; then
27990    BOOT_JDK="$new_path"
27991    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27992$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27993  fi
27994
27995  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27996  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27997
27998    else
27999      # We're on a unix platform. Hooray! :)
28000      path="$BOOT_JDK"
28001      has_space=`$ECHO "$path" | $GREP " "`
28002      if test "x$has_space" != x; then
28003        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28004$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28005        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28006      fi
28007
28008      # Use eval to expand a potential ~
28009      eval path="$path"
28010      if test ! -f "$path" && test ! -d "$path"; then
28011        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28012      fi
28013
28014      if test -d "$path"; then
28015        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28016      else
28017        dir="`$DIRNAME "$path"`"
28018        base="`$BASENAME "$path"`"
28019        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28020      fi
28021    fi
28022  fi
28023
28024            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28025$as_echo_n "checking for Boot JDK... " >&6; }
28026            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28027$as_echo "$BOOT_JDK" >&6; }
28028            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28029$as_echo_n "checking Boot JDK version... " >&6; }
28030            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28031            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28032$as_echo "$BOOT_JDK_VERSION" >&6; }
28033          fi # end check jdk version
28034        fi # end check javac
28035      fi # end check java
28036    fi # end check boot jdk found
28037  fi
28038
28039  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
28040
28041  if test "x$BOOT_JDK_FOUND" = xno; then
28042    # Now execute the test
28043
28044  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
28045  BOOT_JDK_SUFFIX="/Contents/Home"
28046  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28047  if test "x$ALL_JDKS_FOUND" != x; then
28048    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28049
28050  if test "x$BOOT_JDK_FOUND" = xno; then
28051    # Now execute the test
28052
28053        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28054        if test -d "$BOOT_JDK"; then
28055          BOOT_JDK_FOUND=maybe
28056          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28057$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28058        fi
28059
28060
28061    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28062    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28063      # Do we have a bin/java?
28064      if test ! -x "$BOOT_JDK/bin/java"; then
28065        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28066$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28067        BOOT_JDK_FOUND=no
28068      else
28069        # Do we have a bin/javac?
28070        if test ! -x "$BOOT_JDK/bin/javac"; then
28071          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28072$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28073          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28074$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28075          BOOT_JDK_FOUND=no
28076        else
28077          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28078          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28079
28080          # Extra M4 quote needed to protect [] in grep expression.
28081          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28082          if test "x$FOUND_CORRECT_VERSION" = x; then
28083            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28084$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28085            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28086$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28087            BOOT_JDK_FOUND=no
28088          else
28089            # We're done! :-)
28090            BOOT_JDK_FOUND=yes
28091
28092  # Only process if variable expands to non-empty
28093
28094  if test "x$BOOT_JDK" != x; then
28095    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28096
28097  # Input might be given as Windows format, start by converting to
28098  # unix format.
28099  path="$BOOT_JDK"
28100  new_path=`$CYGPATH -u "$path"`
28101
28102  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28103  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28104  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28105  # "foo.exe" is OK but "foo" is an error.
28106  #
28107  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28108  # It is also a way to make sure we got the proper file name for the real test later on.
28109  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28110  if test "x$test_shortpath" = x; then
28111    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28112$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28113    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28114  fi
28115
28116  # Call helper function which possibly converts this using DOS-style short mode.
28117  # If so, the updated path is stored in $new_path.
28118
28119  input_path="$new_path"
28120  # Check if we need to convert this using DOS-style short mode. If the path
28121  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28122  # take no chances and rewrite it.
28123  # Note: m4 eats our [], so we need to use [ and ] instead.
28124  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28125  if test "x$has_forbidden_chars" != x; then
28126    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28127    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28128    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28129    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28130      # Going to short mode and back again did indeed matter. Since short mode is
28131      # case insensitive, let's make it lowercase to improve readability.
28132      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28133      # Now convert it back to Unix-style (cygpath)
28134      input_path=`$CYGPATH -u "$shortmode_path"`
28135      new_path="$input_path"
28136    fi
28137  fi
28138
28139  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28140  if test "x$test_cygdrive_prefix" = x; then
28141    # As a simple fix, exclude /usr/bin since it's not a real path.
28142    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28143      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28144      # a path prefixed by /cygdrive for fixpath to work.
28145      new_path="$CYGWIN_ROOT_PATH$input_path"
28146    fi
28147  fi
28148
28149
28150  if test "x$path" != "x$new_path"; then
28151    BOOT_JDK="$new_path"
28152    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28153$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28154  fi
28155
28156    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28157
28158  path="$BOOT_JDK"
28159  has_colon=`$ECHO $path | $GREP ^.:`
28160  new_path="$path"
28161  if test "x$has_colon" = x; then
28162    # Not in mixed or Windows style, start by that.
28163    new_path=`cmd //c echo $path`
28164  fi
28165
28166
28167  input_path="$new_path"
28168  # Check if we need to convert this using DOS-style short mode. If the path
28169  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28170  # take no chances and rewrite it.
28171  # Note: m4 eats our [], so we need to use [ and ] instead.
28172  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28173  if test "x$has_forbidden_chars" != x; then
28174    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28175    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28176  fi
28177
28178
28179  windows_path="$new_path"
28180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28181    unix_path=`$CYGPATH -u "$windows_path"`
28182    new_path="$unix_path"
28183  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28184    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28185    new_path="$unix_path"
28186  fi
28187
28188  if test "x$path" != "x$new_path"; then
28189    BOOT_JDK="$new_path"
28190    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28191$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28192  fi
28193
28194  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28195  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28196
28197    else
28198      # We're on a unix platform. Hooray! :)
28199      path="$BOOT_JDK"
28200      has_space=`$ECHO "$path" | $GREP " "`
28201      if test "x$has_space" != x; then
28202        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28203$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28204        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28205      fi
28206
28207      # Use eval to expand a potential ~
28208      eval path="$path"
28209      if test ! -f "$path" && test ! -d "$path"; then
28210        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28211      fi
28212
28213      if test -d "$path"; then
28214        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28215      else
28216        dir="`$DIRNAME "$path"`"
28217        base="`$BASENAME "$path"`"
28218        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28219      fi
28220    fi
28221  fi
28222
28223            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28224$as_echo_n "checking for Boot JDK... " >&6; }
28225            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28226$as_echo "$BOOT_JDK" >&6; }
28227            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28228$as_echo_n "checking Boot JDK version... " >&6; }
28229            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28230            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28231$as_echo "$BOOT_JDK_VERSION" >&6; }
28232          fi # end check jdk version
28233        fi # end check javac
28234      fi # end check java
28235    fi # end check boot jdk found
28236  fi
28237
28238    done
28239  fi
28240
28241
28242    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28243    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28244      # Do we have a bin/java?
28245      if test ! -x "$BOOT_JDK/bin/java"; then
28246        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28247$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28248        BOOT_JDK_FOUND=no
28249      else
28250        # Do we have a bin/javac?
28251        if test ! -x "$BOOT_JDK/bin/javac"; then
28252          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28253$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28254          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28255$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28256          BOOT_JDK_FOUND=no
28257        else
28258          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28259          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28260
28261          # Extra M4 quote needed to protect [] in grep expression.
28262          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28263          if test "x$FOUND_CORRECT_VERSION" = x; then
28264            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28265$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28266            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28267$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28268            BOOT_JDK_FOUND=no
28269          else
28270            # We're done! :-)
28271            BOOT_JDK_FOUND=yes
28272
28273  # Only process if variable expands to non-empty
28274
28275  if test "x$BOOT_JDK" != x; then
28276    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28277
28278  # Input might be given as Windows format, start by converting to
28279  # unix format.
28280  path="$BOOT_JDK"
28281  new_path=`$CYGPATH -u "$path"`
28282
28283  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28284  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28285  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28286  # "foo.exe" is OK but "foo" is an error.
28287  #
28288  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28289  # It is also a way to make sure we got the proper file name for the real test later on.
28290  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28291  if test "x$test_shortpath" = x; then
28292    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28293$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28294    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28295  fi
28296
28297  # Call helper function which possibly converts this using DOS-style short mode.
28298  # If so, the updated path is stored in $new_path.
28299
28300  input_path="$new_path"
28301  # Check if we need to convert this using DOS-style short mode. If the path
28302  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28303  # take no chances and rewrite it.
28304  # Note: m4 eats our [], so we need to use [ and ] instead.
28305  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28306  if test "x$has_forbidden_chars" != x; then
28307    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28308    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28309    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28310    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28311      # Going to short mode and back again did indeed matter. Since short mode is
28312      # case insensitive, let's make it lowercase to improve readability.
28313      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28314      # Now convert it back to Unix-style (cygpath)
28315      input_path=`$CYGPATH -u "$shortmode_path"`
28316      new_path="$input_path"
28317    fi
28318  fi
28319
28320  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28321  if test "x$test_cygdrive_prefix" = x; then
28322    # As a simple fix, exclude /usr/bin since it's not a real path.
28323    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28324      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28325      # a path prefixed by /cygdrive for fixpath to work.
28326      new_path="$CYGWIN_ROOT_PATH$input_path"
28327    fi
28328  fi
28329
28330
28331  if test "x$path" != "x$new_path"; then
28332    BOOT_JDK="$new_path"
28333    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28334$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28335  fi
28336
28337    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28338
28339  path="$BOOT_JDK"
28340  has_colon=`$ECHO $path | $GREP ^.:`
28341  new_path="$path"
28342  if test "x$has_colon" = x; then
28343    # Not in mixed or Windows style, start by that.
28344    new_path=`cmd //c echo $path`
28345  fi
28346
28347
28348  input_path="$new_path"
28349  # Check if we need to convert this using DOS-style short mode. If the path
28350  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28351  # take no chances and rewrite it.
28352  # Note: m4 eats our [], so we need to use [ and ] instead.
28353  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28354  if test "x$has_forbidden_chars" != x; then
28355    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28356    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28357  fi
28358
28359
28360  windows_path="$new_path"
28361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28362    unix_path=`$CYGPATH -u "$windows_path"`
28363    new_path="$unix_path"
28364  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28365    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28366    new_path="$unix_path"
28367  fi
28368
28369  if test "x$path" != "x$new_path"; then
28370    BOOT_JDK="$new_path"
28371    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28372$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28373  fi
28374
28375  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28376  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28377
28378    else
28379      # We're on a unix platform. Hooray! :)
28380      path="$BOOT_JDK"
28381      has_space=`$ECHO "$path" | $GREP " "`
28382      if test "x$has_space" != x; then
28383        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28384$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28385        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28386      fi
28387
28388      # Use eval to expand a potential ~
28389      eval path="$path"
28390      if test ! -f "$path" && test ! -d "$path"; then
28391        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28392      fi
28393
28394      if test -d "$path"; then
28395        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28396      else
28397        dir="`$DIRNAME "$path"`"
28398        base="`$BASENAME "$path"`"
28399        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28400      fi
28401    fi
28402  fi
28403
28404            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28405$as_echo_n "checking for Boot JDK... " >&6; }
28406            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28407$as_echo "$BOOT_JDK" >&6; }
28408            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28409$as_echo_n "checking Boot JDK version... " >&6; }
28410            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28411            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28412$as_echo "$BOOT_JDK_VERSION" >&6; }
28413          fi # end check jdk version
28414        fi # end check javac
28415      fi # end check java
28416    fi # end check boot jdk found
28417  fi
28418
28419
28420  if test "x$BOOT_JDK_FOUND" = xno; then
28421    # Now execute the test
28422
28423  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
28424  BOOT_JDK_SUFFIX="/Contents/Home"
28425  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28426  if test "x$ALL_JDKS_FOUND" != x; then
28427    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28428
28429  if test "x$BOOT_JDK_FOUND" = xno; then
28430    # Now execute the test
28431
28432        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28433        if test -d "$BOOT_JDK"; then
28434          BOOT_JDK_FOUND=maybe
28435          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28436$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28437        fi
28438
28439
28440    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28441    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28442      # Do we have a bin/java?
28443      if test ! -x "$BOOT_JDK/bin/java"; then
28444        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28445$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28446        BOOT_JDK_FOUND=no
28447      else
28448        # Do we have a bin/javac?
28449        if test ! -x "$BOOT_JDK/bin/javac"; then
28450          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28451$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28452          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28453$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28454          BOOT_JDK_FOUND=no
28455        else
28456          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28457          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28458
28459          # Extra M4 quote needed to protect [] in grep expression.
28460          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28461          if test "x$FOUND_CORRECT_VERSION" = x; then
28462            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28463$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28464            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28465$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28466            BOOT_JDK_FOUND=no
28467          else
28468            # We're done! :-)
28469            BOOT_JDK_FOUND=yes
28470
28471  # Only process if variable expands to non-empty
28472
28473  if test "x$BOOT_JDK" != x; then
28474    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28475
28476  # Input might be given as Windows format, start by converting to
28477  # unix format.
28478  path="$BOOT_JDK"
28479  new_path=`$CYGPATH -u "$path"`
28480
28481  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28482  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28483  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28484  # "foo.exe" is OK but "foo" is an error.
28485  #
28486  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28487  # It is also a way to make sure we got the proper file name for the real test later on.
28488  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28489  if test "x$test_shortpath" = x; then
28490    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28491$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28492    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28493  fi
28494
28495  # Call helper function which possibly converts this using DOS-style short mode.
28496  # If so, the updated path is stored in $new_path.
28497
28498  input_path="$new_path"
28499  # Check if we need to convert this using DOS-style short mode. If the path
28500  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28501  # take no chances and rewrite it.
28502  # Note: m4 eats our [], so we need to use [ and ] instead.
28503  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28504  if test "x$has_forbidden_chars" != x; then
28505    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28506    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28507    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28508    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28509      # Going to short mode and back again did indeed matter. Since short mode is
28510      # case insensitive, let's make it lowercase to improve readability.
28511      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28512      # Now convert it back to Unix-style (cygpath)
28513      input_path=`$CYGPATH -u "$shortmode_path"`
28514      new_path="$input_path"
28515    fi
28516  fi
28517
28518  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28519  if test "x$test_cygdrive_prefix" = x; then
28520    # As a simple fix, exclude /usr/bin since it's not a real path.
28521    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28522      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28523      # a path prefixed by /cygdrive for fixpath to work.
28524      new_path="$CYGWIN_ROOT_PATH$input_path"
28525    fi
28526  fi
28527
28528
28529  if test "x$path" != "x$new_path"; then
28530    BOOT_JDK="$new_path"
28531    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28532$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28533  fi
28534
28535    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28536
28537  path="$BOOT_JDK"
28538  has_colon=`$ECHO $path | $GREP ^.:`
28539  new_path="$path"
28540  if test "x$has_colon" = x; then
28541    # Not in mixed or Windows style, start by that.
28542    new_path=`cmd //c echo $path`
28543  fi
28544
28545
28546  input_path="$new_path"
28547  # Check if we need to convert this using DOS-style short mode. If the path
28548  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28549  # take no chances and rewrite it.
28550  # Note: m4 eats our [], so we need to use [ and ] instead.
28551  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28552  if test "x$has_forbidden_chars" != x; then
28553    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28554    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28555  fi
28556
28557
28558  windows_path="$new_path"
28559  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28560    unix_path=`$CYGPATH -u "$windows_path"`
28561    new_path="$unix_path"
28562  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28563    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28564    new_path="$unix_path"
28565  fi
28566
28567  if test "x$path" != "x$new_path"; then
28568    BOOT_JDK="$new_path"
28569    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28570$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28571  fi
28572
28573  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28574  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28575
28576    else
28577      # We're on a unix platform. Hooray! :)
28578      path="$BOOT_JDK"
28579      has_space=`$ECHO "$path" | $GREP " "`
28580      if test "x$has_space" != x; then
28581        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28582$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28583        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28584      fi
28585
28586      # Use eval to expand a potential ~
28587      eval path="$path"
28588      if test ! -f "$path" && test ! -d "$path"; then
28589        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28590      fi
28591
28592      if test -d "$path"; then
28593        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28594      else
28595        dir="`$DIRNAME "$path"`"
28596        base="`$BASENAME "$path"`"
28597        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28598      fi
28599    fi
28600  fi
28601
28602            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28603$as_echo_n "checking for Boot JDK... " >&6; }
28604            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28605$as_echo "$BOOT_JDK" >&6; }
28606            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28607$as_echo_n "checking Boot JDK version... " >&6; }
28608            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28609            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28610$as_echo "$BOOT_JDK_VERSION" >&6; }
28611          fi # end check jdk version
28612        fi # end check javac
28613      fi # end check java
28614    fi # end check boot jdk found
28615  fi
28616
28617    done
28618  fi
28619
28620
28621    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28622    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28623      # Do we have a bin/java?
28624      if test ! -x "$BOOT_JDK/bin/java"; then
28625        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28626$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28627        BOOT_JDK_FOUND=no
28628      else
28629        # Do we have a bin/javac?
28630        if test ! -x "$BOOT_JDK/bin/javac"; then
28631          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28632$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28633          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28634$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28635          BOOT_JDK_FOUND=no
28636        else
28637          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28638          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28639
28640          # Extra M4 quote needed to protect [] in grep expression.
28641          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28642          if test "x$FOUND_CORRECT_VERSION" = x; then
28643            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28644$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28645            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28646$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28647            BOOT_JDK_FOUND=no
28648          else
28649            # We're done! :-)
28650            BOOT_JDK_FOUND=yes
28651
28652  # Only process if variable expands to non-empty
28653
28654  if test "x$BOOT_JDK" != x; then
28655    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28656
28657  # Input might be given as Windows format, start by converting to
28658  # unix format.
28659  path="$BOOT_JDK"
28660  new_path=`$CYGPATH -u "$path"`
28661
28662  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28663  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28664  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28665  # "foo.exe" is OK but "foo" is an error.
28666  #
28667  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28668  # It is also a way to make sure we got the proper file name for the real test later on.
28669  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28670  if test "x$test_shortpath" = x; then
28671    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28672$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28673    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28674  fi
28675
28676  # Call helper function which possibly converts this using DOS-style short mode.
28677  # If so, the updated path is stored in $new_path.
28678
28679  input_path="$new_path"
28680  # Check if we need to convert this using DOS-style short mode. If the path
28681  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28682  # take no chances and rewrite it.
28683  # Note: m4 eats our [], so we need to use [ and ] instead.
28684  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28685  if test "x$has_forbidden_chars" != x; then
28686    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28687    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28688    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28689    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28690      # Going to short mode and back again did indeed matter. Since short mode is
28691      # case insensitive, let's make it lowercase to improve readability.
28692      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28693      # Now convert it back to Unix-style (cygpath)
28694      input_path=`$CYGPATH -u "$shortmode_path"`
28695      new_path="$input_path"
28696    fi
28697  fi
28698
28699  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28700  if test "x$test_cygdrive_prefix" = x; then
28701    # As a simple fix, exclude /usr/bin since it's not a real path.
28702    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28703      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28704      # a path prefixed by /cygdrive for fixpath to work.
28705      new_path="$CYGWIN_ROOT_PATH$input_path"
28706    fi
28707  fi
28708
28709
28710  if test "x$path" != "x$new_path"; then
28711    BOOT_JDK="$new_path"
28712    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28713$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28714  fi
28715
28716    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28717
28718  path="$BOOT_JDK"
28719  has_colon=`$ECHO $path | $GREP ^.:`
28720  new_path="$path"
28721  if test "x$has_colon" = x; then
28722    # Not in mixed or Windows style, start by that.
28723    new_path=`cmd //c echo $path`
28724  fi
28725
28726
28727  input_path="$new_path"
28728  # Check if we need to convert this using DOS-style short mode. If the path
28729  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28730  # take no chances and rewrite it.
28731  # Note: m4 eats our [], so we need to use [ and ] instead.
28732  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28733  if test "x$has_forbidden_chars" != x; then
28734    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28735    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28736  fi
28737
28738
28739  windows_path="$new_path"
28740  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28741    unix_path=`$CYGPATH -u "$windows_path"`
28742    new_path="$unix_path"
28743  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28744    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28745    new_path="$unix_path"
28746  fi
28747
28748  if test "x$path" != "x$new_path"; then
28749    BOOT_JDK="$new_path"
28750    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28751$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28752  fi
28753
28754  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28755  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28756
28757    else
28758      # We're on a unix platform. Hooray! :)
28759      path="$BOOT_JDK"
28760      has_space=`$ECHO "$path" | $GREP " "`
28761      if test "x$has_space" != x; then
28762        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28763$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28764        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28765      fi
28766
28767      # Use eval to expand a potential ~
28768      eval path="$path"
28769      if test ! -f "$path" && test ! -d "$path"; then
28770        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28771      fi
28772
28773      if test -d "$path"; then
28774        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28775      else
28776        dir="`$DIRNAME "$path"`"
28777        base="`$BASENAME "$path"`"
28778        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28779      fi
28780    fi
28781  fi
28782
28783            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28784$as_echo_n "checking for Boot JDK... " >&6; }
28785            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28786$as_echo "$BOOT_JDK" >&6; }
28787            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28788$as_echo_n "checking Boot JDK version... " >&6; }
28789            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28790            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28791$as_echo "$BOOT_JDK_VERSION" >&6; }
28792          fi # end check jdk version
28793        fi # end check javac
28794      fi # end check java
28795    fi # end check boot jdk found
28796  fi
28797
28798  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
28799
28800  if test "x$BOOT_JDK_FOUND" = xno; then
28801    # Now execute the test
28802
28803  BOOT_JDK_PREFIX="/usr/lib/jvm"
28804  BOOT_JDK_SUFFIX=""
28805  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28806  if test "x$ALL_JDKS_FOUND" != x; then
28807    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28808
28809  if test "x$BOOT_JDK_FOUND" = xno; then
28810    # Now execute the test
28811
28812        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28813        if test -d "$BOOT_JDK"; then
28814          BOOT_JDK_FOUND=maybe
28815          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28816$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28817        fi
28818
28819
28820    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28821    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28822      # Do we have a bin/java?
28823      if test ! -x "$BOOT_JDK/bin/java"; then
28824        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28825$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28826        BOOT_JDK_FOUND=no
28827      else
28828        # Do we have a bin/javac?
28829        if test ! -x "$BOOT_JDK/bin/javac"; then
28830          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28831$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28832          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28833$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28834          BOOT_JDK_FOUND=no
28835        else
28836          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28837          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28838
28839          # Extra M4 quote needed to protect [] in grep expression.
28840          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28841          if test "x$FOUND_CORRECT_VERSION" = x; then
28842            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28843$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28844            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28845$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28846            BOOT_JDK_FOUND=no
28847          else
28848            # We're done! :-)
28849            BOOT_JDK_FOUND=yes
28850
28851  # Only process if variable expands to non-empty
28852
28853  if test "x$BOOT_JDK" != x; then
28854    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28855
28856  # Input might be given as Windows format, start by converting to
28857  # unix format.
28858  path="$BOOT_JDK"
28859  new_path=`$CYGPATH -u "$path"`
28860
28861  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28862  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28863  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28864  # "foo.exe" is OK but "foo" is an error.
28865  #
28866  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28867  # It is also a way to make sure we got the proper file name for the real test later on.
28868  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28869  if test "x$test_shortpath" = x; then
28870    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28871$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28872    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28873  fi
28874
28875  # Call helper function which possibly converts this using DOS-style short mode.
28876  # If so, the updated path is stored in $new_path.
28877
28878  input_path="$new_path"
28879  # Check if we need to convert this using DOS-style short mode. If the path
28880  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28881  # take no chances and rewrite it.
28882  # Note: m4 eats our [], so we need to use [ and ] instead.
28883  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28884  if test "x$has_forbidden_chars" != x; then
28885    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28886    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28887    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28888    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28889      # Going to short mode and back again did indeed matter. Since short mode is
28890      # case insensitive, let's make it lowercase to improve readability.
28891      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28892      # Now convert it back to Unix-style (cygpath)
28893      input_path=`$CYGPATH -u "$shortmode_path"`
28894      new_path="$input_path"
28895    fi
28896  fi
28897
28898  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28899  if test "x$test_cygdrive_prefix" = x; then
28900    # As a simple fix, exclude /usr/bin since it's not a real path.
28901    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28902      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28903      # a path prefixed by /cygdrive for fixpath to work.
28904      new_path="$CYGWIN_ROOT_PATH$input_path"
28905    fi
28906  fi
28907
28908
28909  if test "x$path" != "x$new_path"; then
28910    BOOT_JDK="$new_path"
28911    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28912$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28913  fi
28914
28915    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28916
28917  path="$BOOT_JDK"
28918  has_colon=`$ECHO $path | $GREP ^.:`
28919  new_path="$path"
28920  if test "x$has_colon" = x; then
28921    # Not in mixed or Windows style, start by that.
28922    new_path=`cmd //c echo $path`
28923  fi
28924
28925
28926  input_path="$new_path"
28927  # Check if we need to convert this using DOS-style short mode. If the path
28928  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28929  # take no chances and rewrite it.
28930  # Note: m4 eats our [], so we need to use [ and ] instead.
28931  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28932  if test "x$has_forbidden_chars" != x; then
28933    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28934    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28935  fi
28936
28937
28938  windows_path="$new_path"
28939  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28940    unix_path=`$CYGPATH -u "$windows_path"`
28941    new_path="$unix_path"
28942  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28943    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28944    new_path="$unix_path"
28945  fi
28946
28947  if test "x$path" != "x$new_path"; then
28948    BOOT_JDK="$new_path"
28949    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28950$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28951  fi
28952
28953  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28954  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28955
28956    else
28957      # We're on a unix platform. Hooray! :)
28958      path="$BOOT_JDK"
28959      has_space=`$ECHO "$path" | $GREP " "`
28960      if test "x$has_space" != x; then
28961        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28962$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28963        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28964      fi
28965
28966      # Use eval to expand a potential ~
28967      eval path="$path"
28968      if test ! -f "$path" && test ! -d "$path"; then
28969        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28970      fi
28971
28972      if test -d "$path"; then
28973        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28974      else
28975        dir="`$DIRNAME "$path"`"
28976        base="`$BASENAME "$path"`"
28977        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28978      fi
28979    fi
28980  fi
28981
28982            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28983$as_echo_n "checking for Boot JDK... " >&6; }
28984            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28985$as_echo "$BOOT_JDK" >&6; }
28986            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28987$as_echo_n "checking Boot JDK version... " >&6; }
28988            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28989            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28990$as_echo "$BOOT_JDK_VERSION" >&6; }
28991          fi # end check jdk version
28992        fi # end check javac
28993      fi # end check java
28994    fi # end check boot jdk found
28995  fi
28996
28997    done
28998  fi
28999
29000
29001    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29002    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29003      # Do we have a bin/java?
29004      if test ! -x "$BOOT_JDK/bin/java"; then
29005        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29006$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29007        BOOT_JDK_FOUND=no
29008      else
29009        # Do we have a bin/javac?
29010        if test ! -x "$BOOT_JDK/bin/javac"; then
29011          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29012$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29013          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29014$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29015          BOOT_JDK_FOUND=no
29016        else
29017          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29018          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
29019
29020          # Extra M4 quote needed to protect [] in grep expression.
29021          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29022          if test "x$FOUND_CORRECT_VERSION" = x; then
29023            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29024$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29025            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29026$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29027            BOOT_JDK_FOUND=no
29028          else
29029            # We're done! :-)
29030            BOOT_JDK_FOUND=yes
29031
29032  # Only process if variable expands to non-empty
29033
29034  if test "x$BOOT_JDK" != x; then
29035    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29036
29037  # Input might be given as Windows format, start by converting to
29038  # unix format.
29039  path="$BOOT_JDK"
29040  new_path=`$CYGPATH -u "$path"`
29041
29042  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29043  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29044  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29045  # "foo.exe" is OK but "foo" is an error.
29046  #
29047  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29048  # It is also a way to make sure we got the proper file name for the real test later on.
29049  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29050  if test "x$test_shortpath" = x; then
29051    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29052$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29053    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29054  fi
29055
29056  # Call helper function which possibly converts this using DOS-style short mode.
29057  # If so, the updated path is stored in $new_path.
29058
29059  input_path="$new_path"
29060  # Check if we need to convert this using DOS-style short mode. If the path
29061  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29062  # take no chances and rewrite it.
29063  # Note: m4 eats our [], so we need to use [ and ] instead.
29064  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29065  if test "x$has_forbidden_chars" != x; then
29066    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29067    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29068    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29069    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29070      # Going to short mode and back again did indeed matter. Since short mode is
29071      # case insensitive, let's make it lowercase to improve readability.
29072      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29073      # Now convert it back to Unix-style (cygpath)
29074      input_path=`$CYGPATH -u "$shortmode_path"`
29075      new_path="$input_path"
29076    fi
29077  fi
29078
29079  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29080  if test "x$test_cygdrive_prefix" = x; then
29081    # As a simple fix, exclude /usr/bin since it's not a real path.
29082    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29083      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29084      # a path prefixed by /cygdrive for fixpath to work.
29085      new_path="$CYGWIN_ROOT_PATH$input_path"
29086    fi
29087  fi
29088
29089
29090  if test "x$path" != "x$new_path"; then
29091    BOOT_JDK="$new_path"
29092    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29093$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29094  fi
29095
29096    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29097
29098  path="$BOOT_JDK"
29099  has_colon=`$ECHO $path | $GREP ^.:`
29100  new_path="$path"
29101  if test "x$has_colon" = x; then
29102    # Not in mixed or Windows style, start by that.
29103    new_path=`cmd //c echo $path`
29104  fi
29105
29106
29107  input_path="$new_path"
29108  # Check if we need to convert this using DOS-style short mode. If the path
29109  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29110  # take no chances and rewrite it.
29111  # Note: m4 eats our [], so we need to use [ and ] instead.
29112  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29113  if test "x$has_forbidden_chars" != x; then
29114    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29115    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29116  fi
29117
29118
29119  windows_path="$new_path"
29120  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29121    unix_path=`$CYGPATH -u "$windows_path"`
29122    new_path="$unix_path"
29123  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29124    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29125    new_path="$unix_path"
29126  fi
29127
29128  if test "x$path" != "x$new_path"; then
29129    BOOT_JDK="$new_path"
29130    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29131$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29132  fi
29133
29134  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29135  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29136
29137    else
29138      # We're on a unix platform. Hooray! :)
29139      path="$BOOT_JDK"
29140      has_space=`$ECHO "$path" | $GREP " "`
29141      if test "x$has_space" != x; then
29142        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29143$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29144        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29145      fi
29146
29147      # Use eval to expand a potential ~
29148      eval path="$path"
29149      if test ! -f "$path" && test ! -d "$path"; then
29150        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29151      fi
29152
29153      if test -d "$path"; then
29154        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29155      else
29156        dir="`$DIRNAME "$path"`"
29157        base="`$BASENAME "$path"`"
29158        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29159      fi
29160    fi
29161  fi
29162
29163            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29164$as_echo_n "checking for Boot JDK... " >&6; }
29165            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29166$as_echo "$BOOT_JDK" >&6; }
29167            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29168$as_echo_n "checking Boot JDK version... " >&6; }
29169            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29170            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29171$as_echo "$BOOT_JDK_VERSION" >&6; }
29172          fi # end check jdk version
29173        fi # end check javac
29174      fi # end check java
29175    fi # end check boot jdk found
29176  fi
29177
29178  fi
29179
29180
29181    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29182    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29183      # Do we have a bin/java?
29184      if test ! -x "$BOOT_JDK/bin/java"; then
29185        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29186$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29187        BOOT_JDK_FOUND=no
29188      else
29189        # Do we have a bin/javac?
29190        if test ! -x "$BOOT_JDK/bin/javac"; then
29191          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29192$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29193          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29194$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29195          BOOT_JDK_FOUND=no
29196        else
29197          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29198          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
29199
29200          # Extra M4 quote needed to protect [] in grep expression.
29201          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29202          if test "x$FOUND_CORRECT_VERSION" = x; then
29203            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29204$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29205            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29206$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29207            BOOT_JDK_FOUND=no
29208          else
29209            # We're done! :-)
29210            BOOT_JDK_FOUND=yes
29211
29212  # Only process if variable expands to non-empty
29213
29214  if test "x$BOOT_JDK" != x; then
29215    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29216
29217  # Input might be given as Windows format, start by converting to
29218  # unix format.
29219  path="$BOOT_JDK"
29220  new_path=`$CYGPATH -u "$path"`
29221
29222  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29223  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29224  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29225  # "foo.exe" is OK but "foo" is an error.
29226  #
29227  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29228  # It is also a way to make sure we got the proper file name for the real test later on.
29229  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29230  if test "x$test_shortpath" = x; then
29231    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29232$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29233    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29234  fi
29235
29236  # Call helper function which possibly converts this using DOS-style short mode.
29237  # If so, the updated path is stored in $new_path.
29238
29239  input_path="$new_path"
29240  # Check if we need to convert this using DOS-style short mode. If the path
29241  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29242  # take no chances and rewrite it.
29243  # Note: m4 eats our [], so we need to use [ and ] instead.
29244  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29245  if test "x$has_forbidden_chars" != x; then
29246    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29247    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29248    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29249    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29250      # Going to short mode and back again did indeed matter. Since short mode is
29251      # case insensitive, let's make it lowercase to improve readability.
29252      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29253      # Now convert it back to Unix-style (cygpath)
29254      input_path=`$CYGPATH -u "$shortmode_path"`
29255      new_path="$input_path"
29256    fi
29257  fi
29258
29259  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29260  if test "x$test_cygdrive_prefix" = x; then
29261    # As a simple fix, exclude /usr/bin since it's not a real path.
29262    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29263      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29264      # a path prefixed by /cygdrive for fixpath to work.
29265      new_path="$CYGWIN_ROOT_PATH$input_path"
29266    fi
29267  fi
29268
29269
29270  if test "x$path" != "x$new_path"; then
29271    BOOT_JDK="$new_path"
29272    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29273$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29274  fi
29275
29276    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29277
29278  path="$BOOT_JDK"
29279  has_colon=`$ECHO $path | $GREP ^.:`
29280  new_path="$path"
29281  if test "x$has_colon" = x; then
29282    # Not in mixed or Windows style, start by that.
29283    new_path=`cmd //c echo $path`
29284  fi
29285
29286
29287  input_path="$new_path"
29288  # Check if we need to convert this using DOS-style short mode. If the path
29289  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29290  # take no chances and rewrite it.
29291  # Note: m4 eats our [], so we need to use [ and ] instead.
29292  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29293  if test "x$has_forbidden_chars" != x; then
29294    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29295    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29296  fi
29297
29298
29299  windows_path="$new_path"
29300  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29301    unix_path=`$CYGPATH -u "$windows_path"`
29302    new_path="$unix_path"
29303  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29304    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29305    new_path="$unix_path"
29306  fi
29307
29308  if test "x$path" != "x$new_path"; then
29309    BOOT_JDK="$new_path"
29310    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29311$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29312  fi
29313
29314  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29315  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29316
29317    else
29318      # We're on a unix platform. Hooray! :)
29319      path="$BOOT_JDK"
29320      has_space=`$ECHO "$path" | $GREP " "`
29321      if test "x$has_space" != x; then
29322        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29323$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29324        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29325      fi
29326
29327      # Use eval to expand a potential ~
29328      eval path="$path"
29329      if test ! -f "$path" && test ! -d "$path"; then
29330        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29331      fi
29332
29333      if test -d "$path"; then
29334        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29335      else
29336        dir="`$DIRNAME "$path"`"
29337        base="`$BASENAME "$path"`"
29338        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29339      fi
29340    fi
29341  fi
29342
29343            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29344$as_echo_n "checking for Boot JDK... " >&6; }
29345            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29346$as_echo "$BOOT_JDK" >&6; }
29347            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29348$as_echo_n "checking Boot JDK version... " >&6; }
29349            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29350            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29351$as_echo "$BOOT_JDK_VERSION" >&6; }
29352          fi # end check jdk version
29353        fi # end check javac
29354      fi # end check java
29355    fi # end check boot jdk found
29356  fi
29357
29358
29359  # If we haven't found anything yet, we've truly lost. Give up.
29360  if test "x$BOOT_JDK_FOUND" = xno; then
29361
29362  # Print a helpful message on how to acquire the necessary build dependency.
29363  # openjdk is the help tag: freetype, cups, alsa etc
29364  MISSING_DEPENDENCY=openjdk
29365
29366  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29367    cygwin_help $MISSING_DEPENDENCY
29368  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29369    msys_help $MISSING_DEPENDENCY
29370  else
29371    PKGHANDLER_COMMAND=
29372
29373    case $PKGHANDLER in
29374      apt-get)
29375        apt_help     $MISSING_DEPENDENCY ;;
29376      yum)
29377        yum_help     $MISSING_DEPENDENCY ;;
29378      port)
29379        port_help    $MISSING_DEPENDENCY ;;
29380      pkgutil)
29381        pkgutil_help $MISSING_DEPENDENCY ;;
29382      pkgadd)
29383        pkgadd_help  $MISSING_DEPENDENCY ;;
29384    esac
29385
29386    if test "x$PKGHANDLER_COMMAND" != x; then
29387      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29388    fi
29389  fi
29390
29391    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
29392$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
29393    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
29394$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29395    as_fn_error $? "Cannot continue" "$LINENO" 5
29396  fi
29397
29398
29399
29400  # Setup tools from the Boot JDK.
29401
29402  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29403
29404  # Publish this variable in the help.
29405
29406
29407  if [ -z "${JAVA+x}" ]; then
29408    # The variable is not set by user, try to locate tool using the code snippet
29409
29410      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29411$as_echo_n "checking for java in Boot JDK... " >&6; }
29412      JAVA=$BOOT_JDK/bin/java
29413      if test ! -x $JAVA; then
29414        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29415$as_echo "not found" >&6; }
29416        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29417$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29418        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29419      fi
29420      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29421$as_echo "ok" >&6; }
29422
29423
29424  else
29425    # The variable is set, but is it from the command line or the environment?
29426
29427    # Try to remove the string !JAVA! from our list.
29428    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
29429    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29430      # If it failed, the variable was not from the command line. Ignore it,
29431      # but warn the user (except for BASH, which is always set by the calling BASH).
29432      if test "xJAVA" != xBASH; then
29433        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
29434$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
29435      fi
29436      # Try to locate tool using the code snippet
29437
29438      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29439$as_echo_n "checking for java in Boot JDK... " >&6; }
29440      JAVA=$BOOT_JDK/bin/java
29441      if test ! -x $JAVA; then
29442        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29443$as_echo "not found" >&6; }
29444        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29445$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29446        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29447      fi
29448      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29449$as_echo "ok" >&6; }
29450
29451
29452    else
29453      # If it succeeded, then it was overridden by the user. We will use it
29454      # for the tool.
29455
29456      # First remove it from the list of overridden variables, so we can test
29457      # for unknown variables in the end.
29458      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29459
29460      # Check if we try to supply an empty value
29461      if test "x$JAVA" = x; then
29462        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
29463$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
29464        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
29465$as_echo_n "checking for JAVA... " >&6; }
29466        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29467$as_echo "disabled" >&6; }
29468      else
29469        # Check if the provided tool contains a complete path.
29470        tool_specified="$JAVA"
29471        tool_basename="${tool_specified##*/}"
29472        if test "x$tool_basename" = "x$tool_specified"; then
29473          # A command without a complete path is provided, search $PATH.
29474          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
29475$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
29476          # Extract the first word of "$tool_basename", so it can be a program name with args.
29477set dummy $tool_basename; ac_word=$2
29478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29479$as_echo_n "checking for $ac_word... " >&6; }
29480if ${ac_cv_path_JAVA+:} false; then :
29481  $as_echo_n "(cached) " >&6
29482else
29483  case $JAVA in
29484  [\\/]* | ?:[\\/]*)
29485  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
29486  ;;
29487  *)
29488  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29489for as_dir in $PATH
29490do
29491  IFS=$as_save_IFS
29492  test -z "$as_dir" && as_dir=.
29493    for ac_exec_ext in '' $ac_executable_extensions; do
29494  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29495    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
29496    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29497    break 2
29498  fi
29499done
29500  done
29501IFS=$as_save_IFS
29502
29503  ;;
29504esac
29505fi
29506JAVA=$ac_cv_path_JAVA
29507if test -n "$JAVA"; then
29508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
29509$as_echo "$JAVA" >&6; }
29510else
29511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29512$as_echo "no" >&6; }
29513fi
29514
29515
29516          if test "x$JAVA" = x; then
29517            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29518          fi
29519        else
29520          # Otherwise we believe it is a complete path. Use it as it is.
29521          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
29522$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
29523          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
29524$as_echo_n "checking for JAVA... " >&6; }
29525          if test ! -x "$tool_specified"; then
29526            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29527$as_echo "not found" >&6; }
29528            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
29529          fi
29530          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29531$as_echo "$tool_specified" >&6; }
29532        fi
29533      fi
29534    fi
29535
29536  fi
29537
29538
29539
29540  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29541
29542  # Publish this variable in the help.
29543
29544
29545  if [ -z "${JAVAC+x}" ]; then
29546    # The variable is not set by user, try to locate tool using the code snippet
29547
29548      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
29549$as_echo_n "checking for javac in Boot JDK... " >&6; }
29550      JAVAC=$BOOT_JDK/bin/javac
29551      if test ! -x $JAVAC; then
29552        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29553$as_echo "not found" >&6; }
29554        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29555$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29556        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
29557      fi
29558      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29559$as_echo "ok" >&6; }
29560
29561
29562  else
29563    # The variable is set, but is it from the command line or the environment?
29564
29565    # Try to remove the string !JAVAC! from our list.
29566    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
29567    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29568      # If it failed, the variable was not from the command line. Ignore it,
29569      # but warn the user (except for BASH, which is always set by the calling BASH).
29570      if test "xJAVAC" != xBASH; then
29571        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
29572$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
29573      fi
29574      # Try to locate tool using the code snippet
29575
29576      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
29577$as_echo_n "checking for javac in Boot JDK... " >&6; }
29578      JAVAC=$BOOT_JDK/bin/javac
29579      if test ! -x $JAVAC; then
29580        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29581$as_echo "not found" >&6; }
29582        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29583$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29584        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
29585      fi
29586      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29587$as_echo "ok" >&6; }
29588
29589
29590    else
29591      # If it succeeded, then it was overridden by the user. We will use it
29592      # for the tool.
29593
29594      # First remove it from the list of overridden variables, so we can test
29595      # for unknown variables in the end.
29596      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29597
29598      # Check if we try to supply an empty value
29599      if test "x$JAVAC" = x; then
29600        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
29601$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
29602        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
29603$as_echo_n "checking for JAVAC... " >&6; }
29604        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29605$as_echo "disabled" >&6; }
29606      else
29607        # Check if the provided tool contains a complete path.
29608        tool_specified="$JAVAC"
29609        tool_basename="${tool_specified##*/}"
29610        if test "x$tool_basename" = "x$tool_specified"; then
29611          # A command without a complete path is provided, search $PATH.
29612          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
29613$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
29614          # Extract the first word of "$tool_basename", so it can be a program name with args.
29615set dummy $tool_basename; ac_word=$2
29616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29617$as_echo_n "checking for $ac_word... " >&6; }
29618if ${ac_cv_path_JAVAC+:} false; then :
29619  $as_echo_n "(cached) " >&6
29620else
29621  case $JAVAC in
29622  [\\/]* | ?:[\\/]*)
29623  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
29624  ;;
29625  *)
29626  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29627for as_dir in $PATH
29628do
29629  IFS=$as_save_IFS
29630  test -z "$as_dir" && as_dir=.
29631    for ac_exec_ext in '' $ac_executable_extensions; do
29632  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29633    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
29634    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29635    break 2
29636  fi
29637done
29638  done
29639IFS=$as_save_IFS
29640
29641  ;;
29642esac
29643fi
29644JAVAC=$ac_cv_path_JAVAC
29645if test -n "$JAVAC"; then
29646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
29647$as_echo "$JAVAC" >&6; }
29648else
29649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29650$as_echo "no" >&6; }
29651fi
29652
29653
29654          if test "x$JAVAC" = x; then
29655            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29656          fi
29657        else
29658          # Otherwise we believe it is a complete path. Use it as it is.
29659          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
29660$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
29661          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
29662$as_echo_n "checking for JAVAC... " >&6; }
29663          if test ! -x "$tool_specified"; then
29664            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29665$as_echo "not found" >&6; }
29666            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
29667          fi
29668          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29669$as_echo "$tool_specified" >&6; }
29670        fi
29671      fi
29672    fi
29673
29674  fi
29675
29676
29677
29678  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29679
29680  # Publish this variable in the help.
29681
29682
29683  if [ -z "${JAVAH+x}" ]; then
29684    # The variable is not set by user, try to locate tool using the code snippet
29685
29686      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
29687$as_echo_n "checking for javah in Boot JDK... " >&6; }
29688      JAVAH=$BOOT_JDK/bin/javah
29689      if test ! -x $JAVAH; then
29690        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29691$as_echo "not found" >&6; }
29692        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29693$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29694        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
29695      fi
29696      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29697$as_echo "ok" >&6; }
29698
29699
29700  else
29701    # The variable is set, but is it from the command line or the environment?
29702
29703    # Try to remove the string !JAVAH! from our list.
29704    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
29705    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29706      # If it failed, the variable was not from the command line. Ignore it,
29707      # but warn the user (except for BASH, which is always set by the calling BASH).
29708      if test "xJAVAH" != xBASH; then
29709        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
29710$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
29711      fi
29712      # Try to locate tool using the code snippet
29713
29714      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
29715$as_echo_n "checking for javah in Boot JDK... " >&6; }
29716      JAVAH=$BOOT_JDK/bin/javah
29717      if test ! -x $JAVAH; then
29718        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29719$as_echo "not found" >&6; }
29720        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29721$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29722        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
29723      fi
29724      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29725$as_echo "ok" >&6; }
29726
29727
29728    else
29729      # If it succeeded, then it was overridden by the user. We will use it
29730      # for the tool.
29731
29732      # First remove it from the list of overridden variables, so we can test
29733      # for unknown variables in the end.
29734      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29735
29736      # Check if we try to supply an empty value
29737      if test "x$JAVAH" = x; then
29738        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
29739$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
29740        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
29741$as_echo_n "checking for JAVAH... " >&6; }
29742        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29743$as_echo "disabled" >&6; }
29744      else
29745        # Check if the provided tool contains a complete path.
29746        tool_specified="$JAVAH"
29747        tool_basename="${tool_specified##*/}"
29748        if test "x$tool_basename" = "x$tool_specified"; then
29749          # A command without a complete path is provided, search $PATH.
29750          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
29751$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
29752          # Extract the first word of "$tool_basename", so it can be a program name with args.
29753set dummy $tool_basename; ac_word=$2
29754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29755$as_echo_n "checking for $ac_word... " >&6; }
29756if ${ac_cv_path_JAVAH+:} false; then :
29757  $as_echo_n "(cached) " >&6
29758else
29759  case $JAVAH in
29760  [\\/]* | ?:[\\/]*)
29761  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
29762  ;;
29763  *)
29764  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29765for as_dir in $PATH
29766do
29767  IFS=$as_save_IFS
29768  test -z "$as_dir" && as_dir=.
29769    for ac_exec_ext in '' $ac_executable_extensions; do
29770  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29771    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
29772    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29773    break 2
29774  fi
29775done
29776  done
29777IFS=$as_save_IFS
29778
29779  ;;
29780esac
29781fi
29782JAVAH=$ac_cv_path_JAVAH
29783if test -n "$JAVAH"; then
29784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
29785$as_echo "$JAVAH" >&6; }
29786else
29787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29788$as_echo "no" >&6; }
29789fi
29790
29791
29792          if test "x$JAVAH" = x; then
29793            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29794          fi
29795        else
29796          # Otherwise we believe it is a complete path. Use it as it is.
29797          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
29798$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
29799          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
29800$as_echo_n "checking for JAVAH... " >&6; }
29801          if test ! -x "$tool_specified"; then
29802            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29803$as_echo "not found" >&6; }
29804            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
29805          fi
29806          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29807$as_echo "$tool_specified" >&6; }
29808        fi
29809      fi
29810    fi
29811
29812  fi
29813
29814
29815
29816  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29817
29818  # Publish this variable in the help.
29819
29820
29821  if [ -z "${JAR+x}" ]; then
29822    # The variable is not set by user, try to locate tool using the code snippet
29823
29824      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
29825$as_echo_n "checking for jar in Boot JDK... " >&6; }
29826      JAR=$BOOT_JDK/bin/jar
29827      if test ! -x $JAR; then
29828        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29829$as_echo "not found" >&6; }
29830        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29831$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29832        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
29833      fi
29834      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29835$as_echo "ok" >&6; }
29836
29837
29838  else
29839    # The variable is set, but is it from the command line or the environment?
29840
29841    # Try to remove the string !JAR! from our list.
29842    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
29843    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29844      # If it failed, the variable was not from the command line. Ignore it,
29845      # but warn the user (except for BASH, which is always set by the calling BASH).
29846      if test "xJAR" != xBASH; then
29847        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
29848$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
29849      fi
29850      # Try to locate tool using the code snippet
29851
29852      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
29853$as_echo_n "checking for jar in Boot JDK... " >&6; }
29854      JAR=$BOOT_JDK/bin/jar
29855      if test ! -x $JAR; then
29856        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29857$as_echo "not found" >&6; }
29858        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29859$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29860        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
29861      fi
29862      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29863$as_echo "ok" >&6; }
29864
29865
29866    else
29867      # If it succeeded, then it was overridden by the user. We will use it
29868      # for the tool.
29869
29870      # First remove it from the list of overridden variables, so we can test
29871      # for unknown variables in the end.
29872      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29873
29874      # Check if we try to supply an empty value
29875      if test "x$JAR" = x; then
29876        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
29877$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
29878        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
29879$as_echo_n "checking for JAR... " >&6; }
29880        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29881$as_echo "disabled" >&6; }
29882      else
29883        # Check if the provided tool contains a complete path.
29884        tool_specified="$JAR"
29885        tool_basename="${tool_specified##*/}"
29886        if test "x$tool_basename" = "x$tool_specified"; then
29887          # A command without a complete path is provided, search $PATH.
29888          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
29889$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
29890          # Extract the first word of "$tool_basename", so it can be a program name with args.
29891set dummy $tool_basename; ac_word=$2
29892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29893$as_echo_n "checking for $ac_word... " >&6; }
29894if ${ac_cv_path_JAR+:} false; then :
29895  $as_echo_n "(cached) " >&6
29896else
29897  case $JAR in
29898  [\\/]* | ?:[\\/]*)
29899  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
29900  ;;
29901  *)
29902  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29903for as_dir in $PATH
29904do
29905  IFS=$as_save_IFS
29906  test -z "$as_dir" && as_dir=.
29907    for ac_exec_ext in '' $ac_executable_extensions; do
29908  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29909    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
29910    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29911    break 2
29912  fi
29913done
29914  done
29915IFS=$as_save_IFS
29916
29917  ;;
29918esac
29919fi
29920JAR=$ac_cv_path_JAR
29921if test -n "$JAR"; then
29922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
29923$as_echo "$JAR" >&6; }
29924else
29925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29926$as_echo "no" >&6; }
29927fi
29928
29929
29930          if test "x$JAR" = x; then
29931            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29932          fi
29933        else
29934          # Otherwise we believe it is a complete path. Use it as it is.
29935          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
29936$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
29937          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
29938$as_echo_n "checking for JAR... " >&6; }
29939          if test ! -x "$tool_specified"; then
29940            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29941$as_echo "not found" >&6; }
29942            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
29943          fi
29944          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29945$as_echo "$tool_specified" >&6; }
29946        fi
29947      fi
29948    fi
29949
29950  fi
29951
29952
29953
29954  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29955
29956  # Publish this variable in the help.
29957
29958
29959  if [ -z "${JARSIGNER+x}" ]; then
29960    # The variable is not set by user, try to locate tool using the code snippet
29961
29962      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
29963$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
29964      JARSIGNER=$BOOT_JDK/bin/jarsigner
29965      if test ! -x $JARSIGNER; then
29966        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29967$as_echo "not found" >&6; }
29968        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29969$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29970        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
29971      fi
29972      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29973$as_echo "ok" >&6; }
29974
29975
29976  else
29977    # The variable is set, but is it from the command line or the environment?
29978
29979    # Try to remove the string !JARSIGNER! from our list.
29980    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
29981    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29982      # If it failed, the variable was not from the command line. Ignore it,
29983      # but warn the user (except for BASH, which is always set by the calling BASH).
29984      if test "xJARSIGNER" != xBASH; then
29985        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
29986$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
29987      fi
29988      # Try to locate tool using the code snippet
29989
29990      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
29991$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
29992      JARSIGNER=$BOOT_JDK/bin/jarsigner
29993      if test ! -x $JARSIGNER; then
29994        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29995$as_echo "not found" >&6; }
29996        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29997$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29998        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
29999      fi
30000      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30001$as_echo "ok" >&6; }
30002
30003
30004    else
30005      # If it succeeded, then it was overridden by the user. We will use it
30006      # for the tool.
30007
30008      # First remove it from the list of overridden variables, so we can test
30009      # for unknown variables in the end.
30010      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30011
30012      # Check if we try to supply an empty value
30013      if test "x$JARSIGNER" = x; then
30014        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
30015$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
30016        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30017$as_echo_n "checking for JARSIGNER... " >&6; }
30018        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30019$as_echo "disabled" >&6; }
30020      else
30021        # Check if the provided tool contains a complete path.
30022        tool_specified="$JARSIGNER"
30023        tool_basename="${tool_specified##*/}"
30024        if test "x$tool_basename" = "x$tool_specified"; then
30025          # A command without a complete path is provided, search $PATH.
30026          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
30027$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
30028          # Extract the first word of "$tool_basename", so it can be a program name with args.
30029set dummy $tool_basename; ac_word=$2
30030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30031$as_echo_n "checking for $ac_word... " >&6; }
30032if ${ac_cv_path_JARSIGNER+:} false; then :
30033  $as_echo_n "(cached) " >&6
30034else
30035  case $JARSIGNER in
30036  [\\/]* | ?:[\\/]*)
30037  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
30038  ;;
30039  *)
30040  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30041for as_dir in $PATH
30042do
30043  IFS=$as_save_IFS
30044  test -z "$as_dir" && as_dir=.
30045    for ac_exec_ext in '' $ac_executable_extensions; do
30046  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30047    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
30048    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30049    break 2
30050  fi
30051done
30052  done
30053IFS=$as_save_IFS
30054
30055  ;;
30056esac
30057fi
30058JARSIGNER=$ac_cv_path_JARSIGNER
30059if test -n "$JARSIGNER"; then
30060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
30061$as_echo "$JARSIGNER" >&6; }
30062else
30063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30064$as_echo "no" >&6; }
30065fi
30066
30067
30068          if test "x$JARSIGNER" = x; then
30069            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30070          fi
30071        else
30072          # Otherwise we believe it is a complete path. Use it as it is.
30073          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
30074$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
30075          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30076$as_echo_n "checking for JARSIGNER... " >&6; }
30077          if test ! -x "$tool_specified"; then
30078            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30079$as_echo "not found" >&6; }
30080            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
30081          fi
30082          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30083$as_echo "$tool_specified" >&6; }
30084        fi
30085      fi
30086    fi
30087
30088  fi
30089
30090
30091
30092  # Finally, set some other options...
30093
30094  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
30095  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
30096
30097
30098
30099  $ECHO "Check if jvm arg is ok: -Xpatch:foo=bar" >&5
30100  $ECHO "Command: $JAVA -Xpatch:foo=bar -version" >&5
30101  OUTPUT=`$JAVA -Xpatch:foo=bar -version 2>&1`
30102  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
30103  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
30104  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30105    dummy="$dummy -Xpatch:foo=bar"
30106    JVM_ARG_OK=true
30107  else
30108    $ECHO "Arg failed:" >&5
30109    $ECHO "$OUTPUT" >&5
30110    JVM_ARG_OK=false
30111  fi
30112
30113  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
30114$as_echo_n "checking if Boot JDK supports modules... " >&6; }
30115  if test "x$JVM_ARG_OK" = "xtrue"; then
30116    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30117$as_echo "yes" >&6; }
30118    BOOT_JDK_MODULAR="true"
30119  else
30120    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30121$as_echo "no" >&6; }
30122    BOOT_JDK_MODULAR="false"
30123  fi
30124
30125
30126
30127
30128  # Check if the boot jdk is 32 or 64 bit
30129  if "$JAVA" -d64 -version > /dev/null 2>&1; then
30130    BOOT_JDK_BITS="64"
30131  else
30132    BOOT_JDK_BITS="32"
30133  fi
30134  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
30135$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
30136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
30137$as_echo "$BOOT_JDK_BITS" >&6; }
30138
30139
30140
30141
30142# Check whether --with-build-jdk was given.
30143if test "${with_build_jdk+set}" = set; then :
30144  withval=$with_build_jdk;
30145fi
30146
30147
30148  CREATE_BUILDJDK_FOR_HOST=false
30149  BUILD_JDK_FOUND="no"
30150  if test "x$with_build_jdk" != "x"; then
30151
30152  if test "x$BUILD_JDK_FOUND" = xno; then
30153    # Execute the test
30154
30155       if test "x$with_build_jdk" != x; then
30156         BUILD_JDK=$with_build_jdk
30157         BUILD_JDK_FOUND=maybe
30158         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
30159$as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
30160       fi
30161
30162    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30163    if test "x$BUILD_JDK_FOUND" = xmaybe; then
30164      # Do we have a bin/java?
30165      if test ! -x "$BUILD_JDK/bin/java"; then
30166        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
30167$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
30168        BUILD_JDK_FOUND=no
30169      elif test ! -x "$BUILD_JDK/bin/jlink"; then
30170        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
30171$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
30172        BUILD_JDK_FOUND=no
30173      elif test ! -x "$BUILD_JDK/bin/javac"; then
30174        # Do we have a bin/javac?
30175        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
30176$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
30177        { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
30178$as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
30179        BUILD_JDK_FOUND=no
30180      else
30181        # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30182        BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | head -n 1`
30183
30184        # Extra M4 quote needed to protect [] in grep expression.
30185        FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
30186        if test "x$FOUND_CORRECT_VERSION" = x; then
30187          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
30188$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
30189          { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
30190$as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
30191          BUILD_JDK_FOUND=no
30192        else
30193          # We're done!
30194          BUILD_JDK_FOUND=yes
30195
30196  # Only process if variable expands to non-empty
30197
30198  if test "x$BUILD_JDK" != x; then
30199    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30200
30201  # Input might be given as Windows format, start by converting to
30202  # unix format.
30203  path="$BUILD_JDK"
30204  new_path=`$CYGPATH -u "$path"`
30205
30206  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30207  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30208  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30209  # "foo.exe" is OK but "foo" is an error.
30210  #
30211  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30212  # It is also a way to make sure we got the proper file name for the real test later on.
30213  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30214  if test "x$test_shortpath" = x; then
30215    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30216$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30217    as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
30218  fi
30219
30220  # Call helper function which possibly converts this using DOS-style short mode.
30221  # If so, the updated path is stored in $new_path.
30222
30223  input_path="$new_path"
30224  # Check if we need to convert this using DOS-style short mode. If the path
30225  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30226  # take no chances and rewrite it.
30227  # Note: m4 eats our [], so we need to use [ and ] instead.
30228  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30229  if test "x$has_forbidden_chars" != x; then
30230    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30231    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30232    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30233    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30234      # Going to short mode and back again did indeed matter. Since short mode is
30235      # case insensitive, let's make it lowercase to improve readability.
30236      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30237      # Now convert it back to Unix-style (cygpath)
30238      input_path=`$CYGPATH -u "$shortmode_path"`
30239      new_path="$input_path"
30240    fi
30241  fi
30242
30243  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30244  if test "x$test_cygdrive_prefix" = x; then
30245    # As a simple fix, exclude /usr/bin since it's not a real path.
30246    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30247      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30248      # a path prefixed by /cygdrive for fixpath to work.
30249      new_path="$CYGWIN_ROOT_PATH$input_path"
30250    fi
30251  fi
30252
30253
30254  if test "x$path" != "x$new_path"; then
30255    BUILD_JDK="$new_path"
30256    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30257$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30258  fi
30259
30260    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30261
30262  path="$BUILD_JDK"
30263  has_colon=`$ECHO $path | $GREP ^.:`
30264  new_path="$path"
30265  if test "x$has_colon" = x; then
30266    # Not in mixed or Windows style, start by that.
30267    new_path=`cmd //c echo $path`
30268  fi
30269
30270
30271  input_path="$new_path"
30272  # Check if we need to convert this using DOS-style short mode. If the path
30273  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30274  # take no chances and rewrite it.
30275  # Note: m4 eats our [], so we need to use [ and ] instead.
30276  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30277  if test "x$has_forbidden_chars" != x; then
30278    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30279    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30280  fi
30281
30282
30283  windows_path="$new_path"
30284  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30285    unix_path=`$CYGPATH -u "$windows_path"`
30286    new_path="$unix_path"
30287  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30288    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30289    new_path="$unix_path"
30290  fi
30291
30292  if test "x$path" != "x$new_path"; then
30293    BUILD_JDK="$new_path"
30294    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30295$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30296  fi
30297
30298  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30299  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30300
30301    else
30302      # We're on a unix platform. Hooray! :)
30303      path="$BUILD_JDK"
30304      has_space=`$ECHO "$path" | $GREP " "`
30305      if test "x$has_space" != x; then
30306        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30307$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30308        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30309      fi
30310
30311      # Use eval to expand a potential ~
30312      eval path="$path"
30313      if test ! -f "$path" && test ! -d "$path"; then
30314        as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30315      fi
30316
30317      if test -d "$path"; then
30318        BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
30319      else
30320        dir="`$DIRNAME "$path"`"
30321        base="`$BASENAME "$path"`"
30322        BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30323      fi
30324    fi
30325  fi
30326
30327          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30328$as_echo_n "checking for Build JDK... " >&6; }
30329          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
30330$as_echo "$BUILD_JDK" >&6; }
30331          { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
30332$as_echo_n "checking Build JDK version... " >&6; }
30333          BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30334          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
30335$as_echo "$BUILD_JDK_VERSION" >&6; }
30336        fi # end check jdk version
30337      fi # end check java
30338    fi # end check build jdk found
30339  fi
30340
30341  else
30342    if test "x$COMPILE_TYPE" = "xcross"; then
30343      BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
30344      BUILD_JDK_FOUND=yes
30345      CREATE_BUILDJDK=true
30346      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30347$as_echo_n "checking for Build JDK... " >&6; }
30348      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
30349$as_echo "yes, will build it for the host platform" >&6; }
30350    else
30351      BUILD_JDK="\$(JDK_OUTPUTDIR)"
30352      BUILD_JDK_FOUND=yes
30353      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30354$as_echo_n "checking for Build JDK... " >&6; }
30355      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
30356$as_echo "yes, will use output dir" >&6; }
30357    fi
30358  fi
30359
30360  if test "x$BUILD_JDK_FOUND" != "xyes"; then
30361    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30362$as_echo_n "checking for Build JDK... " >&6; }
30363    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30364$as_echo "no" >&6; }
30365    as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
30366  fi
30367
30368
30369
30370
30371
30372###############################################################################
30373#
30374# Configure the sources to use. We can add or override individual directories.
30375#
30376###############################################################################
30377
30378
30379  # Where are the sources.
30380  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
30381  CORBA_TOPDIR="$SRC_ROOT/corba"
30382  JAXP_TOPDIR="$SRC_ROOT/jaxp"
30383  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
30384  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
30385  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
30386  JDK_TOPDIR="$SRC_ROOT/jdk"
30387
30388
30389
30390
30391
30392
30393
30394
30395
30396  # This feature is no longer supported.
30397
30398
30399
30400# Check whether --with-add-source-root was given.
30401if test "${with_add_source_root+set}" = set; then :
30402  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
30403$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
30404fi
30405
30406
30407
30408
30409# Check whether --with-override-source-root was given.
30410if test "${with_override_source_root+set}" = set; then :
30411  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
30412$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
30413fi
30414
30415
30416
30417
30418# Check whether --with-adds-and-overrides was given.
30419if test "${with_adds_and_overrides+set}" = set; then :
30420  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
30421$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
30422fi
30423
30424
30425
30426
30427# Check whether --with-override-langtools was given.
30428if test "${with_override_langtools+set}" = set; then :
30429  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
30430$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
30431fi
30432
30433
30434
30435
30436# Check whether --with-override-corba was given.
30437if test "${with_override_corba+set}" = set; then :
30438  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
30439$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
30440fi
30441
30442
30443
30444
30445# Check whether --with-override-jaxp was given.
30446if test "${with_override_jaxp+set}" = set; then :
30447  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
30448$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
30449fi
30450
30451
30452
30453
30454# Check whether --with-override-jaxws was given.
30455if test "${with_override_jaxws+set}" = set; then :
30456  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
30457$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
30458fi
30459
30460
30461
30462
30463# Check whether --with-override-hotspot was given.
30464if test "${with_override_hotspot+set}" = set; then :
30465  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
30466$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
30467fi
30468
30469
30470
30471
30472# Check whether --with-override-nashorn was given.
30473if test "${with_override_nashorn+set}" = set; then :
30474  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
30475$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
30476fi
30477
30478
30479
30480
30481# Check whether --with-override-jdk was given.
30482if test "${with_override_jdk+set}" = set; then :
30483  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
30484$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
30485fi
30486
30487
30488
30489
30490  BUILD_OUTPUT="$OUTPUT_ROOT"
30491
30492
30493  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
30494  BUILD_HOTSPOT=true
30495
30496
30497
30498# Check whether --with-import-hotspot was given.
30499if test "${with_import_hotspot+set}" = set; then :
30500  withval=$with_import_hotspot;
30501fi
30502
30503  if test "x$with_import_hotspot" != x; then
30504    CURDIR="$PWD"
30505    cd "$with_import_hotspot"
30506    HOTSPOT_DIST="`pwd`"
30507    cd "$CURDIR"
30508    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
30509      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
30510    fi
30511    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
30512$as_echo_n "checking if hotspot should be imported... " >&6; }
30513    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
30514$as_echo "yes from $HOTSPOT_DIST" >&6; }
30515    BUILD_HOTSPOT=false
30516  fi
30517
30518  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
30519
30520
30521
30522
30523# Check whether --with-import-modules was given.
30524if test "${with_import_modules+set}" = set; then :
30525  withval=$with_import_modules;
30526fi
30527
30528
30529  if test "x$with_import_modules" != x \
30530      && test "x$with_import_modules" != "xno"; then
30531    if test -d "$with_import_modules"; then
30532      IMPORT_MODULES_TOPDIR="$with_import_modules"
30533
30534  # Only process if variable expands to non-empty
30535
30536  if test "x$IMPORT_MODULES_TOPDIR" != x; then
30537    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30538
30539  # Input might be given as Windows format, start by converting to
30540  # unix format.
30541  path="$IMPORT_MODULES_TOPDIR"
30542  new_path=`$CYGPATH -u "$path"`
30543
30544  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30545  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30546  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30547  # "foo.exe" is OK but "foo" is an error.
30548  #
30549  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30550  # It is also a way to make sure we got the proper file name for the real test later on.
30551  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30552  if test "x$test_shortpath" = x; then
30553    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
30554$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
30555    as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
30556  fi
30557
30558  # Call helper function which possibly converts this using DOS-style short mode.
30559  # If so, the updated path is stored in $new_path.
30560
30561  input_path="$new_path"
30562  # Check if we need to convert this using DOS-style short mode. If the path
30563  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30564  # take no chances and rewrite it.
30565  # Note: m4 eats our [], so we need to use [ and ] instead.
30566  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30567  if test "x$has_forbidden_chars" != x; then
30568    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30569    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30570    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30571    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30572      # Going to short mode and back again did indeed matter. Since short mode is
30573      # case insensitive, let's make it lowercase to improve readability.
30574      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30575      # Now convert it back to Unix-style (cygpath)
30576      input_path=`$CYGPATH -u "$shortmode_path"`
30577      new_path="$input_path"
30578    fi
30579  fi
30580
30581  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30582  if test "x$test_cygdrive_prefix" = x; then
30583    # As a simple fix, exclude /usr/bin since it's not a real path.
30584    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30585      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30586      # a path prefixed by /cygdrive for fixpath to work.
30587      new_path="$CYGWIN_ROOT_PATH$input_path"
30588    fi
30589  fi
30590
30591
30592  if test "x$path" != "x$new_path"; then
30593    IMPORT_MODULES_TOPDIR="$new_path"
30594    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
30595$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
30596  fi
30597
30598    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30599
30600  path="$IMPORT_MODULES_TOPDIR"
30601  has_colon=`$ECHO $path | $GREP ^.:`
30602  new_path="$path"
30603  if test "x$has_colon" = x; then
30604    # Not in mixed or Windows style, start by that.
30605    new_path=`cmd //c echo $path`
30606  fi
30607
30608
30609  input_path="$new_path"
30610  # Check if we need to convert this using DOS-style short mode. If the path
30611  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30612  # take no chances and rewrite it.
30613  # Note: m4 eats our [], so we need to use [ and ] instead.
30614  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30615  if test "x$has_forbidden_chars" != x; then
30616    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30617    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30618  fi
30619
30620
30621  windows_path="$new_path"
30622  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30623    unix_path=`$CYGPATH -u "$windows_path"`
30624    new_path="$unix_path"
30625  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30626    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30627    new_path="$unix_path"
30628  fi
30629
30630  if test "x$path" != "x$new_path"; then
30631    IMPORT_MODULES_TOPDIR="$new_path"
30632    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
30633$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
30634  fi
30635
30636  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30637  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30638
30639    else
30640      # We're on a unix platform. Hooray! :)
30641      path="$IMPORT_MODULES_TOPDIR"
30642      has_space=`$ECHO "$path" | $GREP " "`
30643      if test "x$has_space" != x; then
30644        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
30645$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
30646        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30647      fi
30648
30649      # Use eval to expand a potential ~
30650      eval path="$path"
30651      if test ! -f "$path" && test ! -d "$path"; then
30652        as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
30653      fi
30654
30655      if test -d "$path"; then
30656        IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
30657      else
30658        dir="`$DIRNAME "$path"`"
30659        base="`$BASENAME "$path"`"
30660        IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
30661      fi
30662    fi
30663  fi
30664
30665    elif test -e "$with_import_modules"; then
30666      IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
30667      $RM -rf "$IMPORT_MODULES_TOPDIR"
30668      $MKDIR -p "$IMPORT_MODULES_TOPDIR"
30669      if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
30670        as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
30671      fi
30672    else
30673      as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
30674    fi
30675  fi
30676
30677  if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
30678    IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
30679  fi
30680  if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
30681    IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
30682  fi
30683  if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
30684    IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
30685  fi
30686  if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
30687    IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
30688  fi
30689  if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
30690    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
30691  fi
30692  if test -d "$IMPORT_MODULES_TOPDIR/make"; then
30693    IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
30694  fi
30695
30696
30697
30698
30699
30700
30701
30702
30703
30704###############################################################################
30705#
30706# Setup the toolchain (compilers etc), i.e. tools used to compile and process
30707# native code.
30708#
30709###############################################################################
30710
30711# See if we are doing a complete static build or not
30712
30713  # Check whether --enable-static-build was given.
30714if test "${enable_static_build+set}" = set; then :
30715  enableval=$enable_static_build;
30716fi
30717
30718  STATIC_BUILD=false
30719  if test "x$enable_static_build" = "xyes"; then
30720    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
30721$as_echo_n "checking if static build is enabled... " >&6; }
30722    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30723$as_echo "yes" >&6; }
30724    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
30725      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
30726    fi
30727    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
30728    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
30729    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
30730    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
30731    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
30732    STATIC_BUILD=true
30733  elif test "x$enable_static_build" = "xno"; then
30734    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
30735$as_echo_n "checking if static build is enabled... " >&6; }
30736    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30737$as_echo "no" >&6; }
30738  elif test "x$enable_static_build" != "x"; then
30739    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
30740  fi
30741
30742
30743
30744
30745# First determine the toolchain type (compiler family)
30746
30747
30748# Check whether --with-toolchain-type was given.
30749if test "${with_toolchain_type+set}" = set; then :
30750  withval=$with_toolchain_type;
30751fi
30752
30753
30754  # Use indirect variable referencing
30755  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
30756  VALID_TOOLCHAINS=${!toolchain_var_name}
30757
30758  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30759    if test -n "$XCODEBUILD"; then
30760      # On Mac OS X, default toolchain to clang after Xcode 5
30761      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
30762      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
30763      if test $? -ne 0; then
30764        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
30765      fi
30766      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
30767          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
30768          $CUT -f 1 -d .`
30769      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
30770$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
30771      if test $XCODE_MAJOR_VERSION -ge 5; then
30772          DEFAULT_TOOLCHAIN="clang"
30773      else
30774          DEFAULT_TOOLCHAIN="gcc"
30775      fi
30776    else
30777      # If Xcode is not installed, but the command line tools are
30778      # then we can't run xcodebuild. On these systems we should
30779      # default to clang
30780      DEFAULT_TOOLCHAIN="clang"
30781    fi
30782  else
30783    # First toolchain type in the list is the default
30784    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
30785  fi
30786
30787  if test "x$with_toolchain_type" = xlist; then
30788    # List all toolchains
30789    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
30790$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
30791    for toolchain in $VALID_TOOLCHAINS; do
30792      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
30793      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
30794      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
30795    done
30796
30797    exit 0
30798  elif test "x$with_toolchain_type" != x; then
30799    # User override; check that it is valid
30800    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
30801      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
30802$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
30803      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
30804$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
30805      as_fn_error $? "Cannot continue." "$LINENO" 5
30806    fi
30807    TOOLCHAIN_TYPE=$with_toolchain_type
30808  else
30809    # No flag given, use default
30810    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
30811  fi
30812
30813
30814  TOOLCHAIN_CC_BINARY_clang="clang"
30815  TOOLCHAIN_CC_BINARY_gcc="gcc"
30816  TOOLCHAIN_CC_BINARY_microsoft="cl"
30817  TOOLCHAIN_CC_BINARY_solstudio="cc"
30818  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
30819
30820  TOOLCHAIN_CXX_BINARY_clang="clang++"
30821  TOOLCHAIN_CXX_BINARY_gcc="g++"
30822  TOOLCHAIN_CXX_BINARY_microsoft="cl"
30823  TOOLCHAIN_CXX_BINARY_solstudio="CC"
30824  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
30825
30826  # Use indirect variable referencing
30827  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
30828  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
30829  toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
30830  TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
30831  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
30832  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
30833  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
30834  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
30835
30836
30837  # Define filename patterns
30838  if test "x$OPENJDK_TARGET_OS" = xwindows; then
30839    LIBRARY_PREFIX=
30840    SHARED_LIBRARY_SUFFIX='.dll'
30841    STATIC_LIBRARY_SUFFIX='.lib'
30842    SHARED_LIBRARY='$1.dll'
30843    STATIC_LIBRARY='$1.lib'
30844    OBJ_SUFFIX='.obj'
30845    EXE_SUFFIX='.exe'
30846  else
30847    LIBRARY_PREFIX=lib
30848    SHARED_LIBRARY_SUFFIX='.so'
30849    STATIC_LIBRARY_SUFFIX='.a'
30850    SHARED_LIBRARY='lib$1.so'
30851    STATIC_LIBRARY='lib$1.a'
30852    OBJ_SUFFIX='.o'
30853    EXE_SUFFIX=''
30854    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30855      # For full static builds, we're overloading the SHARED_LIBRARY
30856      # variables in order to limit the amount of changes required.
30857      # It would be better to remove SHARED and just use LIBRARY and
30858      # LIBRARY_SUFFIX for libraries that can be built either
30859      # shared or static and use STATIC_* for libraries that are
30860      # always built statically.
30861      if test "x$STATIC_BUILD" = xtrue; then
30862        SHARED_LIBRARY='lib$1.a'
30863        SHARED_LIBRARY_SUFFIX='.a'
30864      else
30865        SHARED_LIBRARY='lib$1.dylib'
30866        SHARED_LIBRARY_SUFFIX='.dylib'
30867      fi
30868    fi
30869  fi
30870
30871
30872
30873
30874
30875
30876
30877
30878
30879
30880  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
30881    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
30882$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
30883  else
30884    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
30885$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
30886  fi
30887
30888
30889# User supplied flags should be used when configure detects compilers
30890
30891  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
30892    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
30893$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
30894  fi
30895
30896  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
30897    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
30898$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
30899  fi
30900
30901  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
30902    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
30903$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
30904  fi
30905
30906
30907# Check whether --with-extra-cflags was given.
30908if test "${with_extra_cflags+set}" = set; then :
30909  withval=$with_extra_cflags;
30910fi
30911
30912
30913
30914# Check whether --with-extra-cxxflags was given.
30915if test "${with_extra_cxxflags+set}" = set; then :
30916  withval=$with_extra_cxxflags;
30917fi
30918
30919
30920
30921# Check whether --with-extra-ldflags was given.
30922if test "${with_extra_ldflags+set}" = set; then :
30923  withval=$with_extra_ldflags;
30924fi
30925
30926
30927  EXTRA_CFLAGS="$with_extra_cflags"
30928  EXTRA_CXXFLAGS="$with_extra_cxxflags"
30929  EXTRA_LDFLAGS="$with_extra_ldflags"
30930
30931  # Hotspot needs these set in their legacy form
30932  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
30933  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
30934  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
30935
30936
30937
30938
30939
30940
30941
30942
30943
30944  # The global CFLAGS and LDLAGS variables are used by configure tests and
30945  # should include the extra parameters
30946  CFLAGS="$EXTRA_CFLAGS"
30947  CXXFLAGS="$EXTRA_CXXFLAGS"
30948  LDFLAGS="$EXTRA_LDFLAGS"
30949  CPPFLAGS=""
30950
30951# The sysroot cflags are needed for configure to be able to run the compilers
30952
30953  if test "x$SYSROOT" != "x"; then
30954    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30955      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30956        # Solaris Studio does not have a concept of sysroot. Instead we must
30957        # make sure the default include and lib dirs are appended to each
30958        # compile and link command line. Must also add -I-xbuiltin to enable
30959        # inlining of system functions and intrinsics.
30960        SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
30961        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
30962            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
30963            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
30964      fi
30965    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
30966      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
30967      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
30968    elif test "x$TOOLCHAIN_TYPE" = xclang; then
30969      SYSROOT_CFLAGS="-isysroot $SYSROOT"
30970      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
30971    fi
30972    # Propagate the sysroot args to hotspot
30973    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
30974    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
30975    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
30976    # The global CFLAGS and LDFLAGS variables need these for configure to function
30977    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
30978    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
30979    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
30980    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
30981  fi
30982
30983  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30984    # We also need -iframework<path>/System/Library/Frameworks
30985    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
30986    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
30987    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
30988    # set this here so it doesn't have to be peppered throughout the forest
30989    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
30990    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
30991  fi
30992
30993
30994
30995
30996
30997# Then detect the actual binaries needed
30998
30999  # FIXME: Is this needed?
31000  ac_ext=cpp
31001ac_cpp='$CXXCPP $CPPFLAGS'
31002ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31003ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31004ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31005
31006
31007  # Store the CFLAGS etc passed to the configure script.
31008  ORG_CFLAGS="$CFLAGS"
31009  ORG_CXXFLAGS="$CXXFLAGS"
31010
31011  # autoconf magic only relies on PATH, so update it if tools dir is specified
31012  OLD_PATH="$PATH"
31013
31014  # On Windows, we need to detect the visual studio installation first.
31015  # This will change the PATH, but we need to keep that new PATH even
31016  # after toolchain detection is done, since the compiler (on x86) uses
31017  # it for DLL resolution in runtime.
31018  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
31019      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
31020
31021  # Store path to cygwin link.exe to help excluding it when searching for
31022  # VS linker. This must be done before changing the PATH when looking for VS.
31023  # Extract the first word of "link", so it can be a program name with args.
31024set dummy link; ac_word=$2
31025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31026$as_echo_n "checking for $ac_word... " >&6; }
31027if ${ac_cv_path_CYGWIN_LINK+:} false; then :
31028  $as_echo_n "(cached) " >&6
31029else
31030  case $CYGWIN_LINK in
31031  [\\/]* | ?:[\\/]*)
31032  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
31033  ;;
31034  *)
31035  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31036for as_dir in $PATH
31037do
31038  IFS=$as_save_IFS
31039  test -z "$as_dir" && as_dir=.
31040    for ac_exec_ext in '' $ac_executable_extensions; do
31041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31042    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
31043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31044    break 2
31045  fi
31046done
31047  done
31048IFS=$as_save_IFS
31049
31050  ;;
31051esac
31052fi
31053CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
31054if test -n "$CYGWIN_LINK"; then
31055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
31056$as_echo "$CYGWIN_LINK" >&6; }
31057else
31058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31059$as_echo "no" >&6; }
31060fi
31061
31062
31063  if test "x$CYGWIN_LINK" != x; then
31064    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
31065$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
31066    "$CYGWIN_LINK" --version > /dev/null
31067    if test $? -eq 0 ; then
31068      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31069$as_echo "yes" >&6; }
31070    else
31071      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31072$as_echo "no" >&6; }
31073      # This might be the VS linker. Don't exclude it later on.
31074      CYGWIN_LINK=""
31075    fi
31076  fi
31077
31078  # First-hand choice is to locate and run the vsvars bat file.
31079
31080
31081# Check whether --with-toolchain-version was given.
31082if test "${with_toolchain_version+set}" = set; then :
31083  withval=$with_toolchain_version;
31084fi
31085
31086
31087  if test "x$with_toolchain_version" = xlist; then
31088    # List all toolchains
31089    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
31090$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
31091    for version in $VALID_VS_VERSIONS; do
31092      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
31093      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
31094    done
31095
31096    exit 0
31097  elif test "x$DEVKIT_VS_VERSION" != x; then
31098    VS_VERSION=$DEVKIT_VS_VERSION
31099    TOOLCHAIN_VERSION=$VS_VERSION
31100    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
31101    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
31102    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
31103    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
31104    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31105    VS_PATH="$TOOLCHAIN_PATH:$PATH"
31106
31107    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
31108    # can still be exported as INCLUDE for compiler invocations without
31109    # SYSROOT_CFLAGS
31110    OLDIFS="$IFS"
31111    IFS=";"
31112    for i in $DEVKIT_VS_INCLUDE; do
31113      ipath=$i
31114
31115  unix_path="$ipath"
31116  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31117    windows_path=`$CYGPATH -m "$unix_path"`
31118    ipath="$windows_path"
31119  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31120    windows_path=`cmd //c echo $unix_path`
31121    ipath="$windows_path"
31122  fi
31123
31124      VS_INCLUDE="$VS_INCLUDE;$ipath"
31125    done
31126    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
31127    # as LIB for compiler invocations without SYSROOT_LDFLAGS
31128    for i in $DEVKIT_VS_LIB; do
31129      libpath=$i
31130
31131  unix_path="$libpath"
31132  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31133    windows_path=`$CYGPATH -m "$unix_path"`
31134    libpath="$windows_path"
31135  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31136    windows_path=`cmd //c echo $unix_path`
31137    libpath="$windows_path"
31138  fi
31139
31140      VS_LIB="$VS_LIB;$libpath"
31141    done
31142    IFS="$OLDIFS"
31143
31144    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
31145$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
31146
31147  elif test "x$with_toolchain_version" != x; then
31148    # User override; check that it is valid
31149    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
31150      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
31151$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
31152      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
31153$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
31154      as_fn_error $? "Cannot continue." "$LINENO" 5
31155    fi
31156    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
31157  else
31158    # No flag given, use default
31159    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
31160  fi
31161
31162  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
31163
31164  VS_VERSION="$VS_VERSION"
31165  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
31166  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
31167  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
31168  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
31169
31170  # When using --with-tools-dir, assume it points to the correct and default
31171  # version of Visual Studio or that --with-toolchain-version was also set.
31172  if test "x$with_tools_dir" != x; then
31173
31174  if test "x$VS_ENV_CMD" = x; then
31175    VS_VERSION="${VS_VERSION}"
31176    VS_BASE="$with_tools_dir/../.."
31177    METHOD="--with-tools-dir"
31178
31179    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31180      VCVARSFILE="vc/bin/vcvars32.bat"
31181    else
31182      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31183    fi
31184
31185
31186  windows_path="$VS_BASE"
31187  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31188    unix_path=`$CYGPATH -u "$windows_path"`
31189    VS_BASE="$unix_path"
31190  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31191    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31192    VS_BASE="$unix_path"
31193  fi
31194
31195    if test -d "$VS_BASE"; then
31196      if test -f "$VS_BASE/$VCVARSFILE"; then
31197        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31198$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31199        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31200        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31201        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31202        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31203      else
31204        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31205$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31206        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31207$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31208      fi
31209    fi
31210  fi
31211
31212
31213  if test "x$VS_ENV_CMD" = x; then
31214    VS_VERSION="${VS_VERSION}"
31215    VS_BASE="$with_tools_dir/../../.."
31216    METHOD="--with-tools-dir"
31217
31218    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31219      VCVARSFILE="vc/bin/vcvars32.bat"
31220    else
31221      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31222    fi
31223
31224
31225  windows_path="$VS_BASE"
31226  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31227    unix_path=`$CYGPATH -u "$windows_path"`
31228    VS_BASE="$unix_path"
31229  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31230    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31231    VS_BASE="$unix_path"
31232  fi
31233
31234    if test -d "$VS_BASE"; then
31235      if test -f "$VS_BASE/$VCVARSFILE"; then
31236        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31237$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31238        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31239        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31240        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31241        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31242      else
31243        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31244$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31245        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31246$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31247      fi
31248    fi
31249  fi
31250
31251    if test "x$VS_ENV_CMD" = x; then
31252      # Having specified an argument which is incorrect will produce an instant failure;
31253      # we should not go on looking
31254      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
31255$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
31256      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
31257$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
31258      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
31259$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
31260      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
31261    fi
31262  fi
31263
31264  VS_ENV_CMD=""
31265  VS_ENV_ARGS=""
31266
31267  if test "x$VS_COMNTOOLS" != x; then
31268
31269  if test "x$VS_ENV_CMD" = x; then
31270    VS_VERSION="${VS_VERSION}"
31271    VS_BASE="$VS_COMNTOOLS/../.."
31272    METHOD="$VS_COMNTOOLS_VAR variable"
31273
31274    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31275      VCVARSFILE="vc/bin/vcvars32.bat"
31276    else
31277      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31278    fi
31279
31280
31281  windows_path="$VS_BASE"
31282  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31283    unix_path=`$CYGPATH -u "$windows_path"`
31284    VS_BASE="$unix_path"
31285  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31286    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31287    VS_BASE="$unix_path"
31288  fi
31289
31290    if test -d "$VS_BASE"; then
31291      if test -f "$VS_BASE/$VCVARSFILE"; then
31292        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31293$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31294        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31295        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31296        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31297        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31298      else
31299        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31300$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31301        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31302$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31303      fi
31304    fi
31305  fi
31306
31307  fi
31308  if test "x$PROGRAMFILES" != x; then
31309
31310  if test "x$VS_ENV_CMD" = x; then
31311    VS_VERSION="${VS_VERSION}"
31312    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
31313    METHOD="well-known name"
31314
31315    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31316      VCVARSFILE="vc/bin/vcvars32.bat"
31317    else
31318      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31319    fi
31320
31321
31322  windows_path="$VS_BASE"
31323  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31324    unix_path=`$CYGPATH -u "$windows_path"`
31325    VS_BASE="$unix_path"
31326  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31327    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31328    VS_BASE="$unix_path"
31329  fi
31330
31331    if test -d "$VS_BASE"; then
31332      if test -f "$VS_BASE/$VCVARSFILE"; then
31333        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31334$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31335        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31336        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31337        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31338        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31339      else
31340        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31341$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31342        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31343$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31344      fi
31345    fi
31346  fi
31347
31348  fi
31349  # Work around the insanely named ProgramFiles(x86) env variable
31350  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
31351  if test "x$PROGRAMFILES_X86" != x; then
31352
31353  if test "x$VS_ENV_CMD" = x; then
31354    VS_VERSION="${VS_VERSION}"
31355    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
31356    METHOD="well-known name"
31357
31358    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31359      VCVARSFILE="vc/bin/vcvars32.bat"
31360    else
31361      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31362    fi
31363
31364
31365  windows_path="$VS_BASE"
31366  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31367    unix_path=`$CYGPATH -u "$windows_path"`
31368    VS_BASE="$unix_path"
31369  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31370    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31371    VS_BASE="$unix_path"
31372  fi
31373
31374    if test -d "$VS_BASE"; then
31375      if test -f "$VS_BASE/$VCVARSFILE"; then
31376        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31377$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31378        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31379        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31380        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31381        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31382      else
31383        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31384$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31385        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31386$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31387      fi
31388    fi
31389  fi
31390
31391  fi
31392
31393  if test "x$VS_ENV_CMD" = x; then
31394    VS_VERSION="${VS_VERSION}"
31395    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
31396    METHOD="well-known name"
31397
31398    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31399      VCVARSFILE="vc/bin/vcvars32.bat"
31400    else
31401      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31402    fi
31403
31404
31405  windows_path="$VS_BASE"
31406  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31407    unix_path=`$CYGPATH -u "$windows_path"`
31408    VS_BASE="$unix_path"
31409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31410    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31411    VS_BASE="$unix_path"
31412  fi
31413
31414    if test -d "$VS_BASE"; then
31415      if test -f "$VS_BASE/$VCVARSFILE"; then
31416        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31417$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31418        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31419        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31420        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31421        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31422      else
31423        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31424$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31425        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31426$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31427      fi
31428    fi
31429  fi
31430
31431
31432  if test "x$VS_ENV_CMD" = x; then
31433    VS_VERSION="${VS_VERSION}"
31434    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
31435    METHOD="well-known name"
31436
31437    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31438      VCVARSFILE="vc/bin/vcvars32.bat"
31439    else
31440      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31441    fi
31442
31443
31444  windows_path="$VS_BASE"
31445  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31446    unix_path=`$CYGPATH -u "$windows_path"`
31447    VS_BASE="$unix_path"
31448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31449    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31450    VS_BASE="$unix_path"
31451  fi
31452
31453    if test -d "$VS_BASE"; then
31454      if test -f "$VS_BASE/$VCVARSFILE"; then
31455        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31456$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31457        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31458        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31459        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31460        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31461      else
31462        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31463$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31464        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31465$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31466      fi
31467    fi
31468  fi
31469
31470
31471  if test "x$SDK_INSTALL_DIR" != x; then
31472    if test "x$ProgramW6432" != x; then
31473
31474  if test "x$VS_ENV_CMD" = x; then
31475    VS_VERSION="${VS_VERSION}"
31476    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
31477    METHOD="well-known name"
31478
31479  windows_path="$WIN_SDK_BASE"
31480  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31481    unix_path=`$CYGPATH -u "$windows_path"`
31482    WIN_SDK_BASE="$unix_path"
31483  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31484    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31485    WIN_SDK_BASE="$unix_path"
31486  fi
31487
31488    if test -d "$WIN_SDK_BASE"; then
31489      # There have been cases of partial or broken SDK installations. A missing
31490      # lib dir is not going to work.
31491      if test ! -d "$WIN_SDK_BASE/lib"; then
31492        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31493$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31494        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31495$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31496      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31497        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31498$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31499        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31500        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31501          VS_ENV_ARGS="/x86"
31502        else
31503          VS_ENV_ARGS="/x64"
31504        fi
31505        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31506        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31507        # TODO: improve detection for other versions of SDK
31508        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31509      else
31510        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31511$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31512        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31513$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31514      fi
31515    fi
31516  fi
31517
31518    fi
31519    if test "x$PROGRAMW6432" != x; then
31520
31521  if test "x$VS_ENV_CMD" = x; then
31522    VS_VERSION="${VS_VERSION}"
31523    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
31524    METHOD="well-known name"
31525
31526  windows_path="$WIN_SDK_BASE"
31527  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31528    unix_path=`$CYGPATH -u "$windows_path"`
31529    WIN_SDK_BASE="$unix_path"
31530  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31531    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31532    WIN_SDK_BASE="$unix_path"
31533  fi
31534
31535    if test -d "$WIN_SDK_BASE"; then
31536      # There have been cases of partial or broken SDK installations. A missing
31537      # lib dir is not going to work.
31538      if test ! -d "$WIN_SDK_BASE/lib"; then
31539        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31540$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31541        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31542$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31543      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31544        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31545$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31546        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31547        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31548          VS_ENV_ARGS="/x86"
31549        else
31550          VS_ENV_ARGS="/x64"
31551        fi
31552        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31553        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31554        # TODO: improve detection for other versions of SDK
31555        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31556      else
31557        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31558$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31559        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31560$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31561      fi
31562    fi
31563  fi
31564
31565    fi
31566    if test "x$PROGRAMFILES" != x; then
31567
31568  if test "x$VS_ENV_CMD" = x; then
31569    VS_VERSION="${VS_VERSION}"
31570    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
31571    METHOD="well-known name"
31572
31573  windows_path="$WIN_SDK_BASE"
31574  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31575    unix_path=`$CYGPATH -u "$windows_path"`
31576    WIN_SDK_BASE="$unix_path"
31577  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31578    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31579    WIN_SDK_BASE="$unix_path"
31580  fi
31581
31582    if test -d "$WIN_SDK_BASE"; then
31583      # There have been cases of partial or broken SDK installations. A missing
31584      # lib dir is not going to work.
31585      if test ! -d "$WIN_SDK_BASE/lib"; then
31586        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31587$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31588        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31589$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31590      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31591        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31592$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31593        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31594        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31595          VS_ENV_ARGS="/x86"
31596        else
31597          VS_ENV_ARGS="/x64"
31598        fi
31599        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31600        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31601        # TODO: improve detection for other versions of SDK
31602        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31603      else
31604        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31605$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31606        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31607$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31608      fi
31609    fi
31610  fi
31611
31612    fi
31613
31614  if test "x$VS_ENV_CMD" = x; then
31615    VS_VERSION="${VS_VERSION}"
31616    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
31617    METHOD="well-known name"
31618
31619  windows_path="$WIN_SDK_BASE"
31620  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31621    unix_path=`$CYGPATH -u "$windows_path"`
31622    WIN_SDK_BASE="$unix_path"
31623  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31624    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31625    WIN_SDK_BASE="$unix_path"
31626  fi
31627
31628    if test -d "$WIN_SDK_BASE"; then
31629      # There have been cases of partial or broken SDK installations. A missing
31630      # lib dir is not going to work.
31631      if test ! -d "$WIN_SDK_BASE/lib"; then
31632        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31633$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31634        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31635$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31636      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31637        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31638$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31639        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31640        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31641          VS_ENV_ARGS="/x86"
31642        else
31643          VS_ENV_ARGS="/x64"
31644        fi
31645        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31646        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31647        # TODO: improve detection for other versions of SDK
31648        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31649      else
31650        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31651$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31652        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31653$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31654      fi
31655    fi
31656  fi
31657
31658
31659  if test "x$VS_ENV_CMD" = x; then
31660    VS_VERSION="${VS_VERSION}"
31661    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
31662    METHOD="well-known name"
31663
31664  windows_path="$WIN_SDK_BASE"
31665  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31666    unix_path=`$CYGPATH -u "$windows_path"`
31667    WIN_SDK_BASE="$unix_path"
31668  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31669    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31670    WIN_SDK_BASE="$unix_path"
31671  fi
31672
31673    if test -d "$WIN_SDK_BASE"; then
31674      # There have been cases of partial or broken SDK installations. A missing
31675      # lib dir is not going to work.
31676      if test ! -d "$WIN_SDK_BASE/lib"; then
31677        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31678$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31679        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31680$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31681      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31682        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31683$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31684        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31685        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31686          VS_ENV_ARGS="/x86"
31687        else
31688          VS_ENV_ARGS="/x64"
31689        fi
31690        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31691        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31692        # TODO: improve detection for other versions of SDK
31693        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31694      else
31695        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31696$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31697        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31698$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31699      fi
31700    fi
31701  fi
31702
31703  fi
31704
31705    if test "x$VS_ENV_CMD" != x; then
31706      TOOLCHAIN_VERSION=$VS_VERSION
31707      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
31708      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
31709      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
31710      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
31711      # The rest of the variables are already evaled while probing
31712      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
31713$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
31714      break
31715    fi
31716  done
31717
31718
31719  # If we have a devkit, skip all of the below.
31720  if test "x$DEVKIT_VS_VERSION" = x; then
31721    if test "x$VS_ENV_CMD" != x; then
31722      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
31723
31724  # Only process if variable expands to non-empty
31725
31726  if test "x$VS_ENV_CMD" != x; then
31727    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31728
31729  # First separate the path from the arguments. This will split at the first
31730  # space.
31731  complete="$VS_ENV_CMD"
31732  path="${complete%% *}"
31733  tmp="$complete EOL"
31734  arguments="${tmp#* }"
31735
31736  # Input might be given as Windows format, start by converting to
31737  # unix format.
31738  new_path=`$CYGPATH -u "$path"`
31739
31740  # Now try to locate executable using which
31741  new_path=`$WHICH "$new_path" 2> /dev/null`
31742  # bat and cmd files are not always considered executable in cygwin causing which
31743  # to not find them
31744  if test "x$new_path" = x \
31745      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31746      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31747    new_path=`$CYGPATH -u "$path"`
31748  fi
31749  if test "x$new_path" = x; then
31750    # Oops. Which didn't find the executable.
31751    # The splitting of arguments from the executable at a space might have been incorrect,
31752    # since paths with space are more likely in Windows. Give it another try with the whole
31753    # argument.
31754    path="$complete"
31755    arguments="EOL"
31756    new_path=`$CYGPATH -u "$path"`
31757    new_path=`$WHICH "$new_path" 2> /dev/null`
31758    # bat and cmd files are not always considered executable in cygwin causing which
31759    # to not find them
31760    if test "x$new_path" = x \
31761        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31762        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31763      new_path=`$CYGPATH -u "$path"`
31764    fi
31765    if test "x$new_path" = x; then
31766      # It's still not found. Now this is an unrecoverable error.
31767      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
31768$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
31769      has_space=`$ECHO "$complete" | $GREP " "`
31770      if test "x$has_space" != x; then
31771        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31772$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31773      fi
31774      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
31775    fi
31776  fi
31777
31778  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31779  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31780  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31781  # "foo.exe" is OK but "foo" is an error.
31782  #
31783  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31784  # It is also a way to make sure we got the proper file name for the real test later on.
31785  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31786  if test "x$test_shortpath" = x; then
31787    # Short path failed, file does not exist as specified.
31788    # Try adding .exe or .cmd
31789    if test -f "${new_path}.exe"; then
31790      input_to_shortpath="${new_path}.exe"
31791    elif test -f "${new_path}.cmd"; then
31792      input_to_shortpath="${new_path}.cmd"
31793    else
31794      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
31795$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
31796      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31797$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31798      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
31799    fi
31800  else
31801    input_to_shortpath="$new_path"
31802  fi
31803
31804  # Call helper function which possibly converts this using DOS-style short mode.
31805  # If so, the updated path is stored in $new_path.
31806  new_path="$input_to_shortpath"
31807
31808  input_path="$input_to_shortpath"
31809  # Check if we need to convert this using DOS-style short mode. If the path
31810  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31811  # take no chances and rewrite it.
31812  # Note: m4 eats our [], so we need to use [ and ] instead.
31813  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31814  if test "x$has_forbidden_chars" != x; then
31815    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31816    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31817    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31818    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31819      # Going to short mode and back again did indeed matter. Since short mode is
31820      # case insensitive, let's make it lowercase to improve readability.
31821      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31822      # Now convert it back to Unix-style (cygpath)
31823      input_path=`$CYGPATH -u "$shortmode_path"`
31824      new_path="$input_path"
31825    fi
31826  fi
31827
31828  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31829  if test "x$test_cygdrive_prefix" = x; then
31830    # As a simple fix, exclude /usr/bin since it's not a real path.
31831    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31832      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31833      # a path prefixed by /cygdrive for fixpath to work.
31834      new_path="$CYGWIN_ROOT_PATH$input_path"
31835    fi
31836  fi
31837
31838  # remove trailing .exe if any
31839  new_path="${new_path/%.exe/}"
31840
31841    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31842
31843  # First separate the path from the arguments. This will split at the first
31844  # space.
31845  complete="$VS_ENV_CMD"
31846  path="${complete%% *}"
31847  tmp="$complete EOL"
31848  arguments="${tmp#* }"
31849
31850  # Input might be given as Windows format, start by converting to
31851  # unix format.
31852  new_path="$path"
31853
31854  windows_path="$new_path"
31855  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31856    unix_path=`$CYGPATH -u "$windows_path"`
31857    new_path="$unix_path"
31858  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31859    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31860    new_path="$unix_path"
31861  fi
31862
31863
31864  # Now try to locate executable using which
31865  new_path=`$WHICH "$new_path" 2> /dev/null`
31866
31867  if test "x$new_path" = x; then
31868    # Oops. Which didn't find the executable.
31869    # The splitting of arguments from the executable at a space might have been incorrect,
31870    # since paths with space are more likely in Windows. Give it another try with the whole
31871    # argument.
31872    path="$complete"
31873    arguments="EOL"
31874    new_path="$path"
31875
31876  windows_path="$new_path"
31877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31878    unix_path=`$CYGPATH -u "$windows_path"`
31879    new_path="$unix_path"
31880  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31881    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31882    new_path="$unix_path"
31883  fi
31884
31885
31886    new_path=`$WHICH "$new_path" 2> /dev/null`
31887    # bat and cmd files are not always considered executable in MSYS causing which
31888    # to not find them
31889    if test "x$new_path" = x \
31890        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31891        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31892      new_path="$path"
31893
31894  windows_path="$new_path"
31895  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31896    unix_path=`$CYGPATH -u "$windows_path"`
31897    new_path="$unix_path"
31898  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31899    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31900    new_path="$unix_path"
31901  fi
31902
31903    fi
31904
31905    if test "x$new_path" = x; then
31906      # It's still not found. Now this is an unrecoverable error.
31907      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
31908$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
31909      has_space=`$ECHO "$complete" | $GREP " "`
31910      if test "x$has_space" != x; then
31911        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31912$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31913      fi
31914      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
31915    fi
31916  fi
31917
31918  # Now new_path has a complete unix path to the binary
31919  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31920    # Keep paths in /bin as-is, but remove trailing .exe if any
31921    new_path="${new_path/%.exe/}"
31922    # Do not save /bin paths to all_fixpath_prefixes!
31923  else
31924    # Not in mixed or Windows style, start by that.
31925    new_path=`cmd //c echo $new_path`
31926
31927  input_path="$new_path"
31928  # Check if we need to convert this using DOS-style short mode. If the path
31929  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31930  # take no chances and rewrite it.
31931  # Note: m4 eats our [], so we need to use [ and ] instead.
31932  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31933  if test "x$has_forbidden_chars" != x; then
31934    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31935    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31936  fi
31937
31938    # Output is in $new_path
31939
31940  windows_path="$new_path"
31941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31942    unix_path=`$CYGPATH -u "$windows_path"`
31943    new_path="$unix_path"
31944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31945    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31946    new_path="$unix_path"
31947  fi
31948
31949    # remove trailing .exe if any
31950    new_path="${new_path/%.exe/}"
31951
31952    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31953    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31954  fi
31955
31956    else
31957      # We're on a unix platform. Hooray! :)
31958      # First separate the path from the arguments. This will split at the first
31959      # space.
31960      complete="$VS_ENV_CMD"
31961      path="${complete%% *}"
31962      tmp="$complete EOL"
31963      arguments="${tmp#* }"
31964
31965      # Cannot rely on the command "which" here since it doesn't always work.
31966      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31967      if test -z "$is_absolute_path"; then
31968        # Path to executable is not absolute. Find it.
31969        IFS_save="$IFS"
31970        IFS=:
31971        for p in $PATH; do
31972          if test -f "$p/$path" && test -x "$p/$path"; then
31973            new_path="$p/$path"
31974            break
31975          fi
31976        done
31977        IFS="$IFS_save"
31978      else
31979        # This is an absolute path, we can use it without further modifications.
31980        new_path="$path"
31981      fi
31982
31983      if test "x$new_path" = x; then
31984        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
31985$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
31986        has_space=`$ECHO "$complete" | $GREP " "`
31987        if test "x$has_space" != x; then
31988          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31989$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31990        fi
31991        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
31992      fi
31993    fi
31994
31995    # Now join together the path and the arguments once again
31996    if test "x$arguments" != xEOL; then
31997      new_complete="$new_path ${arguments% *}"
31998    else
31999      new_complete="$new_path"
32000    fi
32001
32002    if test "x$complete" != "x$new_complete"; then
32003      VS_ENV_CMD="$new_complete"
32004      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
32005$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
32006    fi
32007  fi
32008
32009
32010      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
32011      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
32012$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
32013
32014      # We need to create a couple of temporary files.
32015      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
32016      $MKDIR -p $VS_ENV_TMP_DIR
32017
32018      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
32019      # Instead create a shell script which will set the relevant variables when run.
32020      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
32021
32022  unix_path="$WINPATH_VS_ENV_CMD"
32023  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32024    windows_path=`$CYGPATH -m "$unix_path"`
32025    WINPATH_VS_ENV_CMD="$windows_path"
32026  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32027    windows_path=`cmd //c echo $unix_path`
32028    WINPATH_VS_ENV_CMD="$windows_path"
32029  fi
32030
32031      WINPATH_BASH="$BASH"
32032
32033  unix_path="$WINPATH_BASH"
32034  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32035    windows_path=`$CYGPATH -m "$unix_path"`
32036    WINPATH_BASH="$windows_path"
32037  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32038    windows_path=`cmd //c echo $unix_path`
32039    WINPATH_BASH="$windows_path"
32040  fi
32041
32042
32043      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
32044      # script (executable by bash) that will setup the important variables.
32045      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
32046      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
32047      # This will end up something like:
32048      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
32049      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
32050      # These will end up something like:
32051      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
32052      # The trailing space for everyone except PATH is no typo, but is needed due
32053      # to trailing \ in the Windows paths. These will be stripped later.
32054      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
32055          >> $EXTRACT_VC_ENV_BAT_FILE
32056      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
32057          >> $EXTRACT_VC_ENV_BAT_FILE
32058      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
32059          >> $EXTRACT_VC_ENV_BAT_FILE
32060      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
32061          >> $EXTRACT_VC_ENV_BAT_FILE
32062      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
32063          >> $EXTRACT_VC_ENV_BAT_FILE
32064      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
32065          >> $EXTRACT_VC_ENV_BAT_FILE
32066
32067      # Now execute the newly created bat file.
32068      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
32069      # Change directory so we don't need to mess with Windows paths in redirects.
32070      cd $VS_ENV_TMP_DIR
32071      cmd /c extract-vs-env.bat | $CAT
32072      cd $CURDIR
32073
32074      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
32075        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
32076$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
32077        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32078$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32079        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32080$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32081        as_fn_error $? "Cannot continue" "$LINENO" 5
32082      fi
32083
32084      # Now set all paths and other env variables. This will allow the rest of
32085      # the configure script to find and run the compiler in the proper way.
32086      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
32087$as_echo "$as_me: Setting extracted environment variables" >&6;}
32088      . $VS_ENV_TMP_DIR/set-vs-env.sh
32089      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
32090      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
32091    else
32092      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
32093      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
32094$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
32095    fi
32096  fi
32097
32098  # At this point, we should have correct variables in the environment, or we can't continue.
32099  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
32100$as_echo_n "checking for Visual Studio variables... " >&6; }
32101
32102  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
32103      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
32104    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
32105      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
32106$as_echo "present but broken" >&6; }
32107      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
32108    else
32109      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
32110$as_echo "ok" >&6; }
32111      # Remove any trailing "\" ";" and " " from the variables.
32112      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
32113      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
32114      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
32115      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
32116      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
32117      # Remove any paths containing # (typically F#) as that messes up make. This
32118      # is needed if visual studio was installed with F# support.
32119      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
32120
32121
32122
32123
32124
32125      # Convert VS_INCLUDE into SYSROOT_CFLAGS
32126      OLDIFS="$IFS"
32127      IFS=";"
32128      for i in $VS_INCLUDE; do
32129        ipath=$i
32130        # Only process non-empty elements
32131        if test "x$ipath" != x; then
32132          IFS="$OLDIFS"
32133          # Check that directory exists before calling fixup_path
32134          testpath=$ipath
32135
32136  windows_path="$testpath"
32137  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32138    unix_path=`$CYGPATH -u "$windows_path"`
32139    testpath="$unix_path"
32140  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32141    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32142    testpath="$unix_path"
32143  fi
32144
32145          if test -d "$testpath"; then
32146
32147  # Only process if variable expands to non-empty
32148
32149  if test "x$ipath" != x; then
32150    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32151
32152  # Input might be given as Windows format, start by converting to
32153  # unix format.
32154  path="$ipath"
32155  new_path=`$CYGPATH -u "$path"`
32156
32157  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32158  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32159  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32160  # "foo.exe" is OK but "foo" is an error.
32161  #
32162  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32163  # It is also a way to make sure we got the proper file name for the real test later on.
32164  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32165  if test "x$test_shortpath" = x; then
32166    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32167$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32168    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
32169  fi
32170
32171  # Call helper function which possibly converts this using DOS-style short mode.
32172  # If so, the updated path is stored in $new_path.
32173
32174  input_path="$new_path"
32175  # Check if we need to convert this using DOS-style short mode. If the path
32176  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32177  # take no chances and rewrite it.
32178  # Note: m4 eats our [], so we need to use [ and ] instead.
32179  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32180  if test "x$has_forbidden_chars" != x; then
32181    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32182    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32183    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32184    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32185      # Going to short mode and back again did indeed matter. Since short mode is
32186      # case insensitive, let's make it lowercase to improve readability.
32187      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32188      # Now convert it back to Unix-style (cygpath)
32189      input_path=`$CYGPATH -u "$shortmode_path"`
32190      new_path="$input_path"
32191    fi
32192  fi
32193
32194  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32195  if test "x$test_cygdrive_prefix" = x; then
32196    # As a simple fix, exclude /usr/bin since it's not a real path.
32197    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32198      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32199      # a path prefixed by /cygdrive for fixpath to work.
32200      new_path="$CYGWIN_ROOT_PATH$input_path"
32201    fi
32202  fi
32203
32204
32205  if test "x$path" != "x$new_path"; then
32206    ipath="$new_path"
32207    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32208$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32209  fi
32210
32211    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32212
32213  path="$ipath"
32214  has_colon=`$ECHO $path | $GREP ^.:`
32215  new_path="$path"
32216  if test "x$has_colon" = x; then
32217    # Not in mixed or Windows style, start by that.
32218    new_path=`cmd //c echo $path`
32219  fi
32220
32221
32222  input_path="$new_path"
32223  # Check if we need to convert this using DOS-style short mode. If the path
32224  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32225  # take no chances and rewrite it.
32226  # Note: m4 eats our [], so we need to use [ and ] instead.
32227  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32228  if test "x$has_forbidden_chars" != x; then
32229    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32230    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32231  fi
32232
32233
32234  windows_path="$new_path"
32235  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32236    unix_path=`$CYGPATH -u "$windows_path"`
32237    new_path="$unix_path"
32238  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32239    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32240    new_path="$unix_path"
32241  fi
32242
32243  if test "x$path" != "x$new_path"; then
32244    ipath="$new_path"
32245    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32246$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32247  fi
32248
32249  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32250  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32251
32252    else
32253      # We're on a unix platform. Hooray! :)
32254      path="$ipath"
32255      has_space=`$ECHO "$path" | $GREP " "`
32256      if test "x$has_space" != x; then
32257        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32258$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32259        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32260      fi
32261
32262      # Use eval to expand a potential ~
32263      eval path="$path"
32264      if test ! -f "$path" && test ! -d "$path"; then
32265        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
32266      fi
32267
32268      if test -d "$path"; then
32269        ipath="`cd "$path"; $THEPWDCMD -L`"
32270      else
32271        dir="`$DIRNAME "$path"`"
32272        base="`$BASENAME "$path"`"
32273        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
32274      fi
32275    fi
32276  fi
32277
32278            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
32279          fi
32280          IFS=";"
32281        fi
32282      done
32283      # Convert VS_LIB into SYSROOT_LDFLAGS
32284      for i in $VS_LIB; do
32285        libpath=$i
32286        # Only process non-empty elements
32287        if test "x$libpath" != x; then
32288          IFS="$OLDIFS"
32289          # Check that directory exists before calling fixup_path
32290          testpath=$libpath
32291
32292  windows_path="$testpath"
32293  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32294    unix_path=`$CYGPATH -u "$windows_path"`
32295    testpath="$unix_path"
32296  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32297    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32298    testpath="$unix_path"
32299  fi
32300
32301          if test -d "$testpath"; then
32302
32303  # Only process if variable expands to non-empty
32304
32305  if test "x$libpath" != x; then
32306    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32307
32308  # Input might be given as Windows format, start by converting to
32309  # unix format.
32310  path="$libpath"
32311  new_path=`$CYGPATH -u "$path"`
32312
32313  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32314  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32315  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32316  # "foo.exe" is OK but "foo" is an error.
32317  #
32318  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32319  # It is also a way to make sure we got the proper file name for the real test later on.
32320  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32321  if test "x$test_shortpath" = x; then
32322    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32323$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32324    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
32325  fi
32326
32327  # Call helper function which possibly converts this using DOS-style short mode.
32328  # If so, the updated path is stored in $new_path.
32329
32330  input_path="$new_path"
32331  # Check if we need to convert this using DOS-style short mode. If the path
32332  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32333  # take no chances and rewrite it.
32334  # Note: m4 eats our [], so we need to use [ and ] instead.
32335  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32336  if test "x$has_forbidden_chars" != x; then
32337    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32338    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32339    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32340    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32341      # Going to short mode and back again did indeed matter. Since short mode is
32342      # case insensitive, let's make it lowercase to improve readability.
32343      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32344      # Now convert it back to Unix-style (cygpath)
32345      input_path=`$CYGPATH -u "$shortmode_path"`
32346      new_path="$input_path"
32347    fi
32348  fi
32349
32350  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32351  if test "x$test_cygdrive_prefix" = x; then
32352    # As a simple fix, exclude /usr/bin since it's not a real path.
32353    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32354      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32355      # a path prefixed by /cygdrive for fixpath to work.
32356      new_path="$CYGWIN_ROOT_PATH$input_path"
32357    fi
32358  fi
32359
32360
32361  if test "x$path" != "x$new_path"; then
32362    libpath="$new_path"
32363    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32364$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32365  fi
32366
32367    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32368
32369  path="$libpath"
32370  has_colon=`$ECHO $path | $GREP ^.:`
32371  new_path="$path"
32372  if test "x$has_colon" = x; then
32373    # Not in mixed or Windows style, start by that.
32374    new_path=`cmd //c echo $path`
32375  fi
32376
32377
32378  input_path="$new_path"
32379  # Check if we need to convert this using DOS-style short mode. If the path
32380  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32381  # take no chances and rewrite it.
32382  # Note: m4 eats our [], so we need to use [ and ] instead.
32383  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32384  if test "x$has_forbidden_chars" != x; then
32385    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32386    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32387  fi
32388
32389
32390  windows_path="$new_path"
32391  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32392    unix_path=`$CYGPATH -u "$windows_path"`
32393    new_path="$unix_path"
32394  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32395    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32396    new_path="$unix_path"
32397  fi
32398
32399  if test "x$path" != "x$new_path"; then
32400    libpath="$new_path"
32401    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32402$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32403  fi
32404
32405  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32406  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32407
32408    else
32409      # We're on a unix platform. Hooray! :)
32410      path="$libpath"
32411      has_space=`$ECHO "$path" | $GREP " "`
32412      if test "x$has_space" != x; then
32413        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32414$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32415        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32416      fi
32417
32418      # Use eval to expand a potential ~
32419      eval path="$path"
32420      if test ! -f "$path" && test ! -d "$path"; then
32421        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
32422      fi
32423
32424      if test -d "$path"; then
32425        libpath="`cd "$path"; $THEPWDCMD -L`"
32426      else
32427        dir="`$DIRNAME "$path"`"
32428        base="`$BASENAME "$path"`"
32429        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
32430      fi
32431    fi
32432  fi
32433
32434            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
32435          fi
32436          IFS=";"
32437        fi
32438      done
32439      IFS="$OLDIFS"
32440    fi
32441  else
32442    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32443$as_echo "not found" >&6; }
32444
32445    if test "x$VS_ENV_CMD" = x; then
32446      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
32447$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
32448      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
32449$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
32450    else
32451      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
32452$as_echo "$as_me: Running the extraction script failed." >&6;}
32453    fi
32454    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32455$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32456    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32457$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32458    as_fn_error $? "Cannot continue" "$LINENO" 5
32459  fi
32460
32461    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
32462    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
32463    PATH="$VS_PATH"
32464    # The microsoft toolchain also requires INCLUDE and LIB to be set.
32465    export INCLUDE="$VS_INCLUDE"
32466    export LIB="$VS_LIB"
32467  else
32468    if test "x$XCODE_VERSION_OUTPUT" != x; then
32469      # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
32470      TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
32471      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
32472    else
32473      # Currently we do not define this for other toolchains. This might change as the need arise.
32474      TOOLCHAIN_VERSION=
32475    fi
32476  fi
32477
32478
32479  # For solaris we really need solaris tools, and not the GNU equivalent.
32480  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
32481  # so add that to path before starting to probe.
32482  # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
32483  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
32484    PATH="/usr/ccs/bin:$PATH"
32485  fi
32486
32487  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
32488  # override all other locations.
32489  if test "x$TOOLCHAIN_PATH" != x; then
32490    PATH=$TOOLCHAIN_PATH:$PATH
32491  fi
32492
32493
32494  #
32495  # Setup the compilers (CC and CXX)
32496  #
32497
32498  COMPILER_NAME=C
32499  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
32500
32501  if test "x$CC" != x; then
32502    # User has supplied compiler name already, always let that override.
32503    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
32504$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
32505    if test "x`basename $CC`" = "x$CC"; then
32506      # A command without a complete path is provided, search $PATH.
32507
32508      for ac_prog in $CC
32509do
32510  # Extract the first word of "$ac_prog", so it can be a program name with args.
32511set dummy $ac_prog; ac_word=$2
32512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32513$as_echo_n "checking for $ac_word... " >&6; }
32514if ${ac_cv_path_POTENTIAL_CC+:} false; then :
32515  $as_echo_n "(cached) " >&6
32516else
32517  case $POTENTIAL_CC in
32518  [\\/]* | ?:[\\/]*)
32519  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
32520  ;;
32521  *)
32522  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32523for as_dir in $PATH
32524do
32525  IFS=$as_save_IFS
32526  test -z "$as_dir" && as_dir=.
32527    for ac_exec_ext in '' $ac_executable_extensions; do
32528  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32529    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
32530    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32531    break 2
32532  fi
32533done
32534  done
32535IFS=$as_save_IFS
32536
32537  ;;
32538esac
32539fi
32540POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
32541if test -n "$POTENTIAL_CC"; then
32542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
32543$as_echo "$POTENTIAL_CC" >&6; }
32544else
32545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32546$as_echo "no" >&6; }
32547fi
32548
32549
32550  test -n "$POTENTIAL_CC" && break
32551done
32552
32553      if test "x$POTENTIAL_CC" != x; then
32554        CC=$POTENTIAL_CC
32555      else
32556        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
32557      fi
32558    else
32559      # Otherwise it might already be a complete path
32560      if test ! -x "$CC"; then
32561        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
32562      fi
32563    fi
32564  else
32565    # No user supplied value. Locate compiler ourselves.
32566
32567    # If we are cross compiling, assume cross compilation tools follows the
32568    # cross compilation standard where they are prefixed with the autoconf
32569    # standard name for the target. For example the binary
32570    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
32571    # If we are not cross compiling, then the default compiler name will be
32572    # used.
32573
32574    CC=
32575    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
32576    # before checking the rest of the PATH.
32577    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
32578    # step, this should not be necessary.
32579    if test -n "$TOOLCHAIN_PATH"; then
32580      PATH_save="$PATH"
32581      PATH="$TOOLCHAIN_PATH"
32582      for ac_prog in $SEARCH_LIST
32583do
32584  # Extract the first word of "$ac_prog", so it can be a program name with args.
32585set dummy $ac_prog; ac_word=$2
32586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32587$as_echo_n "checking for $ac_word... " >&6; }
32588if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
32589  $as_echo_n "(cached) " >&6
32590else
32591  case $TOOLCHAIN_PATH_CC in
32592  [\\/]* | ?:[\\/]*)
32593  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
32594  ;;
32595  *)
32596  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32597for as_dir in $PATH
32598do
32599  IFS=$as_save_IFS
32600  test -z "$as_dir" && as_dir=.
32601    for ac_exec_ext in '' $ac_executable_extensions; do
32602  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32603    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
32604    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32605    break 2
32606  fi
32607done
32608  done
32609IFS=$as_save_IFS
32610
32611  ;;
32612esac
32613fi
32614TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
32615if test -n "$TOOLCHAIN_PATH_CC"; then
32616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
32617$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
32618else
32619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32620$as_echo "no" >&6; }
32621fi
32622
32623
32624  test -n "$TOOLCHAIN_PATH_CC" && break
32625done
32626
32627      CC=$TOOLCHAIN_PATH_CC
32628      PATH="$PATH_save"
32629    fi
32630
32631    # AC_PATH_PROGS can't be run multiple times with the same variable,
32632    # so create a new name for this run.
32633    if test "x$CC" = x; then
32634      for ac_prog in $SEARCH_LIST
32635do
32636  # Extract the first word of "$ac_prog", so it can be a program name with args.
32637set dummy $ac_prog; ac_word=$2
32638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32639$as_echo_n "checking for $ac_word... " >&6; }
32640if ${ac_cv_path_POTENTIAL_CC+:} false; then :
32641  $as_echo_n "(cached) " >&6
32642else
32643  case $POTENTIAL_CC in
32644  [\\/]* | ?:[\\/]*)
32645  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
32646  ;;
32647  *)
32648  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32649for as_dir in $PATH
32650do
32651  IFS=$as_save_IFS
32652  test -z "$as_dir" && as_dir=.
32653    for ac_exec_ext in '' $ac_executable_extensions; do
32654  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32655    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
32656    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32657    break 2
32658  fi
32659done
32660  done
32661IFS=$as_save_IFS
32662
32663  ;;
32664esac
32665fi
32666POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
32667if test -n "$POTENTIAL_CC"; then
32668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
32669$as_echo "$POTENTIAL_CC" >&6; }
32670else
32671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32672$as_echo "no" >&6; }
32673fi
32674
32675
32676  test -n "$POTENTIAL_CC" && break
32677done
32678
32679      CC=$POTENTIAL_CC
32680    fi
32681
32682    if test "x$CC" = x; then
32683
32684  # Print a helpful message on how to acquire the necessary build dependency.
32685  # devkit is the help tag: freetype, cups, alsa etc
32686  MISSING_DEPENDENCY=devkit
32687
32688  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32689    cygwin_help $MISSING_DEPENDENCY
32690  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32691    msys_help $MISSING_DEPENDENCY
32692  else
32693    PKGHANDLER_COMMAND=
32694
32695    case $PKGHANDLER in
32696      apt-get)
32697        apt_help     $MISSING_DEPENDENCY ;;
32698      yum)
32699        yum_help     $MISSING_DEPENDENCY ;;
32700      port)
32701        port_help    $MISSING_DEPENDENCY ;;
32702      pkgutil)
32703        pkgutil_help $MISSING_DEPENDENCY ;;
32704      pkgadd)
32705        pkgadd_help  $MISSING_DEPENDENCY ;;
32706    esac
32707
32708    if test "x$PKGHANDLER_COMMAND" != x; then
32709      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
32710    fi
32711  fi
32712
32713      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
32714    fi
32715  fi
32716
32717  # Now we have a compiler binary in CC. Make sure it's okay.
32718
32719  # Only process if variable expands to non-empty
32720
32721  if test "x$CC" != x; then
32722    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32723
32724  # First separate the path from the arguments. This will split at the first
32725  # space.
32726  complete="$CC"
32727  path="${complete%% *}"
32728  tmp="$complete EOL"
32729  arguments="${tmp#* }"
32730
32731  # Input might be given as Windows format, start by converting to
32732  # unix format.
32733  new_path=`$CYGPATH -u "$path"`
32734
32735  # Now try to locate executable using which
32736  new_path=`$WHICH "$new_path" 2> /dev/null`
32737  # bat and cmd files are not always considered executable in cygwin causing which
32738  # to not find them
32739  if test "x$new_path" = x \
32740      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32741      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32742    new_path=`$CYGPATH -u "$path"`
32743  fi
32744  if test "x$new_path" = x; then
32745    # Oops. Which didn't find the executable.
32746    # The splitting of arguments from the executable at a space might have been incorrect,
32747    # since paths with space are more likely in Windows. Give it another try with the whole
32748    # argument.
32749    path="$complete"
32750    arguments="EOL"
32751    new_path=`$CYGPATH -u "$path"`
32752    new_path=`$WHICH "$new_path" 2> /dev/null`
32753    # bat and cmd files are not always considered executable in cygwin causing which
32754    # to not find them
32755    if test "x$new_path" = x \
32756        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32757        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32758      new_path=`$CYGPATH -u "$path"`
32759    fi
32760    if test "x$new_path" = x; then
32761      # It's still not found. Now this is an unrecoverable error.
32762      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
32763$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
32764      has_space=`$ECHO "$complete" | $GREP " "`
32765      if test "x$has_space" != x; then
32766        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32767$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32768      fi
32769      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
32770    fi
32771  fi
32772
32773  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32774  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32775  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32776  # "foo.exe" is OK but "foo" is an error.
32777  #
32778  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32779  # It is also a way to make sure we got the proper file name for the real test later on.
32780  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32781  if test "x$test_shortpath" = x; then
32782    # Short path failed, file does not exist as specified.
32783    # Try adding .exe or .cmd
32784    if test -f "${new_path}.exe"; then
32785      input_to_shortpath="${new_path}.exe"
32786    elif test -f "${new_path}.cmd"; then
32787      input_to_shortpath="${new_path}.cmd"
32788    else
32789      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
32790$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
32791      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32792$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32793      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
32794    fi
32795  else
32796    input_to_shortpath="$new_path"
32797  fi
32798
32799  # Call helper function which possibly converts this using DOS-style short mode.
32800  # If so, the updated path is stored in $new_path.
32801  new_path="$input_to_shortpath"
32802
32803  input_path="$input_to_shortpath"
32804  # Check if we need to convert this using DOS-style short mode. If the path
32805  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32806  # take no chances and rewrite it.
32807  # Note: m4 eats our [], so we need to use [ and ] instead.
32808  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32809  if test "x$has_forbidden_chars" != x; then
32810    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32811    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32812    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32813    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32814      # Going to short mode and back again did indeed matter. Since short mode is
32815      # case insensitive, let's make it lowercase to improve readability.
32816      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32817      # Now convert it back to Unix-style (cygpath)
32818      input_path=`$CYGPATH -u "$shortmode_path"`
32819      new_path="$input_path"
32820    fi
32821  fi
32822
32823  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32824  if test "x$test_cygdrive_prefix" = x; then
32825    # As a simple fix, exclude /usr/bin since it's not a real path.
32826    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32827      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32828      # a path prefixed by /cygdrive for fixpath to work.
32829      new_path="$CYGWIN_ROOT_PATH$input_path"
32830    fi
32831  fi
32832
32833  # remove trailing .exe if any
32834  new_path="${new_path/%.exe/}"
32835
32836    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32837
32838  # First separate the path from the arguments. This will split at the first
32839  # space.
32840  complete="$CC"
32841  path="${complete%% *}"
32842  tmp="$complete EOL"
32843  arguments="${tmp#* }"
32844
32845  # Input might be given as Windows format, start by converting to
32846  # unix format.
32847  new_path="$path"
32848
32849  windows_path="$new_path"
32850  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32851    unix_path=`$CYGPATH -u "$windows_path"`
32852    new_path="$unix_path"
32853  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32854    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32855    new_path="$unix_path"
32856  fi
32857
32858
32859  # Now try to locate executable using which
32860  new_path=`$WHICH "$new_path" 2> /dev/null`
32861
32862  if test "x$new_path" = x; then
32863    # Oops. Which didn't find the executable.
32864    # The splitting of arguments from the executable at a space might have been incorrect,
32865    # since paths with space are more likely in Windows. Give it another try with the whole
32866    # argument.
32867    path="$complete"
32868    arguments="EOL"
32869    new_path="$path"
32870
32871  windows_path="$new_path"
32872  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32873    unix_path=`$CYGPATH -u "$windows_path"`
32874    new_path="$unix_path"
32875  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32876    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32877    new_path="$unix_path"
32878  fi
32879
32880
32881    new_path=`$WHICH "$new_path" 2> /dev/null`
32882    # bat and cmd files are not always considered executable in MSYS causing which
32883    # to not find them
32884    if test "x$new_path" = x \
32885        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32886        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32887      new_path="$path"
32888
32889  windows_path="$new_path"
32890  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32891    unix_path=`$CYGPATH -u "$windows_path"`
32892    new_path="$unix_path"
32893  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32894    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32895    new_path="$unix_path"
32896  fi
32897
32898    fi
32899
32900    if test "x$new_path" = x; then
32901      # It's still not found. Now this is an unrecoverable error.
32902      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
32903$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
32904      has_space=`$ECHO "$complete" | $GREP " "`
32905      if test "x$has_space" != x; then
32906        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32907$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32908      fi
32909      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
32910    fi
32911  fi
32912
32913  # Now new_path has a complete unix path to the binary
32914  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32915    # Keep paths in /bin as-is, but remove trailing .exe if any
32916    new_path="${new_path/%.exe/}"
32917    # Do not save /bin paths to all_fixpath_prefixes!
32918  else
32919    # Not in mixed or Windows style, start by that.
32920    new_path=`cmd //c echo $new_path`
32921
32922  input_path="$new_path"
32923  # Check if we need to convert this using DOS-style short mode. If the path
32924  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32925  # take no chances and rewrite it.
32926  # Note: m4 eats our [], so we need to use [ and ] instead.
32927  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32928  if test "x$has_forbidden_chars" != x; then
32929    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32930    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32931  fi
32932
32933    # Output is in $new_path
32934
32935  windows_path="$new_path"
32936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32937    unix_path=`$CYGPATH -u "$windows_path"`
32938    new_path="$unix_path"
32939  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32940    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32941    new_path="$unix_path"
32942  fi
32943
32944    # remove trailing .exe if any
32945    new_path="${new_path/%.exe/}"
32946
32947    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32948    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32949  fi
32950
32951    else
32952      # We're on a unix platform. Hooray! :)
32953      # First separate the path from the arguments. This will split at the first
32954      # space.
32955      complete="$CC"
32956      path="${complete%% *}"
32957      tmp="$complete EOL"
32958      arguments="${tmp#* }"
32959
32960      # Cannot rely on the command "which" here since it doesn't always work.
32961      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32962      if test -z "$is_absolute_path"; then
32963        # Path to executable is not absolute. Find it.
32964        IFS_save="$IFS"
32965        IFS=:
32966        for p in $PATH; do
32967          if test -f "$p/$path" && test -x "$p/$path"; then
32968            new_path="$p/$path"
32969            break
32970          fi
32971        done
32972        IFS="$IFS_save"
32973      else
32974        # This is an absolute path, we can use it without further modifications.
32975        new_path="$path"
32976      fi
32977
32978      if test "x$new_path" = x; then
32979        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
32980$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
32981        has_space=`$ECHO "$complete" | $GREP " "`
32982        if test "x$has_space" != x; then
32983          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32984$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32985        fi
32986        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
32987      fi
32988    fi
32989
32990    # Now join together the path and the arguments once again
32991    if test "x$arguments" != xEOL; then
32992      new_complete="$new_path ${arguments% *}"
32993    else
32994      new_complete="$new_path"
32995    fi
32996
32997    if test "x$complete" != "x$new_complete"; then
32998      CC="$new_complete"
32999      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
33000$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
33001    fi
33002  fi
33003
33004  TEST_COMPILER="$CC"
33005
33006  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
33007$as_echo_n "checking resolved symbolic links for CC... " >&6; }
33008  SYMLINK_ORIGINAL="$TEST_COMPILER"
33009
33010  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33011    # Follow a chain of symbolic links. Use readlink
33012    # where it exists, else fall back to horribly
33013    # complicated shell code.
33014    if test "x$READLINK_TESTED" != yes; then
33015      # On MacOSX there is a readlink tool with a different
33016      # purpose than the GNU readlink tool. Check the found readlink.
33017      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33018      if test "x$ISGNU" = x; then
33019        # A readlink that we do not know how to use.
33020        # Are there other non-GNU readlinks out there?
33021        READLINK_TESTED=yes
33022        READLINK=
33023      fi
33024    fi
33025
33026    if test "x$READLINK" != x; then
33027      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
33028    else
33029      # Save the current directory for restoring afterwards
33030      STARTDIR=$PWD
33031      COUNTER=0
33032      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
33033      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
33034      cd $sym_link_dir
33035      # Use -P flag to resolve symlinks in directories.
33036      cd `$THEPWDCMD -P`
33037      sym_link_dir=`$THEPWDCMD -P`
33038      # Resolve file symlinks
33039      while test $COUNTER -lt 20; do
33040        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33041        if test "x$ISLINK" == x; then
33042          # This is not a symbolic link! We are done!
33043          break
33044        fi
33045        # Again resolve directory symlinks since the target of the just found
33046        # link could be in a different directory
33047        cd `$DIRNAME $ISLINK`
33048        sym_link_dir=`$THEPWDCMD -P`
33049        sym_link_file=`$BASENAME $ISLINK`
33050        let COUNTER=COUNTER+1
33051      done
33052      cd $STARTDIR
33053      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
33054    fi
33055  fi
33056
33057  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
33058    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
33059$as_echo "no symlink" >&6; }
33060  else
33061    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
33062$as_echo "$SYMLINK_ORIGINAL" >&6; }
33063
33064    # We can't handle ccache by gcc wrappers, since we need to know if we're
33065    # using ccache. Instead ccache usage must be controlled by a configure option.
33066    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
33067    if test "x$COMPILER_BASENAME" = "xccache"; then
33068      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
33069$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
33070      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
33071    fi
33072  fi
33073
33074
33075  COMPILER=$CC
33076  COMPILER_NAME=$COMPILER_NAME
33077
33078  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33079    # cc -V output typically looks like
33080    #     cc: Sun C 5.12 Linux_i386 2011/11/16
33081    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33082    # Check that this is likely to be the Solaris Studio cc.
33083    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
33084    if test $? -ne 0; then
33085      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33086      { $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
33087$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33088      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33089$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33090      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33091$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33092      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33093    fi
33094    # Remove usage instructions (if present), and
33095    # collapse compiler output into a single line
33096    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33097        $SED -e 's/ *[Uu]sage:.*//'`
33098    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33099        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33100  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
33101    # xlc -qversion output typically looks like
33102    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
33103    #     Version: 11.01.0000.0015
33104    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
33105    # Check that this is likely to be the IBM XL C compiler.
33106    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
33107    if test $? -ne 0; then
33108      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33109      { $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
33110$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33111      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33112$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33113      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33114$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33115      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33116    fi
33117    # Collapse compiler output into a single line
33118    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33119    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33120        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
33121  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33122    # There is no specific version flag, but all output starts with a version string.
33123    # First line typically looks something like:
33124    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
33125    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
33126    # Check that this is likely to be Microsoft CL.EXE.
33127    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
33128    if test $? -ne 0; then
33129      { $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
33130$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33131      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33132$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33133      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33134    fi
33135    # Collapse compiler output into a single line
33136    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33137    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33138        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
33139  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
33140    # gcc --version output typically looks like
33141    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
33142    #     Copyright (C) 2013 Free Software Foundation, Inc.
33143    #     This is free software; see the source for copying conditions.  There is NO
33144    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33145    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33146    # Check that this is likely to be GCC.
33147    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
33148    if test $? -ne 0; then
33149      { $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
33150$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33151      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
33152$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
33153      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33154    fi
33155    # Remove Copyright and legalese from version string, and
33156    # collapse into a single line
33157    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33158        $SED -e 's/ *Copyright .*//'`
33159    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33160        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
33161  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
33162    # clang --version output typically looks like
33163    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
33164    #    clang version 3.3 (tags/RELEASE_33/final)
33165    # or
33166    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
33167    #    Target: x86_64-pc-linux-gnu
33168    #    Thread model: posix
33169    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33170    # Check that this is likely to be clang
33171    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
33172    if test $? -ne 0; then
33173      { $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
33174$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33175      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33176$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33177      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33178    fi
33179    # Collapse compiler output into a single line
33180    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33181    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33182        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
33183  else
33184      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
33185  fi
33186  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
33187  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
33188  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
33189  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
33190
33191  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
33192$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
33193
33194
33195  # Now that we have resolved CC ourself, let autoconf have its go at it
33196  ac_ext=c
33197ac_cpp='$CPP $CPPFLAGS'
33198ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33199ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33200ac_compiler_gnu=$ac_cv_c_compiler_gnu
33201if test -n "$ac_tool_prefix"; then
33202  for ac_prog in $CC
33203  do
33204    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33205set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33207$as_echo_n "checking for $ac_word... " >&6; }
33208if ${ac_cv_prog_CC+:} false; then :
33209  $as_echo_n "(cached) " >&6
33210else
33211  if test -n "$CC"; then
33212  ac_cv_prog_CC="$CC" # Let the user override the test.
33213else
33214as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33215for as_dir in $PATH
33216do
33217  IFS=$as_save_IFS
33218  test -z "$as_dir" && as_dir=.
33219    for ac_exec_ext in '' $ac_executable_extensions; do
33220  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33221    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
33222    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33223    break 2
33224  fi
33225done
33226  done
33227IFS=$as_save_IFS
33228
33229fi
33230fi
33231CC=$ac_cv_prog_CC
33232if test -n "$CC"; then
33233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
33234$as_echo "$CC" >&6; }
33235else
33236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33237$as_echo "no" >&6; }
33238fi
33239
33240
33241    test -n "$CC" && break
33242  done
33243fi
33244if test -z "$CC"; then
33245  ac_ct_CC=$CC
33246  for ac_prog in $CC
33247do
33248  # Extract the first word of "$ac_prog", so it can be a program name with args.
33249set dummy $ac_prog; ac_word=$2
33250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33251$as_echo_n "checking for $ac_word... " >&6; }
33252if ${ac_cv_prog_ac_ct_CC+:} false; then :
33253  $as_echo_n "(cached) " >&6
33254else
33255  if test -n "$ac_ct_CC"; then
33256  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
33257else
33258as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33259for as_dir in $PATH
33260do
33261  IFS=$as_save_IFS
33262  test -z "$as_dir" && as_dir=.
33263    for ac_exec_ext in '' $ac_executable_extensions; do
33264  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33265    ac_cv_prog_ac_ct_CC="$ac_prog"
33266    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33267    break 2
33268  fi
33269done
33270  done
33271IFS=$as_save_IFS
33272
33273fi
33274fi
33275ac_ct_CC=$ac_cv_prog_ac_ct_CC
33276if test -n "$ac_ct_CC"; then
33277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
33278$as_echo "$ac_ct_CC" >&6; }
33279else
33280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33281$as_echo "no" >&6; }
33282fi
33283
33284
33285  test -n "$ac_ct_CC" && break
33286done
33287
33288  if test "x$ac_ct_CC" = x; then
33289    CC=""
33290  else
33291    case $cross_compiling:$ac_tool_warned in
33292yes:)
33293{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33294$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33295ac_tool_warned=yes ;;
33296esac
33297    CC=$ac_ct_CC
33298  fi
33299fi
33300
33301
33302test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33303$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33304as_fn_error $? "no acceptable C compiler found in \$PATH
33305See \`config.log' for more details" "$LINENO" 5; }
33306
33307# Provide some information about the compiler.
33308$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
33309set X $ac_compile
33310ac_compiler=$2
33311for ac_option in --version -v -V -qversion; do
33312  { { ac_try="$ac_compiler $ac_option >&5"
33313case "(($ac_try" in
33314  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33315  *) ac_try_echo=$ac_try;;
33316esac
33317eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33318$as_echo "$ac_try_echo"; } >&5
33319  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33320  ac_status=$?
33321  if test -s conftest.err; then
33322    sed '10a\
33323... rest of stderr output deleted ...
33324         10q' conftest.err >conftest.er1
33325    cat conftest.er1 >&5
33326  fi
33327  rm -f conftest.er1 conftest.err
33328  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33329  test $ac_status = 0; }
33330done
33331
33332cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33333/* end confdefs.h.  */
33334
33335int
33336main ()
33337{
33338
33339  ;
33340  return 0;
33341}
33342_ACEOF
33343ac_clean_files_save=$ac_clean_files
33344ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
33345# Try to create an executable without -o first, disregard a.out.
33346# It will help us diagnose broken compilers, and finding out an intuition
33347# of exeext.
33348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
33349$as_echo_n "checking whether the C compiler works... " >&6; }
33350ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
33351
33352# The possible output files:
33353ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
33354
33355ac_rmfiles=
33356for ac_file in $ac_files
33357do
33358  case $ac_file in
33359    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33360    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
33361  esac
33362done
33363rm -f $ac_rmfiles
33364
33365if { { ac_try="$ac_link_default"
33366case "(($ac_try" in
33367  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33368  *) ac_try_echo=$ac_try;;
33369esac
33370eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33371$as_echo "$ac_try_echo"; } >&5
33372  (eval "$ac_link_default") 2>&5
33373  ac_status=$?
33374  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33375  test $ac_status = 0; }; then :
33376  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
33377# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
33378# in a Makefile.  We should not override ac_cv_exeext if it was cached,
33379# so that the user can short-circuit this test for compilers unknown to
33380# Autoconf.
33381for ac_file in $ac_files ''
33382do
33383  test -f "$ac_file" || continue
33384  case $ac_file in
33385    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
33386	;;
33387    [ab].out )
33388	# We found the default executable, but exeext='' is most
33389	# certainly right.
33390	break;;
33391    *.* )
33392	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
33393	then :; else
33394	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33395	fi
33396	# We set ac_cv_exeext here because the later test for it is not
33397	# safe: cross compilers may not add the suffix if given an `-o'
33398	# argument, so we may need to know it at that point already.
33399	# Even if this section looks crufty: it has the advantage of
33400	# actually working.
33401	break;;
33402    * )
33403	break;;
33404  esac
33405done
33406test "$ac_cv_exeext" = no && ac_cv_exeext=
33407
33408else
33409  ac_file=''
33410fi
33411if test -z "$ac_file"; then :
33412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33413$as_echo "no" >&6; }
33414$as_echo "$as_me: failed program was:" >&5
33415sed 's/^/| /' conftest.$ac_ext >&5
33416
33417{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33418$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33419as_fn_error 77 "C compiler cannot create executables
33420See \`config.log' for more details" "$LINENO" 5; }
33421else
33422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33423$as_echo "yes" >&6; }
33424fi
33425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
33426$as_echo_n "checking for C compiler default output file name... " >&6; }
33427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
33428$as_echo "$ac_file" >&6; }
33429ac_exeext=$ac_cv_exeext
33430
33431rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
33432ac_clean_files=$ac_clean_files_save
33433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
33434$as_echo_n "checking for suffix of executables... " >&6; }
33435if { { ac_try="$ac_link"
33436case "(($ac_try" in
33437  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33438  *) ac_try_echo=$ac_try;;
33439esac
33440eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33441$as_echo "$ac_try_echo"; } >&5
33442  (eval "$ac_link") 2>&5
33443  ac_status=$?
33444  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33445  test $ac_status = 0; }; then :
33446  # If both `conftest.exe' and `conftest' are `present' (well, observable)
33447# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
33448# work properly (i.e., refer to `conftest.exe'), while it won't with
33449# `rm'.
33450for ac_file in conftest.exe conftest conftest.*; do
33451  test -f "$ac_file" || continue
33452  case $ac_file in
33453    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33454    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33455	  break;;
33456    * ) break;;
33457  esac
33458done
33459else
33460  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33461$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33462as_fn_error $? "cannot compute suffix of executables: cannot compile and link
33463See \`config.log' for more details" "$LINENO" 5; }
33464fi
33465rm -f conftest conftest$ac_cv_exeext
33466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
33467$as_echo "$ac_cv_exeext" >&6; }
33468
33469rm -f conftest.$ac_ext
33470EXEEXT=$ac_cv_exeext
33471ac_exeext=$EXEEXT
33472cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33473/* end confdefs.h.  */
33474#include <stdio.h>
33475int
33476main ()
33477{
33478FILE *f = fopen ("conftest.out", "w");
33479 return ferror (f) || fclose (f) != 0;
33480
33481  ;
33482  return 0;
33483}
33484_ACEOF
33485ac_clean_files="$ac_clean_files conftest.out"
33486# Check that the compiler produces executables we can run.  If not, either
33487# the compiler is broken, or we cross compile.
33488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
33489$as_echo_n "checking whether we are cross compiling... " >&6; }
33490if test "$cross_compiling" != yes; then
33491  { { ac_try="$ac_link"
33492case "(($ac_try" in
33493  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33494  *) ac_try_echo=$ac_try;;
33495esac
33496eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33497$as_echo "$ac_try_echo"; } >&5
33498  (eval "$ac_link") 2>&5
33499  ac_status=$?
33500  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33501  test $ac_status = 0; }
33502  if { ac_try='./conftest$ac_cv_exeext'
33503  { { case "(($ac_try" in
33504  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33505  *) ac_try_echo=$ac_try;;
33506esac
33507eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33508$as_echo "$ac_try_echo"; } >&5
33509  (eval "$ac_try") 2>&5
33510  ac_status=$?
33511  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33512  test $ac_status = 0; }; }; then
33513    cross_compiling=no
33514  else
33515    if test "$cross_compiling" = maybe; then
33516	cross_compiling=yes
33517    else
33518	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33519$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33520as_fn_error $? "cannot run C compiled programs.
33521If you meant to cross compile, use \`--host'.
33522See \`config.log' for more details" "$LINENO" 5; }
33523    fi
33524  fi
33525fi
33526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
33527$as_echo "$cross_compiling" >&6; }
33528
33529rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
33530ac_clean_files=$ac_clean_files_save
33531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
33532$as_echo_n "checking for suffix of object files... " >&6; }
33533if ${ac_cv_objext+:} false; then :
33534  $as_echo_n "(cached) " >&6
33535else
33536  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33537/* end confdefs.h.  */
33538
33539int
33540main ()
33541{
33542
33543  ;
33544  return 0;
33545}
33546_ACEOF
33547rm -f conftest.o conftest.obj
33548if { { ac_try="$ac_compile"
33549case "(($ac_try" in
33550  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33551  *) ac_try_echo=$ac_try;;
33552esac
33553eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33554$as_echo "$ac_try_echo"; } >&5
33555  (eval "$ac_compile") 2>&5
33556  ac_status=$?
33557  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33558  test $ac_status = 0; }; then :
33559  for ac_file in conftest.o conftest.obj conftest.*; do
33560  test -f "$ac_file" || continue;
33561  case $ac_file in
33562    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
33563    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
33564       break;;
33565  esac
33566done
33567else
33568  $as_echo "$as_me: failed program was:" >&5
33569sed 's/^/| /' conftest.$ac_ext >&5
33570
33571{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33572$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33573as_fn_error $? "cannot compute suffix of object files: cannot compile
33574See \`config.log' for more details" "$LINENO" 5; }
33575fi
33576rm -f conftest.$ac_cv_objext conftest.$ac_ext
33577fi
33578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
33579$as_echo "$ac_cv_objext" >&6; }
33580OBJEXT=$ac_cv_objext
33581ac_objext=$OBJEXT
33582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
33583$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
33584if ${ac_cv_c_compiler_gnu+:} false; then :
33585  $as_echo_n "(cached) " >&6
33586else
33587  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33588/* end confdefs.h.  */
33589
33590int
33591main ()
33592{
33593#ifndef __GNUC__
33594       choke me
33595#endif
33596
33597  ;
33598  return 0;
33599}
33600_ACEOF
33601if ac_fn_c_try_compile "$LINENO"; then :
33602  ac_compiler_gnu=yes
33603else
33604  ac_compiler_gnu=no
33605fi
33606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33607ac_cv_c_compiler_gnu=$ac_compiler_gnu
33608
33609fi
33610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
33611$as_echo "$ac_cv_c_compiler_gnu" >&6; }
33612if test $ac_compiler_gnu = yes; then
33613  GCC=yes
33614else
33615  GCC=
33616fi
33617ac_test_CFLAGS=${CFLAGS+set}
33618ac_save_CFLAGS=$CFLAGS
33619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
33620$as_echo_n "checking whether $CC accepts -g... " >&6; }
33621if ${ac_cv_prog_cc_g+:} false; then :
33622  $as_echo_n "(cached) " >&6
33623else
33624  ac_save_c_werror_flag=$ac_c_werror_flag
33625   ac_c_werror_flag=yes
33626   ac_cv_prog_cc_g=no
33627   CFLAGS="-g"
33628   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33629/* end confdefs.h.  */
33630
33631int
33632main ()
33633{
33634
33635  ;
33636  return 0;
33637}
33638_ACEOF
33639if ac_fn_c_try_compile "$LINENO"; then :
33640  ac_cv_prog_cc_g=yes
33641else
33642  CFLAGS=""
33643      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33644/* end confdefs.h.  */
33645
33646int
33647main ()
33648{
33649
33650  ;
33651  return 0;
33652}
33653_ACEOF
33654if ac_fn_c_try_compile "$LINENO"; then :
33655
33656else
33657  ac_c_werror_flag=$ac_save_c_werror_flag
33658	 CFLAGS="-g"
33659	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33660/* end confdefs.h.  */
33661
33662int
33663main ()
33664{
33665
33666  ;
33667  return 0;
33668}
33669_ACEOF
33670if ac_fn_c_try_compile "$LINENO"; then :
33671  ac_cv_prog_cc_g=yes
33672fi
33673rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33674fi
33675rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33676fi
33677rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33678   ac_c_werror_flag=$ac_save_c_werror_flag
33679fi
33680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
33681$as_echo "$ac_cv_prog_cc_g" >&6; }
33682if test "$ac_test_CFLAGS" = set; then
33683  CFLAGS=$ac_save_CFLAGS
33684elif test $ac_cv_prog_cc_g = yes; then
33685  if test "$GCC" = yes; then
33686    CFLAGS="-g -O2"
33687  else
33688    CFLAGS="-g"
33689  fi
33690else
33691  if test "$GCC" = yes; then
33692    CFLAGS="-O2"
33693  else
33694    CFLAGS=
33695  fi
33696fi
33697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
33698$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
33699if ${ac_cv_prog_cc_c89+:} false; then :
33700  $as_echo_n "(cached) " >&6
33701else
33702  ac_cv_prog_cc_c89=no
33703ac_save_CC=$CC
33704cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33705/* end confdefs.h.  */
33706#include <stdarg.h>
33707#include <stdio.h>
33708struct stat;
33709/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
33710struct buf { int x; };
33711FILE * (*rcsopen) (struct buf *, struct stat *, int);
33712static char *e (p, i)
33713     char **p;
33714     int i;
33715{
33716  return p[i];
33717}
33718static char *f (char * (*g) (char **, int), char **p, ...)
33719{
33720  char *s;
33721  va_list v;
33722  va_start (v,p);
33723  s = g (p, va_arg (v,int));
33724  va_end (v);
33725  return s;
33726}
33727
33728/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
33729   function prototypes and stuff, but not '\xHH' hex character constants.
33730   These don't provoke an error unfortunately, instead are silently treated
33731   as 'x'.  The following induces an error, until -std is added to get
33732   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
33733   array size at least.  It's necessary to write '\x00'==0 to get something
33734   that's true only with -std.  */
33735int osf4_cc_array ['\x00' == 0 ? 1 : -1];
33736
33737/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
33738   inside strings and character constants.  */
33739#define FOO(x) 'x'
33740int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
33741
33742int test (int i, double x);
33743struct s1 {int (*f) (int a);};
33744struct s2 {int (*f) (double a);};
33745int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
33746int argc;
33747char **argv;
33748int
33749main ()
33750{
33751return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
33752  ;
33753  return 0;
33754}
33755_ACEOF
33756for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
33757	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
33758do
33759  CC="$ac_save_CC $ac_arg"
33760  if ac_fn_c_try_compile "$LINENO"; then :
33761  ac_cv_prog_cc_c89=$ac_arg
33762fi
33763rm -f core conftest.err conftest.$ac_objext
33764  test "x$ac_cv_prog_cc_c89" != "xno" && break
33765done
33766rm -f conftest.$ac_ext
33767CC=$ac_save_CC
33768
33769fi
33770# AC_CACHE_VAL
33771case "x$ac_cv_prog_cc_c89" in
33772  x)
33773    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
33774$as_echo "none needed" >&6; } ;;
33775  xno)
33776    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
33777$as_echo "unsupported" >&6; } ;;
33778  *)
33779    CC="$CC $ac_cv_prog_cc_c89"
33780    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
33781$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
33782esac
33783if test "x$ac_cv_prog_cc_c89" != xno; then :
33784
33785fi
33786
33787ac_ext=cpp
33788ac_cpp='$CXXCPP $CPPFLAGS'
33789ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33790ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33791ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33792
33793
33794
33795  COMPILER_NAME=C++
33796  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
33797
33798  if test "x$CXX" != x; then
33799    # User has supplied compiler name already, always let that override.
33800    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
33801$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
33802    if test "x`basename $CXX`" = "x$CXX"; then
33803      # A command without a complete path is provided, search $PATH.
33804
33805      for ac_prog in $CXX
33806do
33807  # Extract the first word of "$ac_prog", so it can be a program name with args.
33808set dummy $ac_prog; ac_word=$2
33809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33810$as_echo_n "checking for $ac_word... " >&6; }
33811if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
33812  $as_echo_n "(cached) " >&6
33813else
33814  case $POTENTIAL_CXX in
33815  [\\/]* | ?:[\\/]*)
33816  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
33817  ;;
33818  *)
33819  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33820for as_dir in $PATH
33821do
33822  IFS=$as_save_IFS
33823  test -z "$as_dir" && as_dir=.
33824    for ac_exec_ext in '' $ac_executable_extensions; do
33825  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33826    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
33827    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33828    break 2
33829  fi
33830done
33831  done
33832IFS=$as_save_IFS
33833
33834  ;;
33835esac
33836fi
33837POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
33838if test -n "$POTENTIAL_CXX"; then
33839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
33840$as_echo "$POTENTIAL_CXX" >&6; }
33841else
33842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33843$as_echo "no" >&6; }
33844fi
33845
33846
33847  test -n "$POTENTIAL_CXX" && break
33848done
33849
33850      if test "x$POTENTIAL_CXX" != x; then
33851        CXX=$POTENTIAL_CXX
33852      else
33853        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
33854      fi
33855    else
33856      # Otherwise it might already be a complete path
33857      if test ! -x "$CXX"; then
33858        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
33859      fi
33860    fi
33861  else
33862    # No user supplied value. Locate compiler ourselves.
33863
33864    # If we are cross compiling, assume cross compilation tools follows the
33865    # cross compilation standard where they are prefixed with the autoconf
33866    # standard name for the target. For example the binary
33867    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33868    # If we are not cross compiling, then the default compiler name will be
33869    # used.
33870
33871    CXX=
33872    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33873    # before checking the rest of the PATH.
33874    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33875    # step, this should not be necessary.
33876    if test -n "$TOOLCHAIN_PATH"; then
33877      PATH_save="$PATH"
33878      PATH="$TOOLCHAIN_PATH"
33879      for ac_prog in $SEARCH_LIST
33880do
33881  # Extract the first word of "$ac_prog", so it can be a program name with args.
33882set dummy $ac_prog; ac_word=$2
33883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33884$as_echo_n "checking for $ac_word... " >&6; }
33885if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
33886  $as_echo_n "(cached) " >&6
33887else
33888  case $TOOLCHAIN_PATH_CXX in
33889  [\\/]* | ?:[\\/]*)
33890  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
33891  ;;
33892  *)
33893  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33894for as_dir in $PATH
33895do
33896  IFS=$as_save_IFS
33897  test -z "$as_dir" && as_dir=.
33898    for ac_exec_ext in '' $ac_executable_extensions; do
33899  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33900    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
33901    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33902    break 2
33903  fi
33904done
33905  done
33906IFS=$as_save_IFS
33907
33908  ;;
33909esac
33910fi
33911TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
33912if test -n "$TOOLCHAIN_PATH_CXX"; then
33913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
33914$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
33915else
33916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33917$as_echo "no" >&6; }
33918fi
33919
33920
33921  test -n "$TOOLCHAIN_PATH_CXX" && break
33922done
33923
33924      CXX=$TOOLCHAIN_PATH_CXX
33925      PATH="$PATH_save"
33926    fi
33927
33928    # AC_PATH_PROGS can't be run multiple times with the same variable,
33929    # so create a new name for this run.
33930    if test "x$CXX" = x; then
33931      for ac_prog in $SEARCH_LIST
33932do
33933  # Extract the first word of "$ac_prog", so it can be a program name with args.
33934set dummy $ac_prog; ac_word=$2
33935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33936$as_echo_n "checking for $ac_word... " >&6; }
33937if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
33938  $as_echo_n "(cached) " >&6
33939else
33940  case $POTENTIAL_CXX in
33941  [\\/]* | ?:[\\/]*)
33942  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
33943  ;;
33944  *)
33945  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33946for as_dir in $PATH
33947do
33948  IFS=$as_save_IFS
33949  test -z "$as_dir" && as_dir=.
33950    for ac_exec_ext in '' $ac_executable_extensions; do
33951  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33952    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
33953    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33954    break 2
33955  fi
33956done
33957  done
33958IFS=$as_save_IFS
33959
33960  ;;
33961esac
33962fi
33963POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
33964if test -n "$POTENTIAL_CXX"; then
33965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
33966$as_echo "$POTENTIAL_CXX" >&6; }
33967else
33968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33969$as_echo "no" >&6; }
33970fi
33971
33972
33973  test -n "$POTENTIAL_CXX" && break
33974done
33975
33976      CXX=$POTENTIAL_CXX
33977    fi
33978
33979    if test "x$CXX" = x; then
33980
33981  # Print a helpful message on how to acquire the necessary build dependency.
33982  # devkit is the help tag: freetype, cups, alsa etc
33983  MISSING_DEPENDENCY=devkit
33984
33985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33986    cygwin_help $MISSING_DEPENDENCY
33987  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33988    msys_help $MISSING_DEPENDENCY
33989  else
33990    PKGHANDLER_COMMAND=
33991
33992    case $PKGHANDLER in
33993      apt-get)
33994        apt_help     $MISSING_DEPENDENCY ;;
33995      yum)
33996        yum_help     $MISSING_DEPENDENCY ;;
33997      port)
33998        port_help    $MISSING_DEPENDENCY ;;
33999      pkgutil)
34000        pkgutil_help $MISSING_DEPENDENCY ;;
34001      pkgadd)
34002        pkgadd_help  $MISSING_DEPENDENCY ;;
34003    esac
34004
34005    if test "x$PKGHANDLER_COMMAND" != x; then
34006      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34007    fi
34008  fi
34009
34010      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
34011    fi
34012  fi
34013
34014  # Now we have a compiler binary in CXX. Make sure it's okay.
34015
34016  # Only process if variable expands to non-empty
34017
34018  if test "x$CXX" != x; then
34019    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34020
34021  # First separate the path from the arguments. This will split at the first
34022  # space.
34023  complete="$CXX"
34024  path="${complete%% *}"
34025  tmp="$complete EOL"
34026  arguments="${tmp#* }"
34027
34028  # Input might be given as Windows format, start by converting to
34029  # unix format.
34030  new_path=`$CYGPATH -u "$path"`
34031
34032  # Now try to locate executable using which
34033  new_path=`$WHICH "$new_path" 2> /dev/null`
34034  # bat and cmd files are not always considered executable in cygwin causing which
34035  # to not find them
34036  if test "x$new_path" = x \
34037      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34038      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34039    new_path=`$CYGPATH -u "$path"`
34040  fi
34041  if test "x$new_path" = x; then
34042    # Oops. Which didn't find the executable.
34043    # The splitting of arguments from the executable at a space might have been incorrect,
34044    # since paths with space are more likely in Windows. Give it another try with the whole
34045    # argument.
34046    path="$complete"
34047    arguments="EOL"
34048    new_path=`$CYGPATH -u "$path"`
34049    new_path=`$WHICH "$new_path" 2> /dev/null`
34050    # bat and cmd files are not always considered executable in cygwin causing which
34051    # to not find them
34052    if test "x$new_path" = x \
34053        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34054        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34055      new_path=`$CYGPATH -u "$path"`
34056    fi
34057    if test "x$new_path" = x; then
34058      # It's still not found. Now this is an unrecoverable error.
34059      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34060$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34061      has_space=`$ECHO "$complete" | $GREP " "`
34062      if test "x$has_space" != x; then
34063        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34064$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34065      fi
34066      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34067    fi
34068  fi
34069
34070  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34071  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34072  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34073  # "foo.exe" is OK but "foo" is an error.
34074  #
34075  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34076  # It is also a way to make sure we got the proper file name for the real test later on.
34077  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34078  if test "x$test_shortpath" = x; then
34079    # Short path failed, file does not exist as specified.
34080    # Try adding .exe or .cmd
34081    if test -f "${new_path}.exe"; then
34082      input_to_shortpath="${new_path}.exe"
34083    elif test -f "${new_path}.cmd"; then
34084      input_to_shortpath="${new_path}.cmd"
34085    else
34086      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
34087$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
34088      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34089$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34090      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34091    fi
34092  else
34093    input_to_shortpath="$new_path"
34094  fi
34095
34096  # Call helper function which possibly converts this using DOS-style short mode.
34097  # If so, the updated path is stored in $new_path.
34098  new_path="$input_to_shortpath"
34099
34100  input_path="$input_to_shortpath"
34101  # Check if we need to convert this using DOS-style short mode. If the path
34102  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34103  # take no chances and rewrite it.
34104  # Note: m4 eats our [], so we need to use [ and ] instead.
34105  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34106  if test "x$has_forbidden_chars" != x; then
34107    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34108    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34109    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34110    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34111      # Going to short mode and back again did indeed matter. Since short mode is
34112      # case insensitive, let's make it lowercase to improve readability.
34113      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34114      # Now convert it back to Unix-style (cygpath)
34115      input_path=`$CYGPATH -u "$shortmode_path"`
34116      new_path="$input_path"
34117    fi
34118  fi
34119
34120  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34121  if test "x$test_cygdrive_prefix" = x; then
34122    # As a simple fix, exclude /usr/bin since it's not a real path.
34123    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34124      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34125      # a path prefixed by /cygdrive for fixpath to work.
34126      new_path="$CYGWIN_ROOT_PATH$input_path"
34127    fi
34128  fi
34129
34130  # remove trailing .exe if any
34131  new_path="${new_path/%.exe/}"
34132
34133    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34134
34135  # First separate the path from the arguments. This will split at the first
34136  # space.
34137  complete="$CXX"
34138  path="${complete%% *}"
34139  tmp="$complete EOL"
34140  arguments="${tmp#* }"
34141
34142  # Input might be given as Windows format, start by converting to
34143  # unix format.
34144  new_path="$path"
34145
34146  windows_path="$new_path"
34147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34148    unix_path=`$CYGPATH -u "$windows_path"`
34149    new_path="$unix_path"
34150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34151    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34152    new_path="$unix_path"
34153  fi
34154
34155
34156  # Now try to locate executable using which
34157  new_path=`$WHICH "$new_path" 2> /dev/null`
34158
34159  if test "x$new_path" = x; then
34160    # Oops. Which didn't find the executable.
34161    # The splitting of arguments from the executable at a space might have been incorrect,
34162    # since paths with space are more likely in Windows. Give it another try with the whole
34163    # argument.
34164    path="$complete"
34165    arguments="EOL"
34166    new_path="$path"
34167
34168  windows_path="$new_path"
34169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34170    unix_path=`$CYGPATH -u "$windows_path"`
34171    new_path="$unix_path"
34172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34173    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34174    new_path="$unix_path"
34175  fi
34176
34177
34178    new_path=`$WHICH "$new_path" 2> /dev/null`
34179    # bat and cmd files are not always considered executable in MSYS causing which
34180    # to not find them
34181    if test "x$new_path" = x \
34182        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34183        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34184      new_path="$path"
34185
34186  windows_path="$new_path"
34187  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34188    unix_path=`$CYGPATH -u "$windows_path"`
34189    new_path="$unix_path"
34190  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34191    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34192    new_path="$unix_path"
34193  fi
34194
34195    fi
34196
34197    if test "x$new_path" = x; then
34198      # It's still not found. Now this is an unrecoverable error.
34199      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34200$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34201      has_space=`$ECHO "$complete" | $GREP " "`
34202      if test "x$has_space" != x; then
34203        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34204$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34205      fi
34206      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34207    fi
34208  fi
34209
34210  # Now new_path has a complete unix path to the binary
34211  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34212    # Keep paths in /bin as-is, but remove trailing .exe if any
34213    new_path="${new_path/%.exe/}"
34214    # Do not save /bin paths to all_fixpath_prefixes!
34215  else
34216    # Not in mixed or Windows style, start by that.
34217    new_path=`cmd //c echo $new_path`
34218
34219  input_path="$new_path"
34220  # Check if we need to convert this using DOS-style short mode. If the path
34221  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34222  # take no chances and rewrite it.
34223  # Note: m4 eats our [], so we need to use [ and ] instead.
34224  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34225  if test "x$has_forbidden_chars" != x; then
34226    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34227    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34228  fi
34229
34230    # Output is in $new_path
34231
34232  windows_path="$new_path"
34233  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34234    unix_path=`$CYGPATH -u "$windows_path"`
34235    new_path="$unix_path"
34236  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34237    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34238    new_path="$unix_path"
34239  fi
34240
34241    # remove trailing .exe if any
34242    new_path="${new_path/%.exe/}"
34243
34244    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34245    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34246  fi
34247
34248    else
34249      # We're on a unix platform. Hooray! :)
34250      # First separate the path from the arguments. This will split at the first
34251      # space.
34252      complete="$CXX"
34253      path="${complete%% *}"
34254      tmp="$complete EOL"
34255      arguments="${tmp#* }"
34256
34257      # Cannot rely on the command "which" here since it doesn't always work.
34258      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34259      if test -z "$is_absolute_path"; then
34260        # Path to executable is not absolute. Find it.
34261        IFS_save="$IFS"
34262        IFS=:
34263        for p in $PATH; do
34264          if test -f "$p/$path" && test -x "$p/$path"; then
34265            new_path="$p/$path"
34266            break
34267          fi
34268        done
34269        IFS="$IFS_save"
34270      else
34271        # This is an absolute path, we can use it without further modifications.
34272        new_path="$path"
34273      fi
34274
34275      if test "x$new_path" = x; then
34276        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34277$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34278        has_space=`$ECHO "$complete" | $GREP " "`
34279        if test "x$has_space" != x; then
34280          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34281$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34282        fi
34283        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34284      fi
34285    fi
34286
34287    # Now join together the path and the arguments once again
34288    if test "x$arguments" != xEOL; then
34289      new_complete="$new_path ${arguments% *}"
34290    else
34291      new_complete="$new_path"
34292    fi
34293
34294    if test "x$complete" != "x$new_complete"; then
34295      CXX="$new_complete"
34296      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
34297$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
34298    fi
34299  fi
34300
34301  TEST_COMPILER="$CXX"
34302
34303  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
34304$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
34305  SYMLINK_ORIGINAL="$TEST_COMPILER"
34306
34307  if test "x$OPENJDK_BUILD_OS" != xwindows; then
34308    # Follow a chain of symbolic links. Use readlink
34309    # where it exists, else fall back to horribly
34310    # complicated shell code.
34311    if test "x$READLINK_TESTED" != yes; then
34312      # On MacOSX there is a readlink tool with a different
34313      # purpose than the GNU readlink tool. Check the found readlink.
34314      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34315      if test "x$ISGNU" = x; then
34316        # A readlink that we do not know how to use.
34317        # Are there other non-GNU readlinks out there?
34318        READLINK_TESTED=yes
34319        READLINK=
34320      fi
34321    fi
34322
34323    if test "x$READLINK" != x; then
34324      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34325    else
34326      # Save the current directory for restoring afterwards
34327      STARTDIR=$PWD
34328      COUNTER=0
34329      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34330      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34331      cd $sym_link_dir
34332      # Use -P flag to resolve symlinks in directories.
34333      cd `$THEPWDCMD -P`
34334      sym_link_dir=`$THEPWDCMD -P`
34335      # Resolve file symlinks
34336      while test $COUNTER -lt 20; do
34337        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34338        if test "x$ISLINK" == x; then
34339          # This is not a symbolic link! We are done!
34340          break
34341        fi
34342        # Again resolve directory symlinks since the target of the just found
34343        # link could be in a different directory
34344        cd `$DIRNAME $ISLINK`
34345        sym_link_dir=`$THEPWDCMD -P`
34346        sym_link_file=`$BASENAME $ISLINK`
34347        let COUNTER=COUNTER+1
34348      done
34349      cd $STARTDIR
34350      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34351    fi
34352  fi
34353
34354  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34355    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34356$as_echo "no symlink" >&6; }
34357  else
34358    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34359$as_echo "$SYMLINK_ORIGINAL" >&6; }
34360
34361    # We can't handle ccache by gcc wrappers, since we need to know if we're
34362    # using ccache. Instead ccache usage must be controlled by a configure option.
34363    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34364    if test "x$COMPILER_BASENAME" = "xccache"; then
34365      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34366$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34367      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34368    fi
34369  fi
34370
34371
34372  COMPILER=$CXX
34373  COMPILER_NAME=$COMPILER_NAME
34374
34375  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34376    # cc -V output typically looks like
34377    #     cc: Sun C 5.12 Linux_i386 2011/11/16
34378    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34379    # Check that this is likely to be the Solaris Studio cc.
34380    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
34381    if test $? -ne 0; then
34382      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34383      { $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
34384$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34385      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34386$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34387      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34388$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34389      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34390    fi
34391    # Remove usage instructions (if present), and
34392    # collapse compiler output into a single line
34393    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34394        $SED -e 's/ *[Uu]sage:.*//'`
34395    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34396        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34397  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34398    # xlc -qversion output typically looks like
34399    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34400    #     Version: 11.01.0000.0015
34401    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34402    # Check that this is likely to be the IBM XL C compiler.
34403    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34404    if test $? -ne 0; then
34405      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34406      { $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
34407$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34408      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34409$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34410      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34411$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34412      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34413    fi
34414    # Collapse compiler output into a single line
34415    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34416    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34417        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34418  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34419    # There is no specific version flag, but all output starts with a version string.
34420    # First line typically looks something like:
34421    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34422    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34423    # Check that this is likely to be Microsoft CL.EXE.
34424    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34425    if test $? -ne 0; then
34426      { $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
34427$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34428      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34429$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34430      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34431    fi
34432    # Collapse compiler output into a single line
34433    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34434    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34435        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34436  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34437    # gcc --version output typically looks like
34438    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34439    #     Copyright (C) 2013 Free Software Foundation, Inc.
34440    #     This is free software; see the source for copying conditions.  There is NO
34441    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34442    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34443    # Check that this is likely to be GCC.
34444    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34445    if test $? -ne 0; then
34446      { $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
34447$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34448      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34449$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34450      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34451    fi
34452    # Remove Copyright and legalese from version string, and
34453    # collapse into a single line
34454    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34455        $SED -e 's/ *Copyright .*//'`
34456    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34457        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
34458  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34459    # clang --version output typically looks like
34460    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34461    #    clang version 3.3 (tags/RELEASE_33/final)
34462    # or
34463    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34464    #    Target: x86_64-pc-linux-gnu
34465    #    Thread model: posix
34466    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34467    # Check that this is likely to be clang
34468    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34469    if test $? -ne 0; then
34470      { $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
34471$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34472      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34473$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34474      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34475    fi
34476    # Collapse compiler output into a single line
34477    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34478    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34479        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
34480  else
34481      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34482  fi
34483  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34484  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34485  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34486  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
34487
34488  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
34489$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
34490
34491
34492  # Now that we have resolved CXX ourself, let autoconf have its go at it
34493  ac_ext=cpp
34494ac_cpp='$CXXCPP $CPPFLAGS'
34495ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34496ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34497ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34498if test -z "$CXX"; then
34499  if test -n "$CCC"; then
34500    CXX=$CCC
34501  else
34502    if test -n "$ac_tool_prefix"; then
34503  for ac_prog in $CXX
34504  do
34505    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
34506set dummy $ac_tool_prefix$ac_prog; ac_word=$2
34507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34508$as_echo_n "checking for $ac_word... " >&6; }
34509if ${ac_cv_prog_CXX+:} false; then :
34510  $as_echo_n "(cached) " >&6
34511else
34512  if test -n "$CXX"; then
34513  ac_cv_prog_CXX="$CXX" # Let the user override the test.
34514else
34515as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34516for as_dir in $PATH
34517do
34518  IFS=$as_save_IFS
34519  test -z "$as_dir" && as_dir=.
34520    for ac_exec_ext in '' $ac_executable_extensions; do
34521  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34522    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
34523    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34524    break 2
34525  fi
34526done
34527  done
34528IFS=$as_save_IFS
34529
34530fi
34531fi
34532CXX=$ac_cv_prog_CXX
34533if test -n "$CXX"; then
34534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
34535$as_echo "$CXX" >&6; }
34536else
34537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34538$as_echo "no" >&6; }
34539fi
34540
34541
34542    test -n "$CXX" && break
34543  done
34544fi
34545if test -z "$CXX"; then
34546  ac_ct_CXX=$CXX
34547  for ac_prog in $CXX
34548do
34549  # Extract the first word of "$ac_prog", so it can be a program name with args.
34550set dummy $ac_prog; ac_word=$2
34551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34552$as_echo_n "checking for $ac_word... " >&6; }
34553if ${ac_cv_prog_ac_ct_CXX+:} false; then :
34554  $as_echo_n "(cached) " >&6
34555else
34556  if test -n "$ac_ct_CXX"; then
34557  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
34558else
34559as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34560for as_dir in $PATH
34561do
34562  IFS=$as_save_IFS
34563  test -z "$as_dir" && as_dir=.
34564    for ac_exec_ext in '' $ac_executable_extensions; do
34565  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34566    ac_cv_prog_ac_ct_CXX="$ac_prog"
34567    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34568    break 2
34569  fi
34570done
34571  done
34572IFS=$as_save_IFS
34573
34574fi
34575fi
34576ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
34577if test -n "$ac_ct_CXX"; then
34578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
34579$as_echo "$ac_ct_CXX" >&6; }
34580else
34581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34582$as_echo "no" >&6; }
34583fi
34584
34585
34586  test -n "$ac_ct_CXX" && break
34587done
34588
34589  if test "x$ac_ct_CXX" = x; then
34590    CXX="g++"
34591  else
34592    case $cross_compiling:$ac_tool_warned in
34593yes:)
34594{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34595$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34596ac_tool_warned=yes ;;
34597esac
34598    CXX=$ac_ct_CXX
34599  fi
34600fi
34601
34602  fi
34603fi
34604# Provide some information about the compiler.
34605$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
34606set X $ac_compile
34607ac_compiler=$2
34608for ac_option in --version -v -V -qversion; do
34609  { { ac_try="$ac_compiler $ac_option >&5"
34610case "(($ac_try" in
34611  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34612  *) ac_try_echo=$ac_try;;
34613esac
34614eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34615$as_echo "$ac_try_echo"; } >&5
34616  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
34617  ac_status=$?
34618  if test -s conftest.err; then
34619    sed '10a\
34620... rest of stderr output deleted ...
34621         10q' conftest.err >conftest.er1
34622    cat conftest.er1 >&5
34623  fi
34624  rm -f conftest.er1 conftest.err
34625  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34626  test $ac_status = 0; }
34627done
34628
34629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
34630$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
34631if ${ac_cv_cxx_compiler_gnu+:} false; then :
34632  $as_echo_n "(cached) " >&6
34633else
34634  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34635/* end confdefs.h.  */
34636
34637int
34638main ()
34639{
34640#ifndef __GNUC__
34641       choke me
34642#endif
34643
34644  ;
34645  return 0;
34646}
34647_ACEOF
34648if ac_fn_cxx_try_compile "$LINENO"; then :
34649  ac_compiler_gnu=yes
34650else
34651  ac_compiler_gnu=no
34652fi
34653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34654ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
34655
34656fi
34657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
34658$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
34659if test $ac_compiler_gnu = yes; then
34660  GXX=yes
34661else
34662  GXX=
34663fi
34664ac_test_CXXFLAGS=${CXXFLAGS+set}
34665ac_save_CXXFLAGS=$CXXFLAGS
34666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
34667$as_echo_n "checking whether $CXX accepts -g... " >&6; }
34668if ${ac_cv_prog_cxx_g+:} false; then :
34669  $as_echo_n "(cached) " >&6
34670else
34671  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
34672   ac_cxx_werror_flag=yes
34673   ac_cv_prog_cxx_g=no
34674   CXXFLAGS="-g"
34675   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34676/* end confdefs.h.  */
34677
34678int
34679main ()
34680{
34681
34682  ;
34683  return 0;
34684}
34685_ACEOF
34686if ac_fn_cxx_try_compile "$LINENO"; then :
34687  ac_cv_prog_cxx_g=yes
34688else
34689  CXXFLAGS=""
34690      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34691/* end confdefs.h.  */
34692
34693int
34694main ()
34695{
34696
34697  ;
34698  return 0;
34699}
34700_ACEOF
34701if ac_fn_cxx_try_compile "$LINENO"; then :
34702
34703else
34704  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
34705	 CXXFLAGS="-g"
34706	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34707/* end confdefs.h.  */
34708
34709int
34710main ()
34711{
34712
34713  ;
34714  return 0;
34715}
34716_ACEOF
34717if ac_fn_cxx_try_compile "$LINENO"; then :
34718  ac_cv_prog_cxx_g=yes
34719fi
34720rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34721fi
34722rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34723fi
34724rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34725   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
34726fi
34727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
34728$as_echo "$ac_cv_prog_cxx_g" >&6; }
34729if test "$ac_test_CXXFLAGS" = set; then
34730  CXXFLAGS=$ac_save_CXXFLAGS
34731elif test $ac_cv_prog_cxx_g = yes; then
34732  if test "$GXX" = yes; then
34733    CXXFLAGS="-g -O2"
34734  else
34735    CXXFLAGS="-g"
34736  fi
34737else
34738  if test "$GXX" = yes; then
34739    CXXFLAGS="-O2"
34740  else
34741    CXXFLAGS=
34742  fi
34743fi
34744ac_ext=cpp
34745ac_cpp='$CXXCPP $CPPFLAGS'
34746ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34747ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34748ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34749
34750
34751  # This is the compiler version number on the form X.Y[.Z]
34752
34753
34754
34755
34756  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
34757    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler has different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
34758$as_echo "$as_me: WARNING: C and C++ compiler has different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
34759    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
34760$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
34761  fi
34762
34763  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
34764  if  [[ "$CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
34765    { $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
34766$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;}
34767  fi
34768
34769  if  [[  "$CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
34770    { $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
34771$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
34772  fi
34773
34774  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$CC_VERSION_NUMBER"`
34775
34776
34777  if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
34778
34779
34780
34781
34782
34783
34784
34785
34786
34787
34788
34789
34790
34791
34792
34793
34794
34795
34796
34797
34798
34799
34800
34801
34802
34803
34804
34805
34806
34807
34808
34809
34810
34811
34812
34813
34814
34815
34816
34817
34818
34819
34820    # Execute function body
34821
34822  # Need to assign to a variable since m4 is blocked from modifying parts in [].
34823  REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
34824
34825  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
34826    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only three parts (X.Y.Z) is supported" "$LINENO" 5
34827  fi
34828
34829  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
34830    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
34831  fi
34832
34833  # Version comparison method inspired by http://stackoverflow.com/a/24067243
34834  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
34835
34836  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
34837    :
34838
34839  else
34840    :
34841
34842          { $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
34843$as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
34844
34845
34846  fi
34847
34848
34849
34850
34851
34852
34853
34854
34855
34856
34857
34858
34859  fi
34860
34861  #
34862  # Setup the preprocessor (CPP and CXXCPP)
34863  #
34864  ac_ext=c
34865ac_cpp='$CPP $CPPFLAGS'
34866ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34867ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34868ac_compiler_gnu=$ac_cv_c_compiler_gnu
34869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
34870$as_echo_n "checking how to run the C preprocessor... " >&6; }
34871# On Suns, sometimes $CPP names a directory.
34872if test -n "$CPP" && test -d "$CPP"; then
34873  CPP=
34874fi
34875if test -z "$CPP"; then
34876  if ${ac_cv_prog_CPP+:} false; then :
34877  $as_echo_n "(cached) " >&6
34878else
34879      # Double quotes because CPP needs to be expanded
34880    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
34881    do
34882      ac_preproc_ok=false
34883for ac_c_preproc_warn_flag in '' yes
34884do
34885  # Use a header file that comes with gcc, so configuring glibc
34886  # with a fresh cross-compiler works.
34887  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34888  # <limits.h> exists even on freestanding compilers.
34889  # On the NeXT, cc -E runs the code through the compiler's parser,
34890  # not just through cpp. "Syntax error" is here to catch this case.
34891  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34892/* end confdefs.h.  */
34893#ifdef __STDC__
34894# include <limits.h>
34895#else
34896# include <assert.h>
34897#endif
34898		     Syntax error
34899_ACEOF
34900if ac_fn_c_try_cpp "$LINENO"; then :
34901
34902else
34903  # Broken: fails on valid input.
34904continue
34905fi
34906rm -f conftest.err conftest.i conftest.$ac_ext
34907
34908  # OK, works on sane cases.  Now check whether nonexistent headers
34909  # can be detected and how.
34910  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34911/* end confdefs.h.  */
34912#include <ac_nonexistent.h>
34913_ACEOF
34914if ac_fn_c_try_cpp "$LINENO"; then :
34915  # Broken: success on invalid input.
34916continue
34917else
34918  # Passes both tests.
34919ac_preproc_ok=:
34920break
34921fi
34922rm -f conftest.err conftest.i conftest.$ac_ext
34923
34924done
34925# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34926rm -f conftest.i conftest.err conftest.$ac_ext
34927if $ac_preproc_ok; then :
34928  break
34929fi
34930
34931    done
34932    ac_cv_prog_CPP=$CPP
34933
34934fi
34935  CPP=$ac_cv_prog_CPP
34936else
34937  ac_cv_prog_CPP=$CPP
34938fi
34939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
34940$as_echo "$CPP" >&6; }
34941ac_preproc_ok=false
34942for ac_c_preproc_warn_flag in '' yes
34943do
34944  # Use a header file that comes with gcc, so configuring glibc
34945  # with a fresh cross-compiler works.
34946  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34947  # <limits.h> exists even on freestanding compilers.
34948  # On the NeXT, cc -E runs the code through the compiler's parser,
34949  # not just through cpp. "Syntax error" is here to catch this case.
34950  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34951/* end confdefs.h.  */
34952#ifdef __STDC__
34953# include <limits.h>
34954#else
34955# include <assert.h>
34956#endif
34957		     Syntax error
34958_ACEOF
34959if ac_fn_c_try_cpp "$LINENO"; then :
34960
34961else
34962  # Broken: fails on valid input.
34963continue
34964fi
34965rm -f conftest.err conftest.i conftest.$ac_ext
34966
34967  # OK, works on sane cases.  Now check whether nonexistent headers
34968  # can be detected and how.
34969  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34970/* end confdefs.h.  */
34971#include <ac_nonexistent.h>
34972_ACEOF
34973if ac_fn_c_try_cpp "$LINENO"; then :
34974  # Broken: success on invalid input.
34975continue
34976else
34977  # Passes both tests.
34978ac_preproc_ok=:
34979break
34980fi
34981rm -f conftest.err conftest.i conftest.$ac_ext
34982
34983done
34984# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34985rm -f conftest.i conftest.err conftest.$ac_ext
34986if $ac_preproc_ok; then :
34987
34988else
34989  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34990$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34991as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
34992See \`config.log' for more details" "$LINENO" 5; }
34993fi
34994
34995ac_ext=cpp
34996ac_cpp='$CXXCPP $CPPFLAGS'
34997ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34998ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34999ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35000
35001
35002  # Only process if variable expands to non-empty
35003
35004  if test "x$CPP" != x; then
35005    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35006
35007  # First separate the path from the arguments. This will split at the first
35008  # space.
35009  complete="$CPP"
35010  path="${complete%% *}"
35011  tmp="$complete EOL"
35012  arguments="${tmp#* }"
35013
35014  # Input might be given as Windows format, start by converting to
35015  # unix format.
35016  new_path=`$CYGPATH -u "$path"`
35017
35018  # Now try to locate executable using which
35019  new_path=`$WHICH "$new_path" 2> /dev/null`
35020  # bat and cmd files are not always considered executable in cygwin causing which
35021  # to not find them
35022  if test "x$new_path" = x \
35023      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35024      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35025    new_path=`$CYGPATH -u "$path"`
35026  fi
35027  if test "x$new_path" = x; then
35028    # Oops. Which didn't find the executable.
35029    # The splitting of arguments from the executable at a space might have been incorrect,
35030    # since paths with space are more likely in Windows. Give it another try with the whole
35031    # argument.
35032    path="$complete"
35033    arguments="EOL"
35034    new_path=`$CYGPATH -u "$path"`
35035    new_path=`$WHICH "$new_path" 2> /dev/null`
35036    # bat and cmd files are not always considered executable in cygwin causing which
35037    # to not find them
35038    if test "x$new_path" = x \
35039        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35040        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35041      new_path=`$CYGPATH -u "$path"`
35042    fi
35043    if test "x$new_path" = x; then
35044      # It's still not found. Now this is an unrecoverable error.
35045      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35046$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35047      has_space=`$ECHO "$complete" | $GREP " "`
35048      if test "x$has_space" != x; then
35049        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35050$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35051      fi
35052      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35053    fi
35054  fi
35055
35056  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35057  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35058  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35059  # "foo.exe" is OK but "foo" is an error.
35060  #
35061  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35062  # It is also a way to make sure we got the proper file name for the real test later on.
35063  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35064  if test "x$test_shortpath" = x; then
35065    # Short path failed, file does not exist as specified.
35066    # Try adding .exe or .cmd
35067    if test -f "${new_path}.exe"; then
35068      input_to_shortpath="${new_path}.exe"
35069    elif test -f "${new_path}.cmd"; then
35070      input_to_shortpath="${new_path}.cmd"
35071    else
35072      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
35073$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
35074      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35075$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35076      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35077    fi
35078  else
35079    input_to_shortpath="$new_path"
35080  fi
35081
35082  # Call helper function which possibly converts this using DOS-style short mode.
35083  # If so, the updated path is stored in $new_path.
35084  new_path="$input_to_shortpath"
35085
35086  input_path="$input_to_shortpath"
35087  # Check if we need to convert this using DOS-style short mode. If the path
35088  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35089  # take no chances and rewrite it.
35090  # Note: m4 eats our [], so we need to use [ and ] instead.
35091  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35092  if test "x$has_forbidden_chars" != x; then
35093    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35094    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35095    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35096    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35097      # Going to short mode and back again did indeed matter. Since short mode is
35098      # case insensitive, let's make it lowercase to improve readability.
35099      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35100      # Now convert it back to Unix-style (cygpath)
35101      input_path=`$CYGPATH -u "$shortmode_path"`
35102      new_path="$input_path"
35103    fi
35104  fi
35105
35106  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35107  if test "x$test_cygdrive_prefix" = x; then
35108    # As a simple fix, exclude /usr/bin since it's not a real path.
35109    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35110      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35111      # a path prefixed by /cygdrive for fixpath to work.
35112      new_path="$CYGWIN_ROOT_PATH$input_path"
35113    fi
35114  fi
35115
35116  # remove trailing .exe if any
35117  new_path="${new_path/%.exe/}"
35118
35119    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35120
35121  # First separate the path from the arguments. This will split at the first
35122  # space.
35123  complete="$CPP"
35124  path="${complete%% *}"
35125  tmp="$complete EOL"
35126  arguments="${tmp#* }"
35127
35128  # Input might be given as Windows format, start by converting to
35129  # unix format.
35130  new_path="$path"
35131
35132  windows_path="$new_path"
35133  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35134    unix_path=`$CYGPATH -u "$windows_path"`
35135    new_path="$unix_path"
35136  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35137    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35138    new_path="$unix_path"
35139  fi
35140
35141
35142  # Now try to locate executable using which
35143  new_path=`$WHICH "$new_path" 2> /dev/null`
35144
35145  if test "x$new_path" = x; then
35146    # Oops. Which didn't find the executable.
35147    # The splitting of arguments from the executable at a space might have been incorrect,
35148    # since paths with space are more likely in Windows. Give it another try with the whole
35149    # argument.
35150    path="$complete"
35151    arguments="EOL"
35152    new_path="$path"
35153
35154  windows_path="$new_path"
35155  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35156    unix_path=`$CYGPATH -u "$windows_path"`
35157    new_path="$unix_path"
35158  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35159    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35160    new_path="$unix_path"
35161  fi
35162
35163
35164    new_path=`$WHICH "$new_path" 2> /dev/null`
35165    # bat and cmd files are not always considered executable in MSYS causing which
35166    # to not find them
35167    if test "x$new_path" = x \
35168        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35169        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35170      new_path="$path"
35171
35172  windows_path="$new_path"
35173  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35174    unix_path=`$CYGPATH -u "$windows_path"`
35175    new_path="$unix_path"
35176  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35177    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35178    new_path="$unix_path"
35179  fi
35180
35181    fi
35182
35183    if test "x$new_path" = x; then
35184      # It's still not found. Now this is an unrecoverable error.
35185      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35186$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35187      has_space=`$ECHO "$complete" | $GREP " "`
35188      if test "x$has_space" != x; then
35189        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35190$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35191      fi
35192      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35193    fi
35194  fi
35195
35196  # Now new_path has a complete unix path to the binary
35197  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35198    # Keep paths in /bin as-is, but remove trailing .exe if any
35199    new_path="${new_path/%.exe/}"
35200    # Do not save /bin paths to all_fixpath_prefixes!
35201  else
35202    # Not in mixed or Windows style, start by that.
35203    new_path=`cmd //c echo $new_path`
35204
35205  input_path="$new_path"
35206  # Check if we need to convert this using DOS-style short mode. If the path
35207  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35208  # take no chances and rewrite it.
35209  # Note: m4 eats our [], so we need to use [ and ] instead.
35210  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35211  if test "x$has_forbidden_chars" != x; then
35212    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35213    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35214  fi
35215
35216    # Output is in $new_path
35217
35218  windows_path="$new_path"
35219  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35220    unix_path=`$CYGPATH -u "$windows_path"`
35221    new_path="$unix_path"
35222  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35223    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35224    new_path="$unix_path"
35225  fi
35226
35227    # remove trailing .exe if any
35228    new_path="${new_path/%.exe/}"
35229
35230    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35231    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35232  fi
35233
35234    else
35235      # We're on a unix platform. Hooray! :)
35236      # First separate the path from the arguments. This will split at the first
35237      # space.
35238      complete="$CPP"
35239      path="${complete%% *}"
35240      tmp="$complete EOL"
35241      arguments="${tmp#* }"
35242
35243      # Cannot rely on the command "which" here since it doesn't always work.
35244      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35245      if test -z "$is_absolute_path"; then
35246        # Path to executable is not absolute. Find it.
35247        IFS_save="$IFS"
35248        IFS=:
35249        for p in $PATH; do
35250          if test -f "$p/$path" && test -x "$p/$path"; then
35251            new_path="$p/$path"
35252            break
35253          fi
35254        done
35255        IFS="$IFS_save"
35256      else
35257        # This is an absolute path, we can use it without further modifications.
35258        new_path="$path"
35259      fi
35260
35261      if test "x$new_path" = x; then
35262        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35263$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35264        has_space=`$ECHO "$complete" | $GREP " "`
35265        if test "x$has_space" != x; then
35266          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35267$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35268        fi
35269        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35270      fi
35271    fi
35272
35273    # Now join together the path and the arguments once again
35274    if test "x$arguments" != xEOL; then
35275      new_complete="$new_path ${arguments% *}"
35276    else
35277      new_complete="$new_path"
35278    fi
35279
35280    if test "x$complete" != "x$new_complete"; then
35281      CPP="$new_complete"
35282      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
35283$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
35284    fi
35285  fi
35286
35287  ac_ext=cpp
35288ac_cpp='$CXXCPP $CPPFLAGS'
35289ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35290ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35291ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
35293$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
35294if test -z "$CXXCPP"; then
35295  if ${ac_cv_prog_CXXCPP+:} false; then :
35296  $as_echo_n "(cached) " >&6
35297else
35298      # Double quotes because CXXCPP needs to be expanded
35299    for CXXCPP in "$CXX -E" "/lib/cpp"
35300    do
35301      ac_preproc_ok=false
35302for ac_cxx_preproc_warn_flag in '' yes
35303do
35304  # Use a header file that comes with gcc, so configuring glibc
35305  # with a fresh cross-compiler works.
35306  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35307  # <limits.h> exists even on freestanding compilers.
35308  # On the NeXT, cc -E runs the code through the compiler's parser,
35309  # not just through cpp. "Syntax error" is here to catch this case.
35310  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35311/* end confdefs.h.  */
35312#ifdef __STDC__
35313# include <limits.h>
35314#else
35315# include <assert.h>
35316#endif
35317		     Syntax error
35318_ACEOF
35319if ac_fn_cxx_try_cpp "$LINENO"; then :
35320
35321else
35322  # Broken: fails on valid input.
35323continue
35324fi
35325rm -f conftest.err conftest.i conftest.$ac_ext
35326
35327  # OK, works on sane cases.  Now check whether nonexistent headers
35328  # can be detected and how.
35329  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35330/* end confdefs.h.  */
35331#include <ac_nonexistent.h>
35332_ACEOF
35333if ac_fn_cxx_try_cpp "$LINENO"; then :
35334  # Broken: success on invalid input.
35335continue
35336else
35337  # Passes both tests.
35338ac_preproc_ok=:
35339break
35340fi
35341rm -f conftest.err conftest.i conftest.$ac_ext
35342
35343done
35344# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35345rm -f conftest.i conftest.err conftest.$ac_ext
35346if $ac_preproc_ok; then :
35347  break
35348fi
35349
35350    done
35351    ac_cv_prog_CXXCPP=$CXXCPP
35352
35353fi
35354  CXXCPP=$ac_cv_prog_CXXCPP
35355else
35356  ac_cv_prog_CXXCPP=$CXXCPP
35357fi
35358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
35359$as_echo "$CXXCPP" >&6; }
35360ac_preproc_ok=false
35361for ac_cxx_preproc_warn_flag in '' yes
35362do
35363  # Use a header file that comes with gcc, so configuring glibc
35364  # with a fresh cross-compiler works.
35365  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35366  # <limits.h> exists even on freestanding compilers.
35367  # On the NeXT, cc -E runs the code through the compiler's parser,
35368  # not just through cpp. "Syntax error" is here to catch this case.
35369  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35370/* end confdefs.h.  */
35371#ifdef __STDC__
35372# include <limits.h>
35373#else
35374# include <assert.h>
35375#endif
35376		     Syntax error
35377_ACEOF
35378if ac_fn_cxx_try_cpp "$LINENO"; then :
35379
35380else
35381  # Broken: fails on valid input.
35382continue
35383fi
35384rm -f conftest.err conftest.i conftest.$ac_ext
35385
35386  # OK, works on sane cases.  Now check whether nonexistent headers
35387  # can be detected and how.
35388  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35389/* end confdefs.h.  */
35390#include <ac_nonexistent.h>
35391_ACEOF
35392if ac_fn_cxx_try_cpp "$LINENO"; then :
35393  # Broken: success on invalid input.
35394continue
35395else
35396  # Passes both tests.
35397ac_preproc_ok=:
35398break
35399fi
35400rm -f conftest.err conftest.i conftest.$ac_ext
35401
35402done
35403# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35404rm -f conftest.i conftest.err conftest.$ac_ext
35405if $ac_preproc_ok; then :
35406
35407else
35408  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35409$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35410as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
35411See \`config.log' for more details" "$LINENO" 5; }
35412fi
35413
35414ac_ext=cpp
35415ac_cpp='$CXXCPP $CPPFLAGS'
35416ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35417ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35418ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35419
35420
35421  # Only process if variable expands to non-empty
35422
35423  if test "x$CXXCPP" != x; then
35424    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35425
35426  # First separate the path from the arguments. This will split at the first
35427  # space.
35428  complete="$CXXCPP"
35429  path="${complete%% *}"
35430  tmp="$complete EOL"
35431  arguments="${tmp#* }"
35432
35433  # Input might be given as Windows format, start by converting to
35434  # unix format.
35435  new_path=`$CYGPATH -u "$path"`
35436
35437  # Now try to locate executable using which
35438  new_path=`$WHICH "$new_path" 2> /dev/null`
35439  # bat and cmd files are not always considered executable in cygwin causing which
35440  # to not find them
35441  if test "x$new_path" = x \
35442      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35443      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35444    new_path=`$CYGPATH -u "$path"`
35445  fi
35446  if test "x$new_path" = x; then
35447    # Oops. Which didn't find the executable.
35448    # The splitting of arguments from the executable at a space might have been incorrect,
35449    # since paths with space are more likely in Windows. Give it another try with the whole
35450    # argument.
35451    path="$complete"
35452    arguments="EOL"
35453    new_path=`$CYGPATH -u "$path"`
35454    new_path=`$WHICH "$new_path" 2> /dev/null`
35455    # bat and cmd files are not always considered executable in cygwin causing which
35456    # to not find them
35457    if test "x$new_path" = x \
35458        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35459        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35460      new_path=`$CYGPATH -u "$path"`
35461    fi
35462    if test "x$new_path" = x; then
35463      # It's still not found. Now this is an unrecoverable error.
35464      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35465$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35466      has_space=`$ECHO "$complete" | $GREP " "`
35467      if test "x$has_space" != x; then
35468        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35469$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35470      fi
35471      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35472    fi
35473  fi
35474
35475  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35476  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35477  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35478  # "foo.exe" is OK but "foo" is an error.
35479  #
35480  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35481  # It is also a way to make sure we got the proper file name for the real test later on.
35482  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35483  if test "x$test_shortpath" = x; then
35484    # Short path failed, file does not exist as specified.
35485    # Try adding .exe or .cmd
35486    if test -f "${new_path}.exe"; then
35487      input_to_shortpath="${new_path}.exe"
35488    elif test -f "${new_path}.cmd"; then
35489      input_to_shortpath="${new_path}.cmd"
35490    else
35491      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
35492$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
35493      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35494$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35495      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35496    fi
35497  else
35498    input_to_shortpath="$new_path"
35499  fi
35500
35501  # Call helper function which possibly converts this using DOS-style short mode.
35502  # If so, the updated path is stored in $new_path.
35503  new_path="$input_to_shortpath"
35504
35505  input_path="$input_to_shortpath"
35506  # Check if we need to convert this using DOS-style short mode. If the path
35507  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35508  # take no chances and rewrite it.
35509  # Note: m4 eats our [], so we need to use [ and ] instead.
35510  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35511  if test "x$has_forbidden_chars" != x; then
35512    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35513    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35514    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35515    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35516      # Going to short mode and back again did indeed matter. Since short mode is
35517      # case insensitive, let's make it lowercase to improve readability.
35518      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35519      # Now convert it back to Unix-style (cygpath)
35520      input_path=`$CYGPATH -u "$shortmode_path"`
35521      new_path="$input_path"
35522    fi
35523  fi
35524
35525  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35526  if test "x$test_cygdrive_prefix" = x; then
35527    # As a simple fix, exclude /usr/bin since it's not a real path.
35528    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35529      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35530      # a path prefixed by /cygdrive for fixpath to work.
35531      new_path="$CYGWIN_ROOT_PATH$input_path"
35532    fi
35533  fi
35534
35535  # remove trailing .exe if any
35536  new_path="${new_path/%.exe/}"
35537
35538    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35539
35540  # First separate the path from the arguments. This will split at the first
35541  # space.
35542  complete="$CXXCPP"
35543  path="${complete%% *}"
35544  tmp="$complete EOL"
35545  arguments="${tmp#* }"
35546
35547  # Input might be given as Windows format, start by converting to
35548  # unix format.
35549  new_path="$path"
35550
35551  windows_path="$new_path"
35552  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35553    unix_path=`$CYGPATH -u "$windows_path"`
35554    new_path="$unix_path"
35555  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35556    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35557    new_path="$unix_path"
35558  fi
35559
35560
35561  # Now try to locate executable using which
35562  new_path=`$WHICH "$new_path" 2> /dev/null`
35563
35564  if test "x$new_path" = x; then
35565    # Oops. Which didn't find the executable.
35566    # The splitting of arguments from the executable at a space might have been incorrect,
35567    # since paths with space are more likely in Windows. Give it another try with the whole
35568    # argument.
35569    path="$complete"
35570    arguments="EOL"
35571    new_path="$path"
35572
35573  windows_path="$new_path"
35574  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35575    unix_path=`$CYGPATH -u "$windows_path"`
35576    new_path="$unix_path"
35577  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35578    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35579    new_path="$unix_path"
35580  fi
35581
35582
35583    new_path=`$WHICH "$new_path" 2> /dev/null`
35584    # bat and cmd files are not always considered executable in MSYS causing which
35585    # to not find them
35586    if test "x$new_path" = x \
35587        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35588        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35589      new_path="$path"
35590
35591  windows_path="$new_path"
35592  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35593    unix_path=`$CYGPATH -u "$windows_path"`
35594    new_path="$unix_path"
35595  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35596    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35597    new_path="$unix_path"
35598  fi
35599
35600    fi
35601
35602    if test "x$new_path" = x; then
35603      # It's still not found. Now this is an unrecoverable error.
35604      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35605$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35606      has_space=`$ECHO "$complete" | $GREP " "`
35607      if test "x$has_space" != x; then
35608        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35609$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35610      fi
35611      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35612    fi
35613  fi
35614
35615  # Now new_path has a complete unix path to the binary
35616  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35617    # Keep paths in /bin as-is, but remove trailing .exe if any
35618    new_path="${new_path/%.exe/}"
35619    # Do not save /bin paths to all_fixpath_prefixes!
35620  else
35621    # Not in mixed or Windows style, start by that.
35622    new_path=`cmd //c echo $new_path`
35623
35624  input_path="$new_path"
35625  # Check if we need to convert this using DOS-style short mode. If the path
35626  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35627  # take no chances and rewrite it.
35628  # Note: m4 eats our [], so we need to use [ and ] instead.
35629  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35630  if test "x$has_forbidden_chars" != x; then
35631    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35632    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35633  fi
35634
35635    # Output is in $new_path
35636
35637  windows_path="$new_path"
35638  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35639    unix_path=`$CYGPATH -u "$windows_path"`
35640    new_path="$unix_path"
35641  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35642    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35643    new_path="$unix_path"
35644  fi
35645
35646    # remove trailing .exe if any
35647    new_path="${new_path/%.exe/}"
35648
35649    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35650    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35651  fi
35652
35653    else
35654      # We're on a unix platform. Hooray! :)
35655      # First separate the path from the arguments. This will split at the first
35656      # space.
35657      complete="$CXXCPP"
35658      path="${complete%% *}"
35659      tmp="$complete EOL"
35660      arguments="${tmp#* }"
35661
35662      # Cannot rely on the command "which" here since it doesn't always work.
35663      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35664      if test -z "$is_absolute_path"; then
35665        # Path to executable is not absolute. Find it.
35666        IFS_save="$IFS"
35667        IFS=:
35668        for p in $PATH; do
35669          if test -f "$p/$path" && test -x "$p/$path"; then
35670            new_path="$p/$path"
35671            break
35672          fi
35673        done
35674        IFS="$IFS_save"
35675      else
35676        # This is an absolute path, we can use it without further modifications.
35677        new_path="$path"
35678      fi
35679
35680      if test "x$new_path" = x; then
35681        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35682$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35683        has_space=`$ECHO "$complete" | $GREP " "`
35684        if test "x$has_space" != x; then
35685          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35686$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35687        fi
35688        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35689      fi
35690    fi
35691
35692    # Now join together the path and the arguments once again
35693    if test "x$arguments" != xEOL; then
35694      new_complete="$new_path ${arguments% *}"
35695    else
35696      new_complete="$new_path"
35697    fi
35698
35699    if test "x$complete" != "x$new_complete"; then
35700      CXXCPP="$new_complete"
35701      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
35702$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
35703    fi
35704  fi
35705
35706
35707  #
35708  # Setup the linker (LD)
35709  #
35710  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35711    # In the Microsoft toolchain we have a separate LD command "link".
35712    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
35713    # a cygwin program for something completely different.
35714    # Extract the first word of "link", so it can be a program name with args.
35715set dummy link; ac_word=$2
35716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35717$as_echo_n "checking for $ac_word... " >&6; }
35718if ${ac_cv_prog_LD+:} false; then :
35719  $as_echo_n "(cached) " >&6
35720else
35721  if test -n "$LD"; then
35722  ac_cv_prog_LD="$LD" # Let the user override the test.
35723else
35724  ac_prog_rejected=no
35725as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35726for as_dir in $PATH
35727do
35728  IFS=$as_save_IFS
35729  test -z "$as_dir" && as_dir=.
35730    for ac_exec_ext in '' $ac_executable_extensions; do
35731  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35732    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
35733       ac_prog_rejected=yes
35734       continue
35735     fi
35736    ac_cv_prog_LD="link"
35737    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35738    break 2
35739  fi
35740done
35741  done
35742IFS=$as_save_IFS
35743
35744if test $ac_prog_rejected = yes; then
35745  # We found a bogon in the path, so make sure we never use it.
35746  set dummy $ac_cv_prog_LD
35747  shift
35748  if test $# != 0; then
35749    # We chose a different compiler from the bogus one.
35750    # However, it has the same basename, so the bogon will be chosen
35751    # first if we set LD to just the basename; use the full file name.
35752    shift
35753    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
35754  fi
35755fi
35756fi
35757fi
35758LD=$ac_cv_prog_LD
35759if test -n "$LD"; then
35760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
35761$as_echo "$LD" >&6; }
35762else
35763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35764$as_echo "no" >&6; }
35765fi
35766
35767
35768
35769  # Only process if variable expands to non-empty
35770
35771  if test "x$LD" != x; then
35772    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35773
35774  # First separate the path from the arguments. This will split at the first
35775  # space.
35776  complete="$LD"
35777  path="${complete%% *}"
35778  tmp="$complete EOL"
35779  arguments="${tmp#* }"
35780
35781  # Input might be given as Windows format, start by converting to
35782  # unix format.
35783  new_path=`$CYGPATH -u "$path"`
35784
35785  # Now try to locate executable using which
35786  new_path=`$WHICH "$new_path" 2> /dev/null`
35787  # bat and cmd files are not always considered executable in cygwin causing which
35788  # to not find them
35789  if test "x$new_path" = x \
35790      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35791      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35792    new_path=`$CYGPATH -u "$path"`
35793  fi
35794  if test "x$new_path" = x; then
35795    # Oops. Which didn't find the executable.
35796    # The splitting of arguments from the executable at a space might have been incorrect,
35797    # since paths with space are more likely in Windows. Give it another try with the whole
35798    # argument.
35799    path="$complete"
35800    arguments="EOL"
35801    new_path=`$CYGPATH -u "$path"`
35802    new_path=`$WHICH "$new_path" 2> /dev/null`
35803    # bat and cmd files are not always considered executable in cygwin causing which
35804    # to not find them
35805    if test "x$new_path" = x \
35806        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35807        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35808      new_path=`$CYGPATH -u "$path"`
35809    fi
35810    if test "x$new_path" = x; then
35811      # It's still not found. Now this is an unrecoverable error.
35812      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35813$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35814      has_space=`$ECHO "$complete" | $GREP " "`
35815      if test "x$has_space" != x; then
35816        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35817$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35818      fi
35819      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35820    fi
35821  fi
35822
35823  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35824  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35825  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35826  # "foo.exe" is OK but "foo" is an error.
35827  #
35828  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35829  # It is also a way to make sure we got the proper file name for the real test later on.
35830  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35831  if test "x$test_shortpath" = x; then
35832    # Short path failed, file does not exist as specified.
35833    # Try adding .exe or .cmd
35834    if test -f "${new_path}.exe"; then
35835      input_to_shortpath="${new_path}.exe"
35836    elif test -f "${new_path}.cmd"; then
35837      input_to_shortpath="${new_path}.cmd"
35838    else
35839      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
35840$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
35841      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35842$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35843      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35844    fi
35845  else
35846    input_to_shortpath="$new_path"
35847  fi
35848
35849  # Call helper function which possibly converts this using DOS-style short mode.
35850  # If so, the updated path is stored in $new_path.
35851  new_path="$input_to_shortpath"
35852
35853  input_path="$input_to_shortpath"
35854  # Check if we need to convert this using DOS-style short mode. If the path
35855  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35856  # take no chances and rewrite it.
35857  # Note: m4 eats our [], so we need to use [ and ] instead.
35858  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35859  if test "x$has_forbidden_chars" != x; then
35860    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35861    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35862    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35863    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35864      # Going to short mode and back again did indeed matter. Since short mode is
35865      # case insensitive, let's make it lowercase to improve readability.
35866      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35867      # Now convert it back to Unix-style (cygpath)
35868      input_path=`$CYGPATH -u "$shortmode_path"`
35869      new_path="$input_path"
35870    fi
35871  fi
35872
35873  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35874  if test "x$test_cygdrive_prefix" = x; then
35875    # As a simple fix, exclude /usr/bin since it's not a real path.
35876    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35877      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35878      # a path prefixed by /cygdrive for fixpath to work.
35879      new_path="$CYGWIN_ROOT_PATH$input_path"
35880    fi
35881  fi
35882
35883  # remove trailing .exe if any
35884  new_path="${new_path/%.exe/}"
35885
35886    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35887
35888  # First separate the path from the arguments. This will split at the first
35889  # space.
35890  complete="$LD"
35891  path="${complete%% *}"
35892  tmp="$complete EOL"
35893  arguments="${tmp#* }"
35894
35895  # Input might be given as Windows format, start by converting to
35896  # unix format.
35897  new_path="$path"
35898
35899  windows_path="$new_path"
35900  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35901    unix_path=`$CYGPATH -u "$windows_path"`
35902    new_path="$unix_path"
35903  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35904    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35905    new_path="$unix_path"
35906  fi
35907
35908
35909  # Now try to locate executable using which
35910  new_path=`$WHICH "$new_path" 2> /dev/null`
35911
35912  if test "x$new_path" = x; then
35913    # Oops. Which didn't find the executable.
35914    # The splitting of arguments from the executable at a space might have been incorrect,
35915    # since paths with space are more likely in Windows. Give it another try with the whole
35916    # argument.
35917    path="$complete"
35918    arguments="EOL"
35919    new_path="$path"
35920
35921  windows_path="$new_path"
35922  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35923    unix_path=`$CYGPATH -u "$windows_path"`
35924    new_path="$unix_path"
35925  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35926    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35927    new_path="$unix_path"
35928  fi
35929
35930
35931    new_path=`$WHICH "$new_path" 2> /dev/null`
35932    # bat and cmd files are not always considered executable in MSYS causing which
35933    # to not find them
35934    if test "x$new_path" = x \
35935        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35936        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35937      new_path="$path"
35938
35939  windows_path="$new_path"
35940  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35941    unix_path=`$CYGPATH -u "$windows_path"`
35942    new_path="$unix_path"
35943  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35944    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35945    new_path="$unix_path"
35946  fi
35947
35948    fi
35949
35950    if test "x$new_path" = x; then
35951      # It's still not found. Now this is an unrecoverable error.
35952      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35953$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35954      has_space=`$ECHO "$complete" | $GREP " "`
35955      if test "x$has_space" != x; then
35956        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35957$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35958      fi
35959      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35960    fi
35961  fi
35962
35963  # Now new_path has a complete unix path to the binary
35964  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35965    # Keep paths in /bin as-is, but remove trailing .exe if any
35966    new_path="${new_path/%.exe/}"
35967    # Do not save /bin paths to all_fixpath_prefixes!
35968  else
35969    # Not in mixed or Windows style, start by that.
35970    new_path=`cmd //c echo $new_path`
35971
35972  input_path="$new_path"
35973  # Check if we need to convert this using DOS-style short mode. If the path
35974  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35975  # take no chances and rewrite it.
35976  # Note: m4 eats our [], so we need to use [ and ] instead.
35977  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35978  if test "x$has_forbidden_chars" != x; then
35979    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35980    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35981  fi
35982
35983    # Output is in $new_path
35984
35985  windows_path="$new_path"
35986  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35987    unix_path=`$CYGPATH -u "$windows_path"`
35988    new_path="$unix_path"
35989  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35990    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35991    new_path="$unix_path"
35992  fi
35993
35994    # remove trailing .exe if any
35995    new_path="${new_path/%.exe/}"
35996
35997    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35998    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35999  fi
36000
36001    else
36002      # We're on a unix platform. Hooray! :)
36003      # First separate the path from the arguments. This will split at the first
36004      # space.
36005      complete="$LD"
36006      path="${complete%% *}"
36007      tmp="$complete EOL"
36008      arguments="${tmp#* }"
36009
36010      # Cannot rely on the command "which" here since it doesn't always work.
36011      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36012      if test -z "$is_absolute_path"; then
36013        # Path to executable is not absolute. Find it.
36014        IFS_save="$IFS"
36015        IFS=:
36016        for p in $PATH; do
36017          if test -f "$p/$path" && test -x "$p/$path"; then
36018            new_path="$p/$path"
36019            break
36020          fi
36021        done
36022        IFS="$IFS_save"
36023      else
36024        # This is an absolute path, we can use it without further modifications.
36025        new_path="$path"
36026      fi
36027
36028      if test "x$new_path" = x; then
36029        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36030$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36031        has_space=`$ECHO "$complete" | $GREP " "`
36032        if test "x$has_space" != x; then
36033          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36034$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36035        fi
36036        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36037      fi
36038    fi
36039
36040    # Now join together the path and the arguments once again
36041    if test "x$arguments" != xEOL; then
36042      new_complete="$new_path ${arguments% *}"
36043    else
36044      new_complete="$new_path"
36045    fi
36046
36047    if test "x$complete" != "x$new_complete"; then
36048      LD="$new_complete"
36049      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
36050$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
36051    fi
36052  fi
36053
36054    # Verify that we indeed succeeded with this trick.
36055    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
36056$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
36057    "$LD" --version > /dev/null
36058    if test $? -eq 0 ; then
36059      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36060$as_echo "no" >&6; }
36061      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
36062    else
36063      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36064$as_echo "yes" >&6; }
36065    fi
36066    LDCXX="$LD"
36067  else
36068    # All other toolchains use the compiler to link.
36069    LD="$CC"
36070    LDCXX="$CXX"
36071  fi
36072
36073  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
36074
36075
36076  #
36077  # Setup the assembler (AS)
36078  #
36079  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
36080    # FIXME: should this really be solaris, or solstudio?
36081
36082
36083  # Publish this variable in the help.
36084
36085
36086  if [ -z "${AS+x}" ]; then
36087    # The variable is not set by user, try to locate tool using the code snippet
36088    for ac_prog in as
36089do
36090  # Extract the first word of "$ac_prog", so it can be a program name with args.
36091set dummy $ac_prog; ac_word=$2
36092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36093$as_echo_n "checking for $ac_word... " >&6; }
36094if ${ac_cv_path_AS+:} false; then :
36095  $as_echo_n "(cached) " >&6
36096else
36097  case $AS in
36098  [\\/]* | ?:[\\/]*)
36099  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36100  ;;
36101  *)
36102  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36103for as_dir in $PATH
36104do
36105  IFS=$as_save_IFS
36106  test -z "$as_dir" && as_dir=.
36107    for ac_exec_ext in '' $ac_executable_extensions; do
36108  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36109    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36110    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36111    break 2
36112  fi
36113done
36114  done
36115IFS=$as_save_IFS
36116
36117  ;;
36118esac
36119fi
36120AS=$ac_cv_path_AS
36121if test -n "$AS"; then
36122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36123$as_echo "$AS" >&6; }
36124else
36125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36126$as_echo "no" >&6; }
36127fi
36128
36129
36130  test -n "$AS" && break
36131done
36132
36133  else
36134    # The variable is set, but is it from the command line or the environment?
36135
36136    # Try to remove the string !AS! from our list.
36137    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
36138    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36139      # If it failed, the variable was not from the command line. Ignore it,
36140      # but warn the user (except for BASH, which is always set by the calling BASH).
36141      if test "xAS" != xBASH; then
36142        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
36143$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
36144      fi
36145      # Try to locate tool using the code snippet
36146      for ac_prog in as
36147do
36148  # Extract the first word of "$ac_prog", so it can be a program name with args.
36149set dummy $ac_prog; ac_word=$2
36150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36151$as_echo_n "checking for $ac_word... " >&6; }
36152if ${ac_cv_path_AS+:} false; then :
36153  $as_echo_n "(cached) " >&6
36154else
36155  case $AS in
36156  [\\/]* | ?:[\\/]*)
36157  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36158  ;;
36159  *)
36160  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36161for as_dir in $PATH
36162do
36163  IFS=$as_save_IFS
36164  test -z "$as_dir" && as_dir=.
36165    for ac_exec_ext in '' $ac_executable_extensions; do
36166  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36167    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36168    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36169    break 2
36170  fi
36171done
36172  done
36173IFS=$as_save_IFS
36174
36175  ;;
36176esac
36177fi
36178AS=$ac_cv_path_AS
36179if test -n "$AS"; then
36180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36181$as_echo "$AS" >&6; }
36182else
36183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36184$as_echo "no" >&6; }
36185fi
36186
36187
36188  test -n "$AS" && break
36189done
36190
36191    else
36192      # If it succeeded, then it was overridden by the user. We will use it
36193      # for the tool.
36194
36195      # First remove it from the list of overridden variables, so we can test
36196      # for unknown variables in the end.
36197      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36198
36199      # Check if we try to supply an empty value
36200      if test "x$AS" = x; then
36201        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
36202$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
36203        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36204$as_echo_n "checking for AS... " >&6; }
36205        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36206$as_echo "disabled" >&6; }
36207      else
36208        # Check if the provided tool contains a complete path.
36209        tool_specified="$AS"
36210        tool_basename="${tool_specified##*/}"
36211        if test "x$tool_basename" = "x$tool_specified"; then
36212          # A command without a complete path is provided, search $PATH.
36213          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
36214$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
36215          # Extract the first word of "$tool_basename", so it can be a program name with args.
36216set dummy $tool_basename; ac_word=$2
36217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36218$as_echo_n "checking for $ac_word... " >&6; }
36219if ${ac_cv_path_AS+:} false; then :
36220  $as_echo_n "(cached) " >&6
36221else
36222  case $AS in
36223  [\\/]* | ?:[\\/]*)
36224  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36225  ;;
36226  *)
36227  as_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    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36235    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36236    break 2
36237  fi
36238done
36239  done
36240IFS=$as_save_IFS
36241
36242  ;;
36243esac
36244fi
36245AS=$ac_cv_path_AS
36246if test -n "$AS"; then
36247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36248$as_echo "$AS" >&6; }
36249else
36250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36251$as_echo "no" >&6; }
36252fi
36253
36254
36255          if test "x$AS" = x; then
36256            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36257          fi
36258        else
36259          # Otherwise we believe it is a complete path. Use it as it is.
36260          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
36261$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
36262          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36263$as_echo_n "checking for AS... " >&6; }
36264          if test ! -x "$tool_specified"; then
36265            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36266$as_echo "not found" >&6; }
36267            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
36268          fi
36269          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36270$as_echo "$tool_specified" >&6; }
36271        fi
36272      fi
36273    fi
36274
36275  fi
36276
36277
36278
36279  # Only process if variable expands to non-empty
36280
36281  if test "x$AS" != x; then
36282    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36283
36284  # First separate the path from the arguments. This will split at the first
36285  # space.
36286  complete="$AS"
36287  path="${complete%% *}"
36288  tmp="$complete EOL"
36289  arguments="${tmp#* }"
36290
36291  # Input might be given as Windows format, start by converting to
36292  # unix format.
36293  new_path=`$CYGPATH -u "$path"`
36294
36295  # Now try to locate executable using which
36296  new_path=`$WHICH "$new_path" 2> /dev/null`
36297  # bat and cmd files are not always considered executable in cygwin causing which
36298  # to not find them
36299  if test "x$new_path" = x \
36300      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36301      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36302    new_path=`$CYGPATH -u "$path"`
36303  fi
36304  if test "x$new_path" = x; then
36305    # Oops. Which didn't find the executable.
36306    # The splitting of arguments from the executable at a space might have been incorrect,
36307    # since paths with space are more likely in Windows. Give it another try with the whole
36308    # argument.
36309    path="$complete"
36310    arguments="EOL"
36311    new_path=`$CYGPATH -u "$path"`
36312    new_path=`$WHICH "$new_path" 2> /dev/null`
36313    # bat and cmd files are not always considered executable in cygwin causing which
36314    # to not find them
36315    if test "x$new_path" = x \
36316        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36317        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36318      new_path=`$CYGPATH -u "$path"`
36319    fi
36320    if test "x$new_path" = x; then
36321      # It's still not found. Now this is an unrecoverable error.
36322      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36323$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36324      has_space=`$ECHO "$complete" | $GREP " "`
36325      if test "x$has_space" != x; then
36326        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36327$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36328      fi
36329      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36330    fi
36331  fi
36332
36333  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36334  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36335  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36336  # "foo.exe" is OK but "foo" is an error.
36337  #
36338  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36339  # It is also a way to make sure we got the proper file name for the real test later on.
36340  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36341  if test "x$test_shortpath" = x; then
36342    # Short path failed, file does not exist as specified.
36343    # Try adding .exe or .cmd
36344    if test -f "${new_path}.exe"; then
36345      input_to_shortpath="${new_path}.exe"
36346    elif test -f "${new_path}.cmd"; then
36347      input_to_shortpath="${new_path}.cmd"
36348    else
36349      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
36350$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
36351      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36352$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36353      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36354    fi
36355  else
36356    input_to_shortpath="$new_path"
36357  fi
36358
36359  # Call helper function which possibly converts this using DOS-style short mode.
36360  # If so, the updated path is stored in $new_path.
36361  new_path="$input_to_shortpath"
36362
36363  input_path="$input_to_shortpath"
36364  # Check if we need to convert this using DOS-style short mode. If the path
36365  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36366  # take no chances and rewrite it.
36367  # Note: m4 eats our [], so we need to use [ and ] instead.
36368  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36369  if test "x$has_forbidden_chars" != x; then
36370    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36371    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36372    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36373    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36374      # Going to short mode and back again did indeed matter. Since short mode is
36375      # case insensitive, let's make it lowercase to improve readability.
36376      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36377      # Now convert it back to Unix-style (cygpath)
36378      input_path=`$CYGPATH -u "$shortmode_path"`
36379      new_path="$input_path"
36380    fi
36381  fi
36382
36383  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36384  if test "x$test_cygdrive_prefix" = x; then
36385    # As a simple fix, exclude /usr/bin since it's not a real path.
36386    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36387      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36388      # a path prefixed by /cygdrive for fixpath to work.
36389      new_path="$CYGWIN_ROOT_PATH$input_path"
36390    fi
36391  fi
36392
36393  # remove trailing .exe if any
36394  new_path="${new_path/%.exe/}"
36395
36396    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36397
36398  # First separate the path from the arguments. This will split at the first
36399  # space.
36400  complete="$AS"
36401  path="${complete%% *}"
36402  tmp="$complete EOL"
36403  arguments="${tmp#* }"
36404
36405  # Input might be given as Windows format, start by converting to
36406  # unix format.
36407  new_path="$path"
36408
36409  windows_path="$new_path"
36410  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36411    unix_path=`$CYGPATH -u "$windows_path"`
36412    new_path="$unix_path"
36413  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36414    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36415    new_path="$unix_path"
36416  fi
36417
36418
36419  # Now try to locate executable using which
36420  new_path=`$WHICH "$new_path" 2> /dev/null`
36421
36422  if test "x$new_path" = x; then
36423    # Oops. Which didn't find the executable.
36424    # The splitting of arguments from the executable at a space might have been incorrect,
36425    # since paths with space are more likely in Windows. Give it another try with the whole
36426    # argument.
36427    path="$complete"
36428    arguments="EOL"
36429    new_path="$path"
36430
36431  windows_path="$new_path"
36432  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36433    unix_path=`$CYGPATH -u "$windows_path"`
36434    new_path="$unix_path"
36435  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36436    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36437    new_path="$unix_path"
36438  fi
36439
36440
36441    new_path=`$WHICH "$new_path" 2> /dev/null`
36442    # bat and cmd files are not always considered executable in MSYS causing which
36443    # to not find them
36444    if test "x$new_path" = x \
36445        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36446        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36447      new_path="$path"
36448
36449  windows_path="$new_path"
36450  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36451    unix_path=`$CYGPATH -u "$windows_path"`
36452    new_path="$unix_path"
36453  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36454    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36455    new_path="$unix_path"
36456  fi
36457
36458    fi
36459
36460    if test "x$new_path" = x; then
36461      # It's still not found. Now this is an unrecoverable error.
36462      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36463$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36464      has_space=`$ECHO "$complete" | $GREP " "`
36465      if test "x$has_space" != x; then
36466        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36467$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36468      fi
36469      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36470    fi
36471  fi
36472
36473  # Now new_path has a complete unix path to the binary
36474  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36475    # Keep paths in /bin as-is, but remove trailing .exe if any
36476    new_path="${new_path/%.exe/}"
36477    # Do not save /bin paths to all_fixpath_prefixes!
36478  else
36479    # Not in mixed or Windows style, start by that.
36480    new_path=`cmd //c echo $new_path`
36481
36482  input_path="$new_path"
36483  # Check if we need to convert this using DOS-style short mode. If the path
36484  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36485  # take no chances and rewrite it.
36486  # Note: m4 eats our [], so we need to use [ and ] instead.
36487  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36488  if test "x$has_forbidden_chars" != x; then
36489    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36490    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36491  fi
36492
36493    # Output is in $new_path
36494
36495  windows_path="$new_path"
36496  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36497    unix_path=`$CYGPATH -u "$windows_path"`
36498    new_path="$unix_path"
36499  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36500    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36501    new_path="$unix_path"
36502  fi
36503
36504    # remove trailing .exe if any
36505    new_path="${new_path/%.exe/}"
36506
36507    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36508    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36509  fi
36510
36511    else
36512      # We're on a unix platform. Hooray! :)
36513      # First separate the path from the arguments. This will split at the first
36514      # space.
36515      complete="$AS"
36516      path="${complete%% *}"
36517      tmp="$complete EOL"
36518      arguments="${tmp#* }"
36519
36520      # Cannot rely on the command "which" here since it doesn't always work.
36521      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36522      if test -z "$is_absolute_path"; then
36523        # Path to executable is not absolute. Find it.
36524        IFS_save="$IFS"
36525        IFS=:
36526        for p in $PATH; do
36527          if test -f "$p/$path" && test -x "$p/$path"; then
36528            new_path="$p/$path"
36529            break
36530          fi
36531        done
36532        IFS="$IFS_save"
36533      else
36534        # This is an absolute path, we can use it without further modifications.
36535        new_path="$path"
36536      fi
36537
36538      if test "x$new_path" = x; then
36539        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36540$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36541        has_space=`$ECHO "$complete" | $GREP " "`
36542        if test "x$has_space" != x; then
36543          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36544$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36545        fi
36546        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36547      fi
36548    fi
36549
36550    # Now join together the path and the arguments once again
36551    if test "x$arguments" != xEOL; then
36552      new_complete="$new_path ${arguments% *}"
36553    else
36554      new_complete="$new_path"
36555    fi
36556
36557    if test "x$complete" != "x$new_complete"; then
36558      AS="$new_complete"
36559      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
36560$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
36561    fi
36562  fi
36563
36564  else
36565    # FIXME: is this correct for microsoft?
36566    AS="$CC -c"
36567  fi
36568
36569
36570  #
36571  # Setup the archiver (AR)
36572  #
36573  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36574    # The corresponding ar tool is lib.exe (used to create static libraries)
36575    # Extract the first word of "lib", so it can be a program name with args.
36576set dummy lib; ac_word=$2
36577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36578$as_echo_n "checking for $ac_word... " >&6; }
36579if ${ac_cv_prog_AR+:} false; then :
36580  $as_echo_n "(cached) " >&6
36581else
36582  if test -n "$AR"; then
36583  ac_cv_prog_AR="$AR" # Let the user override the test.
36584else
36585as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36586for as_dir in $PATH
36587do
36588  IFS=$as_save_IFS
36589  test -z "$as_dir" && as_dir=.
36590    for ac_exec_ext in '' $ac_executable_extensions; do
36591  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36592    ac_cv_prog_AR="lib"
36593    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36594    break 2
36595  fi
36596done
36597  done
36598IFS=$as_save_IFS
36599
36600fi
36601fi
36602AR=$ac_cv_prog_AR
36603if test -n "$AR"; then
36604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36605$as_echo "$AR" >&6; }
36606else
36607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36608$as_echo "no" >&6; }
36609fi
36610
36611
36612  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
36613
36614
36615  # Publish this variable in the help.
36616
36617
36618  if [ -z "${AR+x}" ]; then
36619    # The variable is not set by user, try to locate tool using the code snippet
36620    if test -n "$ac_tool_prefix"; then
36621  for ac_prog in ar gcc-ar
36622  do
36623    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36624set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36626$as_echo_n "checking for $ac_word... " >&6; }
36627if ${ac_cv_prog_AR+:} false; then :
36628  $as_echo_n "(cached) " >&6
36629else
36630  if test -n "$AR"; then
36631  ac_cv_prog_AR="$AR" # Let the user override the test.
36632else
36633as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36634for as_dir in $PATH
36635do
36636  IFS=$as_save_IFS
36637  test -z "$as_dir" && as_dir=.
36638    for ac_exec_ext in '' $ac_executable_extensions; do
36639  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36640    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36641    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36642    break 2
36643  fi
36644done
36645  done
36646IFS=$as_save_IFS
36647
36648fi
36649fi
36650AR=$ac_cv_prog_AR
36651if test -n "$AR"; then
36652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36653$as_echo "$AR" >&6; }
36654else
36655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36656$as_echo "no" >&6; }
36657fi
36658
36659
36660    test -n "$AR" && break
36661  done
36662fi
36663if test -z "$AR"; then
36664  ac_ct_AR=$AR
36665  for ac_prog in ar gcc-ar
36666do
36667  # Extract the first word of "$ac_prog", so it can be a program name with args.
36668set dummy $ac_prog; ac_word=$2
36669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36670$as_echo_n "checking for $ac_word... " >&6; }
36671if ${ac_cv_prog_ac_ct_AR+:} false; then :
36672  $as_echo_n "(cached) " >&6
36673else
36674  if test -n "$ac_ct_AR"; then
36675  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36676else
36677as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36678for as_dir in $PATH
36679do
36680  IFS=$as_save_IFS
36681  test -z "$as_dir" && as_dir=.
36682    for ac_exec_ext in '' $ac_executable_extensions; do
36683  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36684    ac_cv_prog_ac_ct_AR="$ac_prog"
36685    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36686    break 2
36687  fi
36688done
36689  done
36690IFS=$as_save_IFS
36691
36692fi
36693fi
36694ac_ct_AR=$ac_cv_prog_ac_ct_AR
36695if test -n "$ac_ct_AR"; then
36696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36697$as_echo "$ac_ct_AR" >&6; }
36698else
36699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36700$as_echo "no" >&6; }
36701fi
36702
36703
36704  test -n "$ac_ct_AR" && break
36705done
36706
36707  if test "x$ac_ct_AR" = x; then
36708    AR=""
36709  else
36710    case $cross_compiling:$ac_tool_warned in
36711yes:)
36712{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36713$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36714ac_tool_warned=yes ;;
36715esac
36716    AR=$ac_ct_AR
36717  fi
36718fi
36719
36720  else
36721    # The variable is set, but is it from the command line or the environment?
36722
36723    # Try to remove the string !AR! from our list.
36724    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
36725    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36726      # If it failed, the variable was not from the command line. Ignore it,
36727      # but warn the user (except for BASH, which is always set by the calling BASH).
36728      if test "xAR" != xBASH; then
36729        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
36730$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
36731      fi
36732      # Try to locate tool using the code snippet
36733      if test -n "$ac_tool_prefix"; then
36734  for ac_prog in ar gcc-ar
36735  do
36736    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36737set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36739$as_echo_n "checking for $ac_word... " >&6; }
36740if ${ac_cv_prog_AR+:} false; then :
36741  $as_echo_n "(cached) " >&6
36742else
36743  if test -n "$AR"; then
36744  ac_cv_prog_AR="$AR" # Let the user override the test.
36745else
36746as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36747for as_dir in $PATH
36748do
36749  IFS=$as_save_IFS
36750  test -z "$as_dir" && as_dir=.
36751    for ac_exec_ext in '' $ac_executable_extensions; do
36752  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36753    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36754    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36755    break 2
36756  fi
36757done
36758  done
36759IFS=$as_save_IFS
36760
36761fi
36762fi
36763AR=$ac_cv_prog_AR
36764if test -n "$AR"; then
36765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36766$as_echo "$AR" >&6; }
36767else
36768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36769$as_echo "no" >&6; }
36770fi
36771
36772
36773    test -n "$AR" && break
36774  done
36775fi
36776if test -z "$AR"; then
36777  ac_ct_AR=$AR
36778  for ac_prog in ar gcc-ar
36779do
36780  # Extract the first word of "$ac_prog", so it can be a program name with args.
36781set dummy $ac_prog; ac_word=$2
36782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36783$as_echo_n "checking for $ac_word... " >&6; }
36784if ${ac_cv_prog_ac_ct_AR+:} false; then :
36785  $as_echo_n "(cached) " >&6
36786else
36787  if test -n "$ac_ct_AR"; then
36788  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36789else
36790as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36791for as_dir in $PATH
36792do
36793  IFS=$as_save_IFS
36794  test -z "$as_dir" && as_dir=.
36795    for ac_exec_ext in '' $ac_executable_extensions; do
36796  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36797    ac_cv_prog_ac_ct_AR="$ac_prog"
36798    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36799    break 2
36800  fi
36801done
36802  done
36803IFS=$as_save_IFS
36804
36805fi
36806fi
36807ac_ct_AR=$ac_cv_prog_ac_ct_AR
36808if test -n "$ac_ct_AR"; then
36809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36810$as_echo "$ac_ct_AR" >&6; }
36811else
36812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36813$as_echo "no" >&6; }
36814fi
36815
36816
36817  test -n "$ac_ct_AR" && break
36818done
36819
36820  if test "x$ac_ct_AR" = x; then
36821    AR=""
36822  else
36823    case $cross_compiling:$ac_tool_warned in
36824yes:)
36825{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36826$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36827ac_tool_warned=yes ;;
36828esac
36829    AR=$ac_ct_AR
36830  fi
36831fi
36832
36833    else
36834      # If it succeeded, then it was overridden by the user. We will use it
36835      # for the tool.
36836
36837      # First remove it from the list of overridden variables, so we can test
36838      # for unknown variables in the end.
36839      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36840
36841      # Check if we try to supply an empty value
36842      if test "x$AR" = x; then
36843        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
36844$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
36845        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36846$as_echo_n "checking for AR... " >&6; }
36847        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36848$as_echo "disabled" >&6; }
36849      else
36850        # Check if the provided tool contains a complete path.
36851        tool_specified="$AR"
36852        tool_basename="${tool_specified##*/}"
36853        if test "x$tool_basename" = "x$tool_specified"; then
36854          # A command without a complete path is provided, search $PATH.
36855          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
36856$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
36857          # Extract the first word of "$tool_basename", so it can be a program name with args.
36858set dummy $tool_basename; ac_word=$2
36859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36860$as_echo_n "checking for $ac_word... " >&6; }
36861if ${ac_cv_path_AR+:} false; then :
36862  $as_echo_n "(cached) " >&6
36863else
36864  case $AR in
36865  [\\/]* | ?:[\\/]*)
36866  ac_cv_path_AR="$AR" # Let the user override the test with a path.
36867  ;;
36868  *)
36869  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36870for as_dir in $PATH
36871do
36872  IFS=$as_save_IFS
36873  test -z "$as_dir" && as_dir=.
36874    for ac_exec_ext in '' $ac_executable_extensions; do
36875  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36876    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
36877    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36878    break 2
36879  fi
36880done
36881  done
36882IFS=$as_save_IFS
36883
36884  ;;
36885esac
36886fi
36887AR=$ac_cv_path_AR
36888if test -n "$AR"; then
36889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36890$as_echo "$AR" >&6; }
36891else
36892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36893$as_echo "no" >&6; }
36894fi
36895
36896
36897          if test "x$AR" = x; then
36898            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36899          fi
36900        else
36901          # Otherwise we believe it is a complete path. Use it as it is.
36902          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
36903$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
36904          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36905$as_echo_n "checking for AR... " >&6; }
36906          if test ! -x "$tool_specified"; then
36907            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36908$as_echo "not found" >&6; }
36909            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
36910          fi
36911          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36912$as_echo "$tool_specified" >&6; }
36913        fi
36914      fi
36915    fi
36916
36917  fi
36918
36919
36920  else
36921
36922
36923  # Publish this variable in the help.
36924
36925
36926  if [ -z "${AR+x}" ]; then
36927    # The variable is not set by user, try to locate tool using the code snippet
36928    if test -n "$ac_tool_prefix"; then
36929  for ac_prog in ar
36930  do
36931    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36932set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36934$as_echo_n "checking for $ac_word... " >&6; }
36935if ${ac_cv_prog_AR+:} false; then :
36936  $as_echo_n "(cached) " >&6
36937else
36938  if test -n "$AR"; then
36939  ac_cv_prog_AR="$AR" # Let the user override the test.
36940else
36941as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36942for as_dir in $PATH
36943do
36944  IFS=$as_save_IFS
36945  test -z "$as_dir" && as_dir=.
36946    for ac_exec_ext in '' $ac_executable_extensions; do
36947  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36948    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36949    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36950    break 2
36951  fi
36952done
36953  done
36954IFS=$as_save_IFS
36955
36956fi
36957fi
36958AR=$ac_cv_prog_AR
36959if test -n "$AR"; then
36960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36961$as_echo "$AR" >&6; }
36962else
36963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36964$as_echo "no" >&6; }
36965fi
36966
36967
36968    test -n "$AR" && break
36969  done
36970fi
36971if test -z "$AR"; then
36972  ac_ct_AR=$AR
36973  for ac_prog in ar
36974do
36975  # Extract the first word of "$ac_prog", so it can be a program name with args.
36976set dummy $ac_prog; ac_word=$2
36977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36978$as_echo_n "checking for $ac_word... " >&6; }
36979if ${ac_cv_prog_ac_ct_AR+:} false; then :
36980  $as_echo_n "(cached) " >&6
36981else
36982  if test -n "$ac_ct_AR"; then
36983  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36984else
36985as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36986for as_dir in $PATH
36987do
36988  IFS=$as_save_IFS
36989  test -z "$as_dir" && as_dir=.
36990    for ac_exec_ext in '' $ac_executable_extensions; do
36991  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36992    ac_cv_prog_ac_ct_AR="$ac_prog"
36993    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36994    break 2
36995  fi
36996done
36997  done
36998IFS=$as_save_IFS
36999
37000fi
37001fi
37002ac_ct_AR=$ac_cv_prog_ac_ct_AR
37003if test -n "$ac_ct_AR"; then
37004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37005$as_echo "$ac_ct_AR" >&6; }
37006else
37007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37008$as_echo "no" >&6; }
37009fi
37010
37011
37012  test -n "$ac_ct_AR" && break
37013done
37014
37015  if test "x$ac_ct_AR" = x; then
37016    AR=""
37017  else
37018    case $cross_compiling:$ac_tool_warned in
37019yes:)
37020{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37021$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37022ac_tool_warned=yes ;;
37023esac
37024    AR=$ac_ct_AR
37025  fi
37026fi
37027
37028  else
37029    # The variable is set, but is it from the command line or the environment?
37030
37031    # Try to remove the string !AR! from our list.
37032    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37033    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37034      # If it failed, the variable was not from the command line. Ignore it,
37035      # but warn the user (except for BASH, which is always set by the calling BASH).
37036      if test "xAR" != xBASH; then
37037        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37038$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37039      fi
37040      # Try to locate tool using the code snippet
37041      if test -n "$ac_tool_prefix"; then
37042  for ac_prog in ar
37043  do
37044    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37045set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37047$as_echo_n "checking for $ac_word... " >&6; }
37048if ${ac_cv_prog_AR+:} false; then :
37049  $as_echo_n "(cached) " >&6
37050else
37051  if test -n "$AR"; then
37052  ac_cv_prog_AR="$AR" # Let the user override the test.
37053else
37054as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37055for as_dir in $PATH
37056do
37057  IFS=$as_save_IFS
37058  test -z "$as_dir" && as_dir=.
37059    for ac_exec_ext in '' $ac_executable_extensions; do
37060  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37061    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37062    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37063    break 2
37064  fi
37065done
37066  done
37067IFS=$as_save_IFS
37068
37069fi
37070fi
37071AR=$ac_cv_prog_AR
37072if test -n "$AR"; then
37073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37074$as_echo "$AR" >&6; }
37075else
37076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37077$as_echo "no" >&6; }
37078fi
37079
37080
37081    test -n "$AR" && break
37082  done
37083fi
37084if test -z "$AR"; then
37085  ac_ct_AR=$AR
37086  for ac_prog in ar
37087do
37088  # Extract the first word of "$ac_prog", so it can be a program name with args.
37089set dummy $ac_prog; ac_word=$2
37090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37091$as_echo_n "checking for $ac_word... " >&6; }
37092if ${ac_cv_prog_ac_ct_AR+:} false; then :
37093  $as_echo_n "(cached) " >&6
37094else
37095  if test -n "$ac_ct_AR"; then
37096  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37097else
37098as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37099for as_dir in $PATH
37100do
37101  IFS=$as_save_IFS
37102  test -z "$as_dir" && as_dir=.
37103    for ac_exec_ext in '' $ac_executable_extensions; do
37104  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37105    ac_cv_prog_ac_ct_AR="$ac_prog"
37106    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37107    break 2
37108  fi
37109done
37110  done
37111IFS=$as_save_IFS
37112
37113fi
37114fi
37115ac_ct_AR=$ac_cv_prog_ac_ct_AR
37116if test -n "$ac_ct_AR"; then
37117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37118$as_echo "$ac_ct_AR" >&6; }
37119else
37120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37121$as_echo "no" >&6; }
37122fi
37123
37124
37125  test -n "$ac_ct_AR" && break
37126done
37127
37128  if test "x$ac_ct_AR" = x; then
37129    AR=""
37130  else
37131    case $cross_compiling:$ac_tool_warned in
37132yes:)
37133{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37134$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37135ac_tool_warned=yes ;;
37136esac
37137    AR=$ac_ct_AR
37138  fi
37139fi
37140
37141    else
37142      # If it succeeded, then it was overridden by the user. We will use it
37143      # for the tool.
37144
37145      # First remove it from the list of overridden variables, so we can test
37146      # for unknown variables in the end.
37147      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37148
37149      # Check if we try to supply an empty value
37150      if test "x$AR" = x; then
37151        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37152$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37153        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37154$as_echo_n "checking for AR... " >&6; }
37155        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37156$as_echo "disabled" >&6; }
37157      else
37158        # Check if the provided tool contains a complete path.
37159        tool_specified="$AR"
37160        tool_basename="${tool_specified##*/}"
37161        if test "x$tool_basename" = "x$tool_specified"; then
37162          # A command without a complete path is provided, search $PATH.
37163          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37164$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37165          # Extract the first word of "$tool_basename", so it can be a program name with args.
37166set dummy $tool_basename; ac_word=$2
37167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37168$as_echo_n "checking for $ac_word... " >&6; }
37169if ${ac_cv_path_AR+:} false; then :
37170  $as_echo_n "(cached) " >&6
37171else
37172  case $AR in
37173  [\\/]* | ?:[\\/]*)
37174  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37175  ;;
37176  *)
37177  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37178for as_dir in $PATH
37179do
37180  IFS=$as_save_IFS
37181  test -z "$as_dir" && as_dir=.
37182    for ac_exec_ext in '' $ac_executable_extensions; do
37183  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37184    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37185    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37186    break 2
37187  fi
37188done
37189  done
37190IFS=$as_save_IFS
37191
37192  ;;
37193esac
37194fi
37195AR=$ac_cv_path_AR
37196if test -n "$AR"; then
37197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37198$as_echo "$AR" >&6; }
37199else
37200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37201$as_echo "no" >&6; }
37202fi
37203
37204
37205          if test "x$AR" = x; then
37206            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37207          fi
37208        else
37209          # Otherwise we believe it is a complete path. Use it as it is.
37210          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37211$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37212          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37213$as_echo_n "checking for AR... " >&6; }
37214          if test ! -x "$tool_specified"; then
37215            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37216$as_echo "not found" >&6; }
37217            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37218          fi
37219          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37220$as_echo "$tool_specified" >&6; }
37221        fi
37222      fi
37223    fi
37224
37225  fi
37226
37227
37228  fi
37229
37230  # Only process if variable expands to non-empty
37231
37232  if test "x$AR" != x; then
37233    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37234
37235  # First separate the path from the arguments. This will split at the first
37236  # space.
37237  complete="$AR"
37238  path="${complete%% *}"
37239  tmp="$complete EOL"
37240  arguments="${tmp#* }"
37241
37242  # Input might be given as Windows format, start by converting to
37243  # unix format.
37244  new_path=`$CYGPATH -u "$path"`
37245
37246  # Now try to locate executable using which
37247  new_path=`$WHICH "$new_path" 2> /dev/null`
37248  # bat and cmd files are not always considered executable in cygwin causing which
37249  # to not find them
37250  if test "x$new_path" = x \
37251      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37252      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37253    new_path=`$CYGPATH -u "$path"`
37254  fi
37255  if test "x$new_path" = x; then
37256    # Oops. Which didn't find the executable.
37257    # The splitting of arguments from the executable at a space might have been incorrect,
37258    # since paths with space are more likely in Windows. Give it another try with the whole
37259    # argument.
37260    path="$complete"
37261    arguments="EOL"
37262    new_path=`$CYGPATH -u "$path"`
37263    new_path=`$WHICH "$new_path" 2> /dev/null`
37264    # bat and cmd files are not always considered executable in cygwin causing which
37265    # to not find them
37266    if test "x$new_path" = x \
37267        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37268        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37269      new_path=`$CYGPATH -u "$path"`
37270    fi
37271    if test "x$new_path" = x; then
37272      # It's still not found. Now this is an unrecoverable error.
37273      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37274$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37275      has_space=`$ECHO "$complete" | $GREP " "`
37276      if test "x$has_space" != x; then
37277        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37278$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37279      fi
37280      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37281    fi
37282  fi
37283
37284  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37285  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37286  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37287  # "foo.exe" is OK but "foo" is an error.
37288  #
37289  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37290  # It is also a way to make sure we got the proper file name for the real test later on.
37291  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37292  if test "x$test_shortpath" = x; then
37293    # Short path failed, file does not exist as specified.
37294    # Try adding .exe or .cmd
37295    if test -f "${new_path}.exe"; then
37296      input_to_shortpath="${new_path}.exe"
37297    elif test -f "${new_path}.cmd"; then
37298      input_to_shortpath="${new_path}.cmd"
37299    else
37300      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
37301$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
37302      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37303$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37304      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37305    fi
37306  else
37307    input_to_shortpath="$new_path"
37308  fi
37309
37310  # Call helper function which possibly converts this using DOS-style short mode.
37311  # If so, the updated path is stored in $new_path.
37312  new_path="$input_to_shortpath"
37313
37314  input_path="$input_to_shortpath"
37315  # Check if we need to convert this using DOS-style short mode. If the path
37316  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37317  # take no chances and rewrite it.
37318  # Note: m4 eats our [], so we need to use [ and ] instead.
37319  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37320  if test "x$has_forbidden_chars" != x; then
37321    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37322    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37323    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37324    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37325      # Going to short mode and back again did indeed matter. Since short mode is
37326      # case insensitive, let's make it lowercase to improve readability.
37327      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37328      # Now convert it back to Unix-style (cygpath)
37329      input_path=`$CYGPATH -u "$shortmode_path"`
37330      new_path="$input_path"
37331    fi
37332  fi
37333
37334  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37335  if test "x$test_cygdrive_prefix" = x; then
37336    # As a simple fix, exclude /usr/bin since it's not a real path.
37337    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37338      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37339      # a path prefixed by /cygdrive for fixpath to work.
37340      new_path="$CYGWIN_ROOT_PATH$input_path"
37341    fi
37342  fi
37343
37344  # remove trailing .exe if any
37345  new_path="${new_path/%.exe/}"
37346
37347    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37348
37349  # First separate the path from the arguments. This will split at the first
37350  # space.
37351  complete="$AR"
37352  path="${complete%% *}"
37353  tmp="$complete EOL"
37354  arguments="${tmp#* }"
37355
37356  # Input might be given as Windows format, start by converting to
37357  # unix format.
37358  new_path="$path"
37359
37360  windows_path="$new_path"
37361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37362    unix_path=`$CYGPATH -u "$windows_path"`
37363    new_path="$unix_path"
37364  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37365    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37366    new_path="$unix_path"
37367  fi
37368
37369
37370  # Now try to locate executable using which
37371  new_path=`$WHICH "$new_path" 2> /dev/null`
37372
37373  if test "x$new_path" = x; then
37374    # Oops. Which didn't find the executable.
37375    # The splitting of arguments from the executable at a space might have been incorrect,
37376    # since paths with space are more likely in Windows. Give it another try with the whole
37377    # argument.
37378    path="$complete"
37379    arguments="EOL"
37380    new_path="$path"
37381
37382  windows_path="$new_path"
37383  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37384    unix_path=`$CYGPATH -u "$windows_path"`
37385    new_path="$unix_path"
37386  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37387    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37388    new_path="$unix_path"
37389  fi
37390
37391
37392    new_path=`$WHICH "$new_path" 2> /dev/null`
37393    # bat and cmd files are not always considered executable in MSYS causing which
37394    # to not find them
37395    if test "x$new_path" = x \
37396        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37397        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37398      new_path="$path"
37399
37400  windows_path="$new_path"
37401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37402    unix_path=`$CYGPATH -u "$windows_path"`
37403    new_path="$unix_path"
37404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37405    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37406    new_path="$unix_path"
37407  fi
37408
37409    fi
37410
37411    if test "x$new_path" = x; then
37412      # It's still not found. Now this is an unrecoverable error.
37413      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37414$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37415      has_space=`$ECHO "$complete" | $GREP " "`
37416      if test "x$has_space" != x; then
37417        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37418$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37419      fi
37420      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37421    fi
37422  fi
37423
37424  # Now new_path has a complete unix path to the binary
37425  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37426    # Keep paths in /bin as-is, but remove trailing .exe if any
37427    new_path="${new_path/%.exe/}"
37428    # Do not save /bin paths to all_fixpath_prefixes!
37429  else
37430    # Not in mixed or Windows style, start by that.
37431    new_path=`cmd //c echo $new_path`
37432
37433  input_path="$new_path"
37434  # Check if we need to convert this using DOS-style short mode. If the path
37435  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37436  # take no chances and rewrite it.
37437  # Note: m4 eats our [], so we need to use [ and ] instead.
37438  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37439  if test "x$has_forbidden_chars" != x; then
37440    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37441    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37442  fi
37443
37444    # Output is in $new_path
37445
37446  windows_path="$new_path"
37447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37448    unix_path=`$CYGPATH -u "$windows_path"`
37449    new_path="$unix_path"
37450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37451    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37452    new_path="$unix_path"
37453  fi
37454
37455    # remove trailing .exe if any
37456    new_path="${new_path/%.exe/}"
37457
37458    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37459    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37460  fi
37461
37462    else
37463      # We're on a unix platform. Hooray! :)
37464      # First separate the path from the arguments. This will split at the first
37465      # space.
37466      complete="$AR"
37467      path="${complete%% *}"
37468      tmp="$complete EOL"
37469      arguments="${tmp#* }"
37470
37471      # Cannot rely on the command "which" here since it doesn't always work.
37472      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37473      if test -z "$is_absolute_path"; then
37474        # Path to executable is not absolute. Find it.
37475        IFS_save="$IFS"
37476        IFS=:
37477        for p in $PATH; do
37478          if test -f "$p/$path" && test -x "$p/$path"; then
37479            new_path="$p/$path"
37480            break
37481          fi
37482        done
37483        IFS="$IFS_save"
37484      else
37485        # This is an absolute path, we can use it without further modifications.
37486        new_path="$path"
37487      fi
37488
37489      if test "x$new_path" = x; then
37490        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37491$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37492        has_space=`$ECHO "$complete" | $GREP " "`
37493        if test "x$has_space" != x; then
37494          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37495$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37496        fi
37497        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37498      fi
37499    fi
37500
37501    # Now join together the path and the arguments once again
37502    if test "x$arguments" != xEOL; then
37503      new_complete="$new_path ${arguments% *}"
37504    else
37505      new_complete="$new_path"
37506    fi
37507
37508    if test "x$complete" != "x$new_complete"; then
37509      AR="$new_complete"
37510      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
37511$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
37512    fi
37513  fi
37514
37515
37516
37517  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
37518
37519
37520  # Publish this variable in the help.
37521
37522
37523  if [ -z "${LIPO+x}" ]; then
37524    # The variable is not set by user, try to locate tool using the code snippet
37525    for ac_prog in lipo
37526do
37527  # Extract the first word of "$ac_prog", so it can be a program name with args.
37528set dummy $ac_prog; ac_word=$2
37529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37530$as_echo_n "checking for $ac_word... " >&6; }
37531if ${ac_cv_path_LIPO+:} false; then :
37532  $as_echo_n "(cached) " >&6
37533else
37534  case $LIPO in
37535  [\\/]* | ?:[\\/]*)
37536  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
37537  ;;
37538  *)
37539  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37540for as_dir in $PATH
37541do
37542  IFS=$as_save_IFS
37543  test -z "$as_dir" && as_dir=.
37544    for ac_exec_ext in '' $ac_executable_extensions; do
37545  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37546    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
37547    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37548    break 2
37549  fi
37550done
37551  done
37552IFS=$as_save_IFS
37553
37554  ;;
37555esac
37556fi
37557LIPO=$ac_cv_path_LIPO
37558if test -n "$LIPO"; then
37559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
37560$as_echo "$LIPO" >&6; }
37561else
37562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37563$as_echo "no" >&6; }
37564fi
37565
37566
37567  test -n "$LIPO" && break
37568done
37569
37570  else
37571    # The variable is set, but is it from the command line or the environment?
37572
37573    # Try to remove the string !LIPO! from our list.
37574    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
37575    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37576      # If it failed, the variable was not from the command line. Ignore it,
37577      # but warn the user (except for BASH, which is always set by the calling BASH).
37578      if test "xLIPO" != xBASH; then
37579        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
37580$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
37581      fi
37582      # Try to locate tool using the code snippet
37583      for ac_prog in lipo
37584do
37585  # Extract the first word of "$ac_prog", so it can be a program name with args.
37586set dummy $ac_prog; ac_word=$2
37587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37588$as_echo_n "checking for $ac_word... " >&6; }
37589if ${ac_cv_path_LIPO+:} false; then :
37590  $as_echo_n "(cached) " >&6
37591else
37592  case $LIPO in
37593  [\\/]* | ?:[\\/]*)
37594  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
37595  ;;
37596  *)
37597  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37598for as_dir in $PATH
37599do
37600  IFS=$as_save_IFS
37601  test -z "$as_dir" && as_dir=.
37602    for ac_exec_ext in '' $ac_executable_extensions; do
37603  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37604    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
37605    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37606    break 2
37607  fi
37608done
37609  done
37610IFS=$as_save_IFS
37611
37612  ;;
37613esac
37614fi
37615LIPO=$ac_cv_path_LIPO
37616if test -n "$LIPO"; then
37617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
37618$as_echo "$LIPO" >&6; }
37619else
37620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37621$as_echo "no" >&6; }
37622fi
37623
37624
37625  test -n "$LIPO" && break
37626done
37627
37628    else
37629      # If it succeeded, then it was overridden by the user. We will use it
37630      # for the tool.
37631
37632      # First remove it from the list of overridden variables, so we can test
37633      # for unknown variables in the end.
37634      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37635
37636      # Check if we try to supply an empty value
37637      if test "x$LIPO" = x; then
37638        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
37639$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
37640        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
37641$as_echo_n "checking for LIPO... " >&6; }
37642        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37643$as_echo "disabled" >&6; }
37644      else
37645        # Check if the provided tool contains a complete path.
37646        tool_specified="$LIPO"
37647        tool_basename="${tool_specified##*/}"
37648        if test "x$tool_basename" = "x$tool_specified"; then
37649          # A command without a complete path is provided, search $PATH.
37650          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
37651$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
37652          # Extract the first word of "$tool_basename", so it can be a program name with args.
37653set dummy $tool_basename; ac_word=$2
37654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37655$as_echo_n "checking for $ac_word... " >&6; }
37656if ${ac_cv_path_LIPO+:} false; then :
37657  $as_echo_n "(cached) " >&6
37658else
37659  case $LIPO in
37660  [\\/]* | ?:[\\/]*)
37661  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
37662  ;;
37663  *)
37664  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37665for as_dir in $PATH
37666do
37667  IFS=$as_save_IFS
37668  test -z "$as_dir" && as_dir=.
37669    for ac_exec_ext in '' $ac_executable_extensions; do
37670  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37671    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
37672    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37673    break 2
37674  fi
37675done
37676  done
37677IFS=$as_save_IFS
37678
37679  ;;
37680esac
37681fi
37682LIPO=$ac_cv_path_LIPO
37683if test -n "$LIPO"; then
37684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
37685$as_echo "$LIPO" >&6; }
37686else
37687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37688$as_echo "no" >&6; }
37689fi
37690
37691
37692          if test "x$LIPO" = x; then
37693            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37694          fi
37695        else
37696          # Otherwise we believe it is a complete path. Use it as it is.
37697          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
37698$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
37699          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
37700$as_echo_n "checking for LIPO... " >&6; }
37701          if test ! -x "$tool_specified"; then
37702            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37703$as_echo "not found" >&6; }
37704            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
37705          fi
37706          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37707$as_echo "$tool_specified" >&6; }
37708        fi
37709      fi
37710    fi
37711
37712  fi
37713
37714
37715
37716  # Only process if variable expands to non-empty
37717
37718  if test "x$LIPO" != x; then
37719    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37720
37721  # First separate the path from the arguments. This will split at the first
37722  # space.
37723  complete="$LIPO"
37724  path="${complete%% *}"
37725  tmp="$complete EOL"
37726  arguments="${tmp#* }"
37727
37728  # Input might be given as Windows format, start by converting to
37729  # unix format.
37730  new_path=`$CYGPATH -u "$path"`
37731
37732  # Now try to locate executable using which
37733  new_path=`$WHICH "$new_path" 2> /dev/null`
37734  # bat and cmd files are not always considered executable in cygwin causing which
37735  # to not find them
37736  if test "x$new_path" = x \
37737      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37738      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37739    new_path=`$CYGPATH -u "$path"`
37740  fi
37741  if test "x$new_path" = x; then
37742    # Oops. Which didn't find the executable.
37743    # The splitting of arguments from the executable at a space might have been incorrect,
37744    # since paths with space are more likely in Windows. Give it another try with the whole
37745    # argument.
37746    path="$complete"
37747    arguments="EOL"
37748    new_path=`$CYGPATH -u "$path"`
37749    new_path=`$WHICH "$new_path" 2> /dev/null`
37750    # bat and cmd files are not always considered executable in cygwin causing which
37751    # to not find them
37752    if test "x$new_path" = x \
37753        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37754        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37755      new_path=`$CYGPATH -u "$path"`
37756    fi
37757    if test "x$new_path" = x; then
37758      # It's still not found. Now this is an unrecoverable error.
37759      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37760$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37761      has_space=`$ECHO "$complete" | $GREP " "`
37762      if test "x$has_space" != x; then
37763        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37764$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37765      fi
37766      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37767    fi
37768  fi
37769
37770  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37771  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37772  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37773  # "foo.exe" is OK but "foo" is an error.
37774  #
37775  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37776  # It is also a way to make sure we got the proper file name for the real test later on.
37777  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37778  if test "x$test_shortpath" = x; then
37779    # Short path failed, file does not exist as specified.
37780    # Try adding .exe or .cmd
37781    if test -f "${new_path}.exe"; then
37782      input_to_shortpath="${new_path}.exe"
37783    elif test -f "${new_path}.cmd"; then
37784      input_to_shortpath="${new_path}.cmd"
37785    else
37786      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
37787$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
37788      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37789$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37790      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37791    fi
37792  else
37793    input_to_shortpath="$new_path"
37794  fi
37795
37796  # Call helper function which possibly converts this using DOS-style short mode.
37797  # If so, the updated path is stored in $new_path.
37798  new_path="$input_to_shortpath"
37799
37800  input_path="$input_to_shortpath"
37801  # Check if we need to convert this using DOS-style short mode. If the path
37802  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37803  # take no chances and rewrite it.
37804  # Note: m4 eats our [], so we need to use [ and ] instead.
37805  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37806  if test "x$has_forbidden_chars" != x; then
37807    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37808    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37809    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37810    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37811      # Going to short mode and back again did indeed matter. Since short mode is
37812      # case insensitive, let's make it lowercase to improve readability.
37813      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37814      # Now convert it back to Unix-style (cygpath)
37815      input_path=`$CYGPATH -u "$shortmode_path"`
37816      new_path="$input_path"
37817    fi
37818  fi
37819
37820  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37821  if test "x$test_cygdrive_prefix" = x; then
37822    # As a simple fix, exclude /usr/bin since it's not a real path.
37823    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37824      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37825      # a path prefixed by /cygdrive for fixpath to work.
37826      new_path="$CYGWIN_ROOT_PATH$input_path"
37827    fi
37828  fi
37829
37830  # remove trailing .exe if any
37831  new_path="${new_path/%.exe/}"
37832
37833    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37834
37835  # First separate the path from the arguments. This will split at the first
37836  # space.
37837  complete="$LIPO"
37838  path="${complete%% *}"
37839  tmp="$complete EOL"
37840  arguments="${tmp#* }"
37841
37842  # Input might be given as Windows format, start by converting to
37843  # unix format.
37844  new_path="$path"
37845
37846  windows_path="$new_path"
37847  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37848    unix_path=`$CYGPATH -u "$windows_path"`
37849    new_path="$unix_path"
37850  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37851    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37852    new_path="$unix_path"
37853  fi
37854
37855
37856  # Now try to locate executable using which
37857  new_path=`$WHICH "$new_path" 2> /dev/null`
37858
37859  if test "x$new_path" = x; then
37860    # Oops. Which didn't find the executable.
37861    # The splitting of arguments from the executable at a space might have been incorrect,
37862    # since paths with space are more likely in Windows. Give it another try with the whole
37863    # argument.
37864    path="$complete"
37865    arguments="EOL"
37866    new_path="$path"
37867
37868  windows_path="$new_path"
37869  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37870    unix_path=`$CYGPATH -u "$windows_path"`
37871    new_path="$unix_path"
37872  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37873    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37874    new_path="$unix_path"
37875  fi
37876
37877
37878    new_path=`$WHICH "$new_path" 2> /dev/null`
37879    # bat and cmd files are not always considered executable in MSYS causing which
37880    # to not find them
37881    if test "x$new_path" = x \
37882        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37883        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
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    fi
37896
37897    if test "x$new_path" = x; then
37898      # It's still not found. Now this is an unrecoverable error.
37899      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37900$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37901      has_space=`$ECHO "$complete" | $GREP " "`
37902      if test "x$has_space" != x; then
37903        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37904$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37905      fi
37906      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37907    fi
37908  fi
37909
37910  # Now new_path has a complete unix path to the binary
37911  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37912    # Keep paths in /bin as-is, but remove trailing .exe if any
37913    new_path="${new_path/%.exe/}"
37914    # Do not save /bin paths to all_fixpath_prefixes!
37915  else
37916    # Not in mixed or Windows style, start by that.
37917    new_path=`cmd //c echo $new_path`
37918
37919  input_path="$new_path"
37920  # Check if we need to convert this using DOS-style short mode. If the path
37921  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37922  # take no chances and rewrite it.
37923  # Note: m4 eats our [], so we need to use [ and ] instead.
37924  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37925  if test "x$has_forbidden_chars" != x; then
37926    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37927    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37928  fi
37929
37930    # Output is in $new_path
37931
37932  windows_path="$new_path"
37933  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37934    unix_path=`$CYGPATH -u "$windows_path"`
37935    new_path="$unix_path"
37936  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37937    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37938    new_path="$unix_path"
37939  fi
37940
37941    # remove trailing .exe if any
37942    new_path="${new_path/%.exe/}"
37943
37944    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37945    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37946  fi
37947
37948    else
37949      # We're on a unix platform. Hooray! :)
37950      # First separate the path from the arguments. This will split at the first
37951      # space.
37952      complete="$LIPO"
37953      path="${complete%% *}"
37954      tmp="$complete EOL"
37955      arguments="${tmp#* }"
37956
37957      # Cannot rely on the command "which" here since it doesn't always work.
37958      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37959      if test -z "$is_absolute_path"; then
37960        # Path to executable is not absolute. Find it.
37961        IFS_save="$IFS"
37962        IFS=:
37963        for p in $PATH; do
37964          if test -f "$p/$path" && test -x "$p/$path"; then
37965            new_path="$p/$path"
37966            break
37967          fi
37968        done
37969        IFS="$IFS_save"
37970      else
37971        # This is an absolute path, we can use it without further modifications.
37972        new_path="$path"
37973      fi
37974
37975      if test "x$new_path" = x; then
37976        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37977$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37978        has_space=`$ECHO "$complete" | $GREP " "`
37979        if test "x$has_space" != x; then
37980          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37981$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37982        fi
37983        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37984      fi
37985    fi
37986
37987    # Now join together the path and the arguments once again
37988    if test "x$arguments" != xEOL; then
37989      new_complete="$new_path ${arguments% *}"
37990    else
37991      new_complete="$new_path"
37992    fi
37993
37994    if test "x$complete" != "x$new_complete"; then
37995      LIPO="$new_complete"
37996      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
37997$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
37998    fi
37999  fi
38000
38001  fi
38002
38003  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
38004    # Extract the first word of "mt", so it can be a program name with args.
38005set dummy mt; ac_word=$2
38006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38007$as_echo_n "checking for $ac_word... " >&6; }
38008if ${ac_cv_prog_MT+:} false; then :
38009  $as_echo_n "(cached) " >&6
38010else
38011  if test -n "$MT"; then
38012  ac_cv_prog_MT="$MT" # Let the user override the test.
38013else
38014  ac_prog_rejected=no
38015as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38016for as_dir in $PATH
38017do
38018  IFS=$as_save_IFS
38019  test -z "$as_dir" && as_dir=.
38020    for ac_exec_ext in '' $ac_executable_extensions; do
38021  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38022    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
38023       ac_prog_rejected=yes
38024       continue
38025     fi
38026    ac_cv_prog_MT="mt"
38027    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38028    break 2
38029  fi
38030done
38031  done
38032IFS=$as_save_IFS
38033
38034if test $ac_prog_rejected = yes; then
38035  # We found a bogon in the path, so make sure we never use it.
38036  set dummy $ac_cv_prog_MT
38037  shift
38038  if test $# != 0; then
38039    # We chose a different compiler from the bogus one.
38040    # However, it has the same basename, so the bogon will be chosen
38041    # first if we set MT to just the basename; use the full file name.
38042    shift
38043    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
38044  fi
38045fi
38046fi
38047fi
38048MT=$ac_cv_prog_MT
38049if test -n "$MT"; then
38050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
38051$as_echo "$MT" >&6; }
38052else
38053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38054$as_echo "no" >&6; }
38055fi
38056
38057
38058
38059  # Only process if variable expands to non-empty
38060
38061  if test "x$MT" != x; then
38062    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38063
38064  # First separate the path from the arguments. This will split at the first
38065  # space.
38066  complete="$MT"
38067  path="${complete%% *}"
38068  tmp="$complete EOL"
38069  arguments="${tmp#* }"
38070
38071  # Input might be given as Windows format, start by converting to
38072  # unix format.
38073  new_path=`$CYGPATH -u "$path"`
38074
38075  # Now try to locate executable using which
38076  new_path=`$WHICH "$new_path" 2> /dev/null`
38077  # bat and cmd files are not always considered executable in cygwin causing which
38078  # to not find them
38079  if test "x$new_path" = x \
38080      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38081      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38082    new_path=`$CYGPATH -u "$path"`
38083  fi
38084  if test "x$new_path" = x; then
38085    # Oops. Which didn't find the executable.
38086    # The splitting of arguments from the executable at a space might have been incorrect,
38087    # since paths with space are more likely in Windows. Give it another try with the whole
38088    # argument.
38089    path="$complete"
38090    arguments="EOL"
38091    new_path=`$CYGPATH -u "$path"`
38092    new_path=`$WHICH "$new_path" 2> /dev/null`
38093    # bat and cmd files are not always considered executable in cygwin causing which
38094    # to not find them
38095    if test "x$new_path" = x \
38096        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38097        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38098      new_path=`$CYGPATH -u "$path"`
38099    fi
38100    if test "x$new_path" = x; then
38101      # It's still not found. Now this is an unrecoverable error.
38102      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38103$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38104      has_space=`$ECHO "$complete" | $GREP " "`
38105      if test "x$has_space" != x; then
38106        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38107$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38108      fi
38109      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38110    fi
38111  fi
38112
38113  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38114  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38115  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38116  # "foo.exe" is OK but "foo" is an error.
38117  #
38118  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38119  # It is also a way to make sure we got the proper file name for the real test later on.
38120  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38121  if test "x$test_shortpath" = x; then
38122    # Short path failed, file does not exist as specified.
38123    # Try adding .exe or .cmd
38124    if test -f "${new_path}.exe"; then
38125      input_to_shortpath="${new_path}.exe"
38126    elif test -f "${new_path}.cmd"; then
38127      input_to_shortpath="${new_path}.cmd"
38128    else
38129      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
38130$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
38131      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38132$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38133      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38134    fi
38135  else
38136    input_to_shortpath="$new_path"
38137  fi
38138
38139  # Call helper function which possibly converts this using DOS-style short mode.
38140  # If so, the updated path is stored in $new_path.
38141  new_path="$input_to_shortpath"
38142
38143  input_path="$input_to_shortpath"
38144  # Check if we need to convert this using DOS-style short mode. If the path
38145  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38146  # take no chances and rewrite it.
38147  # Note: m4 eats our [], so we need to use [ and ] instead.
38148  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38149  if test "x$has_forbidden_chars" != x; then
38150    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38151    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38152    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38153    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38154      # Going to short mode and back again did indeed matter. Since short mode is
38155      # case insensitive, let's make it lowercase to improve readability.
38156      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38157      # Now convert it back to Unix-style (cygpath)
38158      input_path=`$CYGPATH -u "$shortmode_path"`
38159      new_path="$input_path"
38160    fi
38161  fi
38162
38163  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38164  if test "x$test_cygdrive_prefix" = x; then
38165    # As a simple fix, exclude /usr/bin since it's not a real path.
38166    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38167      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38168      # a path prefixed by /cygdrive for fixpath to work.
38169      new_path="$CYGWIN_ROOT_PATH$input_path"
38170    fi
38171  fi
38172
38173  # remove trailing .exe if any
38174  new_path="${new_path/%.exe/}"
38175
38176    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38177
38178  # First separate the path from the arguments. This will split at the first
38179  # space.
38180  complete="$MT"
38181  path="${complete%% *}"
38182  tmp="$complete EOL"
38183  arguments="${tmp#* }"
38184
38185  # Input might be given as Windows format, start by converting to
38186  # unix format.
38187  new_path="$path"
38188
38189  windows_path="$new_path"
38190  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38191    unix_path=`$CYGPATH -u "$windows_path"`
38192    new_path="$unix_path"
38193  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38194    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38195    new_path="$unix_path"
38196  fi
38197
38198
38199  # Now try to locate executable using which
38200  new_path=`$WHICH "$new_path" 2> /dev/null`
38201
38202  if test "x$new_path" = x; then
38203    # Oops. Which didn't find the executable.
38204    # The splitting of arguments from the executable at a space might have been incorrect,
38205    # since paths with space are more likely in Windows. Give it another try with the whole
38206    # argument.
38207    path="$complete"
38208    arguments="EOL"
38209    new_path="$path"
38210
38211  windows_path="$new_path"
38212  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38213    unix_path=`$CYGPATH -u "$windows_path"`
38214    new_path="$unix_path"
38215  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38216    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38217    new_path="$unix_path"
38218  fi
38219
38220
38221    new_path=`$WHICH "$new_path" 2> /dev/null`
38222    # bat and cmd files are not always considered executable in MSYS causing which
38223    # to not find them
38224    if test "x$new_path" = x \
38225        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38226        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38227      new_path="$path"
38228
38229  windows_path="$new_path"
38230  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38231    unix_path=`$CYGPATH -u "$windows_path"`
38232    new_path="$unix_path"
38233  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38234    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38235    new_path="$unix_path"
38236  fi
38237
38238    fi
38239
38240    if test "x$new_path" = x; then
38241      # It's still not found. Now this is an unrecoverable error.
38242      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38243$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38244      has_space=`$ECHO "$complete" | $GREP " "`
38245      if test "x$has_space" != x; then
38246        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38247$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38248      fi
38249      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38250    fi
38251  fi
38252
38253  # Now new_path has a complete unix path to the binary
38254  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38255    # Keep paths in /bin as-is, but remove trailing .exe if any
38256    new_path="${new_path/%.exe/}"
38257    # Do not save /bin paths to all_fixpath_prefixes!
38258  else
38259    # Not in mixed or Windows style, start by that.
38260    new_path=`cmd //c echo $new_path`
38261
38262  input_path="$new_path"
38263  # Check if we need to convert this using DOS-style short mode. If the path
38264  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38265  # take no chances and rewrite it.
38266  # Note: m4 eats our [], so we need to use [ and ] instead.
38267  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38268  if test "x$has_forbidden_chars" != x; then
38269    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38270    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38271  fi
38272
38273    # Output is in $new_path
38274
38275  windows_path="$new_path"
38276  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38277    unix_path=`$CYGPATH -u "$windows_path"`
38278    new_path="$unix_path"
38279  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38280    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38281    new_path="$unix_path"
38282  fi
38283
38284    # remove trailing .exe if any
38285    new_path="${new_path/%.exe/}"
38286
38287    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38288    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38289  fi
38290
38291    else
38292      # We're on a unix platform. Hooray! :)
38293      # First separate the path from the arguments. This will split at the first
38294      # space.
38295      complete="$MT"
38296      path="${complete%% *}"
38297      tmp="$complete EOL"
38298      arguments="${tmp#* }"
38299
38300      # Cannot rely on the command "which" here since it doesn't always work.
38301      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38302      if test -z "$is_absolute_path"; then
38303        # Path to executable is not absolute. Find it.
38304        IFS_save="$IFS"
38305        IFS=:
38306        for p in $PATH; do
38307          if test -f "$p/$path" && test -x "$p/$path"; then
38308            new_path="$p/$path"
38309            break
38310          fi
38311        done
38312        IFS="$IFS_save"
38313      else
38314        # This is an absolute path, we can use it without further modifications.
38315        new_path="$path"
38316      fi
38317
38318      if test "x$new_path" = x; then
38319        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38320$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38321        has_space=`$ECHO "$complete" | $GREP " "`
38322        if test "x$has_space" != x; then
38323          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38324$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38325        fi
38326        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38327      fi
38328    fi
38329
38330    # Now join together the path and the arguments once again
38331    if test "x$arguments" != xEOL; then
38332      new_complete="$new_path ${arguments% *}"
38333    else
38334      new_complete="$new_path"
38335    fi
38336
38337    if test "x$complete" != "x$new_complete"; then
38338      MT="$new_complete"
38339      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
38340$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
38341    fi
38342  fi
38343
38344    # Setup the resource compiler (RC)
38345    # Extract the first word of "rc", so it can be a program name with args.
38346set dummy rc; ac_word=$2
38347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38348$as_echo_n "checking for $ac_word... " >&6; }
38349if ${ac_cv_prog_RC+:} false; then :
38350  $as_echo_n "(cached) " >&6
38351else
38352  if test -n "$RC"; then
38353  ac_cv_prog_RC="$RC" # Let the user override the test.
38354else
38355  ac_prog_rejected=no
38356as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38357for as_dir in $PATH
38358do
38359  IFS=$as_save_IFS
38360  test -z "$as_dir" && as_dir=.
38361    for ac_exec_ext in '' $ac_executable_extensions; do
38362  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38363    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
38364       ac_prog_rejected=yes
38365       continue
38366     fi
38367    ac_cv_prog_RC="rc"
38368    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38369    break 2
38370  fi
38371done
38372  done
38373IFS=$as_save_IFS
38374
38375if test $ac_prog_rejected = yes; then
38376  # We found a bogon in the path, so make sure we never use it.
38377  set dummy $ac_cv_prog_RC
38378  shift
38379  if test $# != 0; then
38380    # We chose a different compiler from the bogus one.
38381    # However, it has the same basename, so the bogon will be chosen
38382    # first if we set RC to just the basename; use the full file name.
38383    shift
38384    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
38385  fi
38386fi
38387fi
38388fi
38389RC=$ac_cv_prog_RC
38390if test -n "$RC"; then
38391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
38392$as_echo "$RC" >&6; }
38393else
38394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38395$as_echo "no" >&6; }
38396fi
38397
38398
38399
38400  # Only process if variable expands to non-empty
38401
38402  if test "x$RC" != x; then
38403    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38404
38405  # First separate the path from the arguments. This will split at the first
38406  # space.
38407  complete="$RC"
38408  path="${complete%% *}"
38409  tmp="$complete EOL"
38410  arguments="${tmp#* }"
38411
38412  # Input might be given as Windows format, start by converting to
38413  # unix format.
38414  new_path=`$CYGPATH -u "$path"`
38415
38416  # Now try to locate executable using which
38417  new_path=`$WHICH "$new_path" 2> /dev/null`
38418  # bat and cmd files are not always considered executable in cygwin causing which
38419  # to not find them
38420  if test "x$new_path" = x \
38421      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38422      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38423    new_path=`$CYGPATH -u "$path"`
38424  fi
38425  if test "x$new_path" = x; then
38426    # Oops. Which didn't find the executable.
38427    # The splitting of arguments from the executable at a space might have been incorrect,
38428    # since paths with space are more likely in Windows. Give it another try with the whole
38429    # argument.
38430    path="$complete"
38431    arguments="EOL"
38432    new_path=`$CYGPATH -u "$path"`
38433    new_path=`$WHICH "$new_path" 2> /dev/null`
38434    # bat and cmd files are not always considered executable in cygwin causing which
38435    # to not find them
38436    if test "x$new_path" = x \
38437        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38438        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38439      new_path=`$CYGPATH -u "$path"`
38440    fi
38441    if test "x$new_path" = x; then
38442      # It's still not found. Now this is an unrecoverable error.
38443      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38444$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38445      has_space=`$ECHO "$complete" | $GREP " "`
38446      if test "x$has_space" != x; then
38447        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38448$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38449      fi
38450      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38451    fi
38452  fi
38453
38454  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38455  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38456  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38457  # "foo.exe" is OK but "foo" is an error.
38458  #
38459  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38460  # It is also a way to make sure we got the proper file name for the real test later on.
38461  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38462  if test "x$test_shortpath" = x; then
38463    # Short path failed, file does not exist as specified.
38464    # Try adding .exe or .cmd
38465    if test -f "${new_path}.exe"; then
38466      input_to_shortpath="${new_path}.exe"
38467    elif test -f "${new_path}.cmd"; then
38468      input_to_shortpath="${new_path}.cmd"
38469    else
38470      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
38471$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
38472      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38473$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38474      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38475    fi
38476  else
38477    input_to_shortpath="$new_path"
38478  fi
38479
38480  # Call helper function which possibly converts this using DOS-style short mode.
38481  # If so, the updated path is stored in $new_path.
38482  new_path="$input_to_shortpath"
38483
38484  input_path="$input_to_shortpath"
38485  # Check if we need to convert this using DOS-style short mode. If the path
38486  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38487  # take no chances and rewrite it.
38488  # Note: m4 eats our [], so we need to use [ and ] instead.
38489  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38490  if test "x$has_forbidden_chars" != x; then
38491    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38492    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38493    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38494    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38495      # Going to short mode and back again did indeed matter. Since short mode is
38496      # case insensitive, let's make it lowercase to improve readability.
38497      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38498      # Now convert it back to Unix-style (cygpath)
38499      input_path=`$CYGPATH -u "$shortmode_path"`
38500      new_path="$input_path"
38501    fi
38502  fi
38503
38504  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38505  if test "x$test_cygdrive_prefix" = x; then
38506    # As a simple fix, exclude /usr/bin since it's not a real path.
38507    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38508      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38509      # a path prefixed by /cygdrive for fixpath to work.
38510      new_path="$CYGWIN_ROOT_PATH$input_path"
38511    fi
38512  fi
38513
38514  # remove trailing .exe if any
38515  new_path="${new_path/%.exe/}"
38516
38517    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38518
38519  # First separate the path from the arguments. This will split at the first
38520  # space.
38521  complete="$RC"
38522  path="${complete%% *}"
38523  tmp="$complete EOL"
38524  arguments="${tmp#* }"
38525
38526  # Input might be given as Windows format, start by converting to
38527  # unix format.
38528  new_path="$path"
38529
38530  windows_path="$new_path"
38531  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38532    unix_path=`$CYGPATH -u "$windows_path"`
38533    new_path="$unix_path"
38534  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38535    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38536    new_path="$unix_path"
38537  fi
38538
38539
38540  # Now try to locate executable using which
38541  new_path=`$WHICH "$new_path" 2> /dev/null`
38542
38543  if test "x$new_path" = x; then
38544    # Oops. Which didn't find the executable.
38545    # The splitting of arguments from the executable at a space might have been incorrect,
38546    # since paths with space are more likely in Windows. Give it another try with the whole
38547    # argument.
38548    path="$complete"
38549    arguments="EOL"
38550    new_path="$path"
38551
38552  windows_path="$new_path"
38553  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38554    unix_path=`$CYGPATH -u "$windows_path"`
38555    new_path="$unix_path"
38556  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38557    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38558    new_path="$unix_path"
38559  fi
38560
38561
38562    new_path=`$WHICH "$new_path" 2> /dev/null`
38563    # bat and cmd files are not always considered executable in MSYS causing which
38564    # to not find them
38565    if test "x$new_path" = x \
38566        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38567        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38568      new_path="$path"
38569
38570  windows_path="$new_path"
38571  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38572    unix_path=`$CYGPATH -u "$windows_path"`
38573    new_path="$unix_path"
38574  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38575    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38576    new_path="$unix_path"
38577  fi
38578
38579    fi
38580
38581    if test "x$new_path" = x; then
38582      # It's still not found. Now this is an unrecoverable error.
38583      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38584$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38585      has_space=`$ECHO "$complete" | $GREP " "`
38586      if test "x$has_space" != x; then
38587        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38588$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38589      fi
38590      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38591    fi
38592  fi
38593
38594  # Now new_path has a complete unix path to the binary
38595  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38596    # Keep paths in /bin as-is, but remove trailing .exe if any
38597    new_path="${new_path/%.exe/}"
38598    # Do not save /bin paths to all_fixpath_prefixes!
38599  else
38600    # Not in mixed or Windows style, start by that.
38601    new_path=`cmd //c echo $new_path`
38602
38603  input_path="$new_path"
38604  # Check if we need to convert this using DOS-style short mode. If the path
38605  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38606  # take no chances and rewrite it.
38607  # Note: m4 eats our [], so we need to use [ and ] instead.
38608  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38609  if test "x$has_forbidden_chars" != x; then
38610    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38611    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38612  fi
38613
38614    # Output is in $new_path
38615
38616  windows_path="$new_path"
38617  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38618    unix_path=`$CYGPATH -u "$windows_path"`
38619    new_path="$unix_path"
38620  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38621    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38622    new_path="$unix_path"
38623  fi
38624
38625    # remove trailing .exe if any
38626    new_path="${new_path/%.exe/}"
38627
38628    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38629    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38630  fi
38631
38632    else
38633      # We're on a unix platform. Hooray! :)
38634      # First separate the path from the arguments. This will split at the first
38635      # space.
38636      complete="$RC"
38637      path="${complete%% *}"
38638      tmp="$complete EOL"
38639      arguments="${tmp#* }"
38640
38641      # Cannot rely on the command "which" here since it doesn't always work.
38642      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38643      if test -z "$is_absolute_path"; then
38644        # Path to executable is not absolute. Find it.
38645        IFS_save="$IFS"
38646        IFS=:
38647        for p in $PATH; do
38648          if test -f "$p/$path" && test -x "$p/$path"; then
38649            new_path="$p/$path"
38650            break
38651          fi
38652        done
38653        IFS="$IFS_save"
38654      else
38655        # This is an absolute path, we can use it without further modifications.
38656        new_path="$path"
38657      fi
38658
38659      if test "x$new_path" = x; then
38660        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38661$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38662        has_space=`$ECHO "$complete" | $GREP " "`
38663        if test "x$has_space" != x; then
38664          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38665$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38666        fi
38667        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38668      fi
38669    fi
38670
38671    # Now join together the path and the arguments once again
38672    if test "x$arguments" != xEOL; then
38673      new_complete="$new_path ${arguments% *}"
38674    else
38675      new_complete="$new_path"
38676    fi
38677
38678    if test "x$complete" != "x$new_complete"; then
38679      RC="$new_complete"
38680      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
38681$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
38682    fi
38683  fi
38684
38685    # Extract the first word of "dumpbin", so it can be a program name with args.
38686set dummy dumpbin; ac_word=$2
38687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38688$as_echo_n "checking for $ac_word... " >&6; }
38689if ${ac_cv_prog_DUMPBIN+:} false; then :
38690  $as_echo_n "(cached) " >&6
38691else
38692  if test -n "$DUMPBIN"; then
38693  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
38694else
38695as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38696for as_dir in $PATH
38697do
38698  IFS=$as_save_IFS
38699  test -z "$as_dir" && as_dir=.
38700    for ac_exec_ext in '' $ac_executable_extensions; do
38701  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38702    ac_cv_prog_DUMPBIN="dumpbin"
38703    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38704    break 2
38705  fi
38706done
38707  done
38708IFS=$as_save_IFS
38709
38710fi
38711fi
38712DUMPBIN=$ac_cv_prog_DUMPBIN
38713if test -n "$DUMPBIN"; then
38714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
38715$as_echo "$DUMPBIN" >&6; }
38716else
38717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38718$as_echo "no" >&6; }
38719fi
38720
38721
38722
38723  # Only process if variable expands to non-empty
38724
38725  if test "x$DUMPBIN" != x; then
38726    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38727
38728  # First separate the path from the arguments. This will split at the first
38729  # space.
38730  complete="$DUMPBIN"
38731  path="${complete%% *}"
38732  tmp="$complete EOL"
38733  arguments="${tmp#* }"
38734
38735  # Input might be given as Windows format, start by converting to
38736  # unix format.
38737  new_path=`$CYGPATH -u "$path"`
38738
38739  # Now try to locate executable using which
38740  new_path=`$WHICH "$new_path" 2> /dev/null`
38741  # bat and cmd files are not always considered executable in cygwin causing which
38742  # to not find them
38743  if test "x$new_path" = x \
38744      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38745      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38746    new_path=`$CYGPATH -u "$path"`
38747  fi
38748  if test "x$new_path" = x; then
38749    # Oops. Which didn't find the executable.
38750    # The splitting of arguments from the executable at a space might have been incorrect,
38751    # since paths with space are more likely in Windows. Give it another try with the whole
38752    # argument.
38753    path="$complete"
38754    arguments="EOL"
38755    new_path=`$CYGPATH -u "$path"`
38756    new_path=`$WHICH "$new_path" 2> /dev/null`
38757    # bat and cmd files are not always considered executable in cygwin causing which
38758    # to not find them
38759    if test "x$new_path" = x \
38760        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38761        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38762      new_path=`$CYGPATH -u "$path"`
38763    fi
38764    if test "x$new_path" = x; then
38765      # It's still not found. Now this is an unrecoverable error.
38766      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38767$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38768      has_space=`$ECHO "$complete" | $GREP " "`
38769      if test "x$has_space" != x; then
38770        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38771$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38772      fi
38773      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38774    fi
38775  fi
38776
38777  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38778  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38779  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38780  # "foo.exe" is OK but "foo" is an error.
38781  #
38782  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38783  # It is also a way to make sure we got the proper file name for the real test later on.
38784  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38785  if test "x$test_shortpath" = x; then
38786    # Short path failed, file does not exist as specified.
38787    # Try adding .exe or .cmd
38788    if test -f "${new_path}.exe"; then
38789      input_to_shortpath="${new_path}.exe"
38790    elif test -f "${new_path}.cmd"; then
38791      input_to_shortpath="${new_path}.cmd"
38792    else
38793      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
38794$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
38795      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38796$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38797      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38798    fi
38799  else
38800    input_to_shortpath="$new_path"
38801  fi
38802
38803  # Call helper function which possibly converts this using DOS-style short mode.
38804  # If so, the updated path is stored in $new_path.
38805  new_path="$input_to_shortpath"
38806
38807  input_path="$input_to_shortpath"
38808  # Check if we need to convert this using DOS-style short mode. If the path
38809  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38810  # take no chances and rewrite it.
38811  # Note: m4 eats our [], so we need to use [ and ] instead.
38812  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38813  if test "x$has_forbidden_chars" != x; then
38814    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38815    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38816    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38817    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38818      # Going to short mode and back again did indeed matter. Since short mode is
38819      # case insensitive, let's make it lowercase to improve readability.
38820      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38821      # Now convert it back to Unix-style (cygpath)
38822      input_path=`$CYGPATH -u "$shortmode_path"`
38823      new_path="$input_path"
38824    fi
38825  fi
38826
38827  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38828  if test "x$test_cygdrive_prefix" = x; then
38829    # As a simple fix, exclude /usr/bin since it's not a real path.
38830    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38831      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38832      # a path prefixed by /cygdrive for fixpath to work.
38833      new_path="$CYGWIN_ROOT_PATH$input_path"
38834    fi
38835  fi
38836
38837  # remove trailing .exe if any
38838  new_path="${new_path/%.exe/}"
38839
38840    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38841
38842  # First separate the path from the arguments. This will split at the first
38843  # space.
38844  complete="$DUMPBIN"
38845  path="${complete%% *}"
38846  tmp="$complete EOL"
38847  arguments="${tmp#* }"
38848
38849  # Input might be given as Windows format, start by converting to
38850  # unix format.
38851  new_path="$path"
38852
38853  windows_path="$new_path"
38854  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38855    unix_path=`$CYGPATH -u "$windows_path"`
38856    new_path="$unix_path"
38857  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38858    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38859    new_path="$unix_path"
38860  fi
38861
38862
38863  # Now try to locate executable using which
38864  new_path=`$WHICH "$new_path" 2> /dev/null`
38865
38866  if test "x$new_path" = x; then
38867    # Oops. Which didn't find the executable.
38868    # The splitting of arguments from the executable at a space might have been incorrect,
38869    # since paths with space are more likely in Windows. Give it another try with the whole
38870    # argument.
38871    path="$complete"
38872    arguments="EOL"
38873    new_path="$path"
38874
38875  windows_path="$new_path"
38876  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38877    unix_path=`$CYGPATH -u "$windows_path"`
38878    new_path="$unix_path"
38879  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38880    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38881    new_path="$unix_path"
38882  fi
38883
38884
38885    new_path=`$WHICH "$new_path" 2> /dev/null`
38886    # bat and cmd files are not always considered executable in MSYS causing which
38887    # to not find them
38888    if test "x$new_path" = x \
38889        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38890        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38891      new_path="$path"
38892
38893  windows_path="$new_path"
38894  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38895    unix_path=`$CYGPATH -u "$windows_path"`
38896    new_path="$unix_path"
38897  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38898    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38899    new_path="$unix_path"
38900  fi
38901
38902    fi
38903
38904    if test "x$new_path" = x; then
38905      # It's still not found. Now this is an unrecoverable error.
38906      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38907$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38908      has_space=`$ECHO "$complete" | $GREP " "`
38909      if test "x$has_space" != x; then
38910        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38911$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38912      fi
38913      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38914    fi
38915  fi
38916
38917  # Now new_path has a complete unix path to the binary
38918  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38919    # Keep paths in /bin as-is, but remove trailing .exe if any
38920    new_path="${new_path/%.exe/}"
38921    # Do not save /bin paths to all_fixpath_prefixes!
38922  else
38923    # Not in mixed or Windows style, start by that.
38924    new_path=`cmd //c echo $new_path`
38925
38926  input_path="$new_path"
38927  # Check if we need to convert this using DOS-style short mode. If the path
38928  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38929  # take no chances and rewrite it.
38930  # Note: m4 eats our [], so we need to use [ and ] instead.
38931  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38932  if test "x$has_forbidden_chars" != x; then
38933    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38934    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38935  fi
38936
38937    # Output is in $new_path
38938
38939  windows_path="$new_path"
38940  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38941    unix_path=`$CYGPATH -u "$windows_path"`
38942    new_path="$unix_path"
38943  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38944    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38945    new_path="$unix_path"
38946  fi
38947
38948    # remove trailing .exe if any
38949    new_path="${new_path/%.exe/}"
38950
38951    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38952    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38953  fi
38954
38955    else
38956      # We're on a unix platform. Hooray! :)
38957      # First separate the path from the arguments. This will split at the first
38958      # space.
38959      complete="$DUMPBIN"
38960      path="${complete%% *}"
38961      tmp="$complete EOL"
38962      arguments="${tmp#* }"
38963
38964      # Cannot rely on the command "which" here since it doesn't always work.
38965      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38966      if test -z "$is_absolute_path"; then
38967        # Path to executable is not absolute. Find it.
38968        IFS_save="$IFS"
38969        IFS=:
38970        for p in $PATH; do
38971          if test -f "$p/$path" && test -x "$p/$path"; then
38972            new_path="$p/$path"
38973            break
38974          fi
38975        done
38976        IFS="$IFS_save"
38977      else
38978        # This is an absolute path, we can use it without further modifications.
38979        new_path="$path"
38980      fi
38981
38982      if test "x$new_path" = x; then
38983        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38984$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38985        has_space=`$ECHO "$complete" | $GREP " "`
38986        if test "x$has_space" != x; then
38987          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38988$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38989        fi
38990        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38991      fi
38992    fi
38993
38994    # Now join together the path and the arguments once again
38995    if test "x$arguments" != xEOL; then
38996      new_complete="$new_path ${arguments% *}"
38997    else
38998      new_complete="$new_path"
38999    fi
39000
39001    if test "x$complete" != "x$new_complete"; then
39002      DUMPBIN="$new_complete"
39003      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
39004$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
39005    fi
39006  fi
39007
39008    # We need to check for 'msbuild.exe' because at the place where we expect to
39009    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
39010    # won't find the 'msbuild.exe' executable in that case (and the
39011    # 'ac_executable_extensions' is unusable due to performance reasons).
39012    # Notice that we intentionally don't fix up the path to MSBUILD because we
39013    # will call it in a DOS shell during freetype detection on Windows (see
39014    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
39015    # Extract the first word of "msbuild.exe", so it can be a program name with args.
39016set dummy msbuild.exe; ac_word=$2
39017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39018$as_echo_n "checking for $ac_word... " >&6; }
39019if ${ac_cv_prog_MSBUILD+:} false; then :
39020  $as_echo_n "(cached) " >&6
39021else
39022  if test -n "$MSBUILD"; then
39023  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
39024else
39025as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39026for as_dir in $PATH
39027do
39028  IFS=$as_save_IFS
39029  test -z "$as_dir" && as_dir=.
39030    for ac_exec_ext in '' $ac_executable_extensions; do
39031  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39032    ac_cv_prog_MSBUILD="msbuild.exe"
39033    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39034    break 2
39035  fi
39036done
39037  done
39038IFS=$as_save_IFS
39039
39040fi
39041fi
39042MSBUILD=$ac_cv_prog_MSBUILD
39043if test -n "$MSBUILD"; then
39044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
39045$as_echo "$MSBUILD" >&6; }
39046else
39047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39048$as_echo "no" >&6; }
39049fi
39050
39051
39052  fi
39053
39054  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
39055
39056
39057  # Publish this variable in the help.
39058
39059
39060  if [ -z "${STRIP+x}" ]; then
39061    # The variable is not set by user, try to locate tool using the code snippet
39062    for ac_prog in strip
39063do
39064  # Extract the first word of "$ac_prog", so it can be a program name with args.
39065set dummy $ac_prog; ac_word=$2
39066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39067$as_echo_n "checking for $ac_word... " >&6; }
39068if ${ac_cv_path_STRIP+:} false; then :
39069  $as_echo_n "(cached) " >&6
39070else
39071  case $STRIP in
39072  [\\/]* | ?:[\\/]*)
39073  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39074  ;;
39075  *)
39076  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39077for as_dir in $PATH
39078do
39079  IFS=$as_save_IFS
39080  test -z "$as_dir" && as_dir=.
39081    for ac_exec_ext in '' $ac_executable_extensions; do
39082  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39083    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39084    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39085    break 2
39086  fi
39087done
39088  done
39089IFS=$as_save_IFS
39090
39091  ;;
39092esac
39093fi
39094STRIP=$ac_cv_path_STRIP
39095if test -n "$STRIP"; then
39096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39097$as_echo "$STRIP" >&6; }
39098else
39099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39100$as_echo "no" >&6; }
39101fi
39102
39103
39104  test -n "$STRIP" && break
39105done
39106
39107  else
39108    # The variable is set, but is it from the command line or the environment?
39109
39110    # Try to remove the string !STRIP! from our list.
39111    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
39112    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39113      # If it failed, the variable was not from the command line. Ignore it,
39114      # but warn the user (except for BASH, which is always set by the calling BASH).
39115      if test "xSTRIP" != xBASH; then
39116        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
39117$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
39118      fi
39119      # Try to locate tool using the code snippet
39120      for ac_prog in strip
39121do
39122  # Extract the first word of "$ac_prog", so it can be a program name with args.
39123set dummy $ac_prog; ac_word=$2
39124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39125$as_echo_n "checking for $ac_word... " >&6; }
39126if ${ac_cv_path_STRIP+:} false; then :
39127  $as_echo_n "(cached) " >&6
39128else
39129  case $STRIP in
39130  [\\/]* | ?:[\\/]*)
39131  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39132  ;;
39133  *)
39134  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39135for as_dir in $PATH
39136do
39137  IFS=$as_save_IFS
39138  test -z "$as_dir" && as_dir=.
39139    for ac_exec_ext in '' $ac_executable_extensions; do
39140  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39141    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39142    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39143    break 2
39144  fi
39145done
39146  done
39147IFS=$as_save_IFS
39148
39149  ;;
39150esac
39151fi
39152STRIP=$ac_cv_path_STRIP
39153if test -n "$STRIP"; then
39154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39155$as_echo "$STRIP" >&6; }
39156else
39157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39158$as_echo "no" >&6; }
39159fi
39160
39161
39162  test -n "$STRIP" && break
39163done
39164
39165    else
39166      # If it succeeded, then it was overridden by the user. We will use it
39167      # for the tool.
39168
39169      # First remove it from the list of overridden variables, so we can test
39170      # for unknown variables in the end.
39171      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39172
39173      # Check if we try to supply an empty value
39174      if test "x$STRIP" = x; then
39175        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
39176$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
39177        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39178$as_echo_n "checking for STRIP... " >&6; }
39179        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39180$as_echo "disabled" >&6; }
39181      else
39182        # Check if the provided tool contains a complete path.
39183        tool_specified="$STRIP"
39184        tool_basename="${tool_specified##*/}"
39185        if test "x$tool_basename" = "x$tool_specified"; then
39186          # A command without a complete path is provided, search $PATH.
39187          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39188$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39189          # Extract the first word of "$tool_basename", so it can be a program name with args.
39190set dummy $tool_basename; 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_path_STRIP+:} false; then :
39194  $as_echo_n "(cached) " >&6
39195else
39196  case $STRIP in
39197  [\\/]* | ?:[\\/]*)
39198  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39199  ;;
39200  *)
39201  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39202for as_dir in $PATH
39203do
39204  IFS=$as_save_IFS
39205  test -z "$as_dir" && as_dir=.
39206    for ac_exec_ext in '' $ac_executable_extensions; do
39207  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39208    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39209    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39210    break 2
39211  fi
39212done
39213  done
39214IFS=$as_save_IFS
39215
39216  ;;
39217esac
39218fi
39219STRIP=$ac_cv_path_STRIP
39220if test -n "$STRIP"; then
39221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39222$as_echo "$STRIP" >&6; }
39223else
39224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39225$as_echo "no" >&6; }
39226fi
39227
39228
39229          if test "x$STRIP" = x; then
39230            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39231          fi
39232        else
39233          # Otherwise we believe it is a complete path. Use it as it is.
39234          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39235$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39236          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39237$as_echo_n "checking for STRIP... " >&6; }
39238          if test ! -x "$tool_specified"; then
39239            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39240$as_echo "not found" >&6; }
39241            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39242          fi
39243          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39244$as_echo "$tool_specified" >&6; }
39245        fi
39246      fi
39247    fi
39248
39249  fi
39250
39251
39252
39253  # Only process if variable expands to non-empty
39254
39255  if test "x$STRIP" != x; then
39256    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39257
39258  # First separate the path from the arguments. This will split at the first
39259  # space.
39260  complete="$STRIP"
39261  path="${complete%% *}"
39262  tmp="$complete EOL"
39263  arguments="${tmp#* }"
39264
39265  # Input might be given as Windows format, start by converting to
39266  # unix format.
39267  new_path=`$CYGPATH -u "$path"`
39268
39269  # Now try to locate executable using which
39270  new_path=`$WHICH "$new_path" 2> /dev/null`
39271  # bat and cmd files are not always considered executable in cygwin causing which
39272  # to not find them
39273  if test "x$new_path" = x \
39274      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39275      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39276    new_path=`$CYGPATH -u "$path"`
39277  fi
39278  if test "x$new_path" = x; then
39279    # Oops. Which didn't find the executable.
39280    # The splitting of arguments from the executable at a space might have been incorrect,
39281    # since paths with space are more likely in Windows. Give it another try with the whole
39282    # argument.
39283    path="$complete"
39284    arguments="EOL"
39285    new_path=`$CYGPATH -u "$path"`
39286    new_path=`$WHICH "$new_path" 2> /dev/null`
39287    # bat and cmd files are not always considered executable in cygwin causing which
39288    # to not find them
39289    if test "x$new_path" = x \
39290        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39291        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39292      new_path=`$CYGPATH -u "$path"`
39293    fi
39294    if test "x$new_path" = x; then
39295      # It's still not found. Now this is an unrecoverable error.
39296      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39297$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39298      has_space=`$ECHO "$complete" | $GREP " "`
39299      if test "x$has_space" != x; then
39300        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39301$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39302      fi
39303      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39304    fi
39305  fi
39306
39307  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39308  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39309  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39310  # "foo.exe" is OK but "foo" is an error.
39311  #
39312  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39313  # It is also a way to make sure we got the proper file name for the real test later on.
39314  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39315  if test "x$test_shortpath" = x; then
39316    # Short path failed, file does not exist as specified.
39317    # Try adding .exe or .cmd
39318    if test -f "${new_path}.exe"; then
39319      input_to_shortpath="${new_path}.exe"
39320    elif test -f "${new_path}.cmd"; then
39321      input_to_shortpath="${new_path}.cmd"
39322    else
39323      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39324$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39325      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39326$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39327      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39328    fi
39329  else
39330    input_to_shortpath="$new_path"
39331  fi
39332
39333  # Call helper function which possibly converts this using DOS-style short mode.
39334  # If so, the updated path is stored in $new_path.
39335  new_path="$input_to_shortpath"
39336
39337  input_path="$input_to_shortpath"
39338  # Check if we need to convert this using DOS-style short mode. If the path
39339  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39340  # take no chances and rewrite it.
39341  # Note: m4 eats our [], so we need to use [ and ] instead.
39342  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39343  if test "x$has_forbidden_chars" != x; then
39344    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39345    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39346    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39347    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39348      # Going to short mode and back again did indeed matter. Since short mode is
39349      # case insensitive, let's make it lowercase to improve readability.
39350      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39351      # Now convert it back to Unix-style (cygpath)
39352      input_path=`$CYGPATH -u "$shortmode_path"`
39353      new_path="$input_path"
39354    fi
39355  fi
39356
39357  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39358  if test "x$test_cygdrive_prefix" = x; then
39359    # As a simple fix, exclude /usr/bin since it's not a real path.
39360    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39361      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39362      # a path prefixed by /cygdrive for fixpath to work.
39363      new_path="$CYGWIN_ROOT_PATH$input_path"
39364    fi
39365  fi
39366
39367  # remove trailing .exe if any
39368  new_path="${new_path/%.exe/}"
39369
39370    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39371
39372  # First separate the path from the arguments. This will split at the first
39373  # space.
39374  complete="$STRIP"
39375  path="${complete%% *}"
39376  tmp="$complete EOL"
39377  arguments="${tmp#* }"
39378
39379  # Input might be given as Windows format, start by converting to
39380  # unix format.
39381  new_path="$path"
39382
39383  windows_path="$new_path"
39384  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39385    unix_path=`$CYGPATH -u "$windows_path"`
39386    new_path="$unix_path"
39387  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39388    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39389    new_path="$unix_path"
39390  fi
39391
39392
39393  # Now try to locate executable using which
39394  new_path=`$WHICH "$new_path" 2> /dev/null`
39395
39396  if test "x$new_path" = x; then
39397    # Oops. Which didn't find the executable.
39398    # The splitting of arguments from the executable at a space might have been incorrect,
39399    # since paths with space are more likely in Windows. Give it another try with the whole
39400    # argument.
39401    path="$complete"
39402    arguments="EOL"
39403    new_path="$path"
39404
39405  windows_path="$new_path"
39406  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39407    unix_path=`$CYGPATH -u "$windows_path"`
39408    new_path="$unix_path"
39409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39410    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39411    new_path="$unix_path"
39412  fi
39413
39414
39415    new_path=`$WHICH "$new_path" 2> /dev/null`
39416    # bat and cmd files are not always considered executable in MSYS causing which
39417    # to not find them
39418    if test "x$new_path" = x \
39419        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39420        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39421      new_path="$path"
39422
39423  windows_path="$new_path"
39424  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39425    unix_path=`$CYGPATH -u "$windows_path"`
39426    new_path="$unix_path"
39427  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39428    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39429    new_path="$unix_path"
39430  fi
39431
39432    fi
39433
39434    if test "x$new_path" = x; then
39435      # It's still not found. Now this is an unrecoverable error.
39436      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39437$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39438      has_space=`$ECHO "$complete" | $GREP " "`
39439      if test "x$has_space" != x; then
39440        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39441$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39442      fi
39443      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39444    fi
39445  fi
39446
39447  # Now new_path has a complete unix path to the binary
39448  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39449    # Keep paths in /bin as-is, but remove trailing .exe if any
39450    new_path="${new_path/%.exe/}"
39451    # Do not save /bin paths to all_fixpath_prefixes!
39452  else
39453    # Not in mixed or Windows style, start by that.
39454    new_path=`cmd //c echo $new_path`
39455
39456  input_path="$new_path"
39457  # Check if we need to convert this using DOS-style short mode. If the path
39458  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39459  # take no chances and rewrite it.
39460  # Note: m4 eats our [], so we need to use [ and ] instead.
39461  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39462  if test "x$has_forbidden_chars" != x; then
39463    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39464    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39465  fi
39466
39467    # Output is in $new_path
39468
39469  windows_path="$new_path"
39470  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39471    unix_path=`$CYGPATH -u "$windows_path"`
39472    new_path="$unix_path"
39473  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39474    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39475    new_path="$unix_path"
39476  fi
39477
39478    # remove trailing .exe if any
39479    new_path="${new_path/%.exe/}"
39480
39481    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39482    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39483  fi
39484
39485    else
39486      # We're on a unix platform. Hooray! :)
39487      # First separate the path from the arguments. This will split at the first
39488      # space.
39489      complete="$STRIP"
39490      path="${complete%% *}"
39491      tmp="$complete EOL"
39492      arguments="${tmp#* }"
39493
39494      # Cannot rely on the command "which" here since it doesn't always work.
39495      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39496      if test -z "$is_absolute_path"; then
39497        # Path to executable is not absolute. Find it.
39498        IFS_save="$IFS"
39499        IFS=:
39500        for p in $PATH; do
39501          if test -f "$p/$path" && test -x "$p/$path"; then
39502            new_path="$p/$path"
39503            break
39504          fi
39505        done
39506        IFS="$IFS_save"
39507      else
39508        # This is an absolute path, we can use it without further modifications.
39509        new_path="$path"
39510      fi
39511
39512      if test "x$new_path" = x; then
39513        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39514$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39515        has_space=`$ECHO "$complete" | $GREP " "`
39516        if test "x$has_space" != x; then
39517          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39518$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39519        fi
39520        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39521      fi
39522    fi
39523
39524    # Now join together the path and the arguments once again
39525    if test "x$arguments" != xEOL; then
39526      new_complete="$new_path ${arguments% *}"
39527    else
39528      new_complete="$new_path"
39529    fi
39530
39531    if test "x$complete" != "x$new_complete"; then
39532      STRIP="$new_complete"
39533      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
39534$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
39535    fi
39536  fi
39537
39538
39539
39540  # Publish this variable in the help.
39541
39542
39543  if [ -z "${NM+x}" ]; then
39544    # The variable is not set by user, try to locate tool using the code snippet
39545    for ac_prog in nm
39546do
39547  # Extract the first word of "$ac_prog", so it can be a program name with args.
39548set dummy $ac_prog; ac_word=$2
39549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39550$as_echo_n "checking for $ac_word... " >&6; }
39551if ${ac_cv_path_NM+:} false; then :
39552  $as_echo_n "(cached) " >&6
39553else
39554  case $NM in
39555  [\\/]* | ?:[\\/]*)
39556  ac_cv_path_NM="$NM" # Let the user override the test with a path.
39557  ;;
39558  *)
39559  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39560for as_dir in $PATH
39561do
39562  IFS=$as_save_IFS
39563  test -z "$as_dir" && as_dir=.
39564    for ac_exec_ext in '' $ac_executable_extensions; do
39565  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39566    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
39567    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39568    break 2
39569  fi
39570done
39571  done
39572IFS=$as_save_IFS
39573
39574  ;;
39575esac
39576fi
39577NM=$ac_cv_path_NM
39578if test -n "$NM"; then
39579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39580$as_echo "$NM" >&6; }
39581else
39582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39583$as_echo "no" >&6; }
39584fi
39585
39586
39587  test -n "$NM" && break
39588done
39589
39590  else
39591    # The variable is set, but is it from the command line or the environment?
39592
39593    # Try to remove the string !NM! from our list.
39594    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
39595    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39596      # If it failed, the variable was not from the command line. Ignore it,
39597      # but warn the user (except for BASH, which is always set by the calling BASH).
39598      if test "xNM" != xBASH; then
39599        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
39600$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
39601      fi
39602      # Try to locate tool using the code snippet
39603      for ac_prog in nm
39604do
39605  # Extract the first word of "$ac_prog", so it can be a program name with args.
39606set dummy $ac_prog; ac_word=$2
39607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39608$as_echo_n "checking for $ac_word... " >&6; }
39609if ${ac_cv_path_NM+:} false; then :
39610  $as_echo_n "(cached) " >&6
39611else
39612  case $NM in
39613  [\\/]* | ?:[\\/]*)
39614  ac_cv_path_NM="$NM" # Let the user override the test with a path.
39615  ;;
39616  *)
39617  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39618for as_dir in $PATH
39619do
39620  IFS=$as_save_IFS
39621  test -z "$as_dir" && as_dir=.
39622    for ac_exec_ext in '' $ac_executable_extensions; do
39623  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39624    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
39625    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39626    break 2
39627  fi
39628done
39629  done
39630IFS=$as_save_IFS
39631
39632  ;;
39633esac
39634fi
39635NM=$ac_cv_path_NM
39636if test -n "$NM"; then
39637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39638$as_echo "$NM" >&6; }
39639else
39640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39641$as_echo "no" >&6; }
39642fi
39643
39644
39645  test -n "$NM" && break
39646done
39647
39648    else
39649      # If it succeeded, then it was overridden by the user. We will use it
39650      # for the tool.
39651
39652      # First remove it from the list of overridden variables, so we can test
39653      # for unknown variables in the end.
39654      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39655
39656      # Check if we try to supply an empty value
39657      if test "x$NM" = x; then
39658        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
39659$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
39660        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
39661$as_echo_n "checking for NM... " >&6; }
39662        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39663$as_echo "disabled" >&6; }
39664      else
39665        # Check if the provided tool contains a complete path.
39666        tool_specified="$NM"
39667        tool_basename="${tool_specified##*/}"
39668        if test "x$tool_basename" = "x$tool_specified"; then
39669          # A command without a complete path is provided, search $PATH.
39670          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
39671$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
39672          # Extract the first word of "$tool_basename", so it can be a program name with args.
39673set dummy $tool_basename; ac_word=$2
39674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39675$as_echo_n "checking for $ac_word... " >&6; }
39676if ${ac_cv_path_NM+:} false; then :
39677  $as_echo_n "(cached) " >&6
39678else
39679  case $NM in
39680  [\\/]* | ?:[\\/]*)
39681  ac_cv_path_NM="$NM" # Let the user override the test with a path.
39682  ;;
39683  *)
39684  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39685for as_dir in $PATH
39686do
39687  IFS=$as_save_IFS
39688  test -z "$as_dir" && as_dir=.
39689    for ac_exec_ext in '' $ac_executable_extensions; do
39690  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39691    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
39692    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39693    break 2
39694  fi
39695done
39696  done
39697IFS=$as_save_IFS
39698
39699  ;;
39700esac
39701fi
39702NM=$ac_cv_path_NM
39703if test -n "$NM"; then
39704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39705$as_echo "$NM" >&6; }
39706else
39707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39708$as_echo "no" >&6; }
39709fi
39710
39711
39712          if test "x$NM" = x; then
39713            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39714          fi
39715        else
39716          # Otherwise we believe it is a complete path. Use it as it is.
39717          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
39718$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
39719          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
39720$as_echo_n "checking for NM... " >&6; }
39721          if test ! -x "$tool_specified"; then
39722            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39723$as_echo "not found" >&6; }
39724            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
39725          fi
39726          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39727$as_echo "$tool_specified" >&6; }
39728        fi
39729      fi
39730    fi
39731
39732  fi
39733
39734
39735
39736  # Only process if variable expands to non-empty
39737
39738  if test "x$NM" != x; then
39739    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39740
39741  # First separate the path from the arguments. This will split at the first
39742  # space.
39743  complete="$NM"
39744  path="${complete%% *}"
39745  tmp="$complete EOL"
39746  arguments="${tmp#* }"
39747
39748  # Input might be given as Windows format, start by converting to
39749  # unix format.
39750  new_path=`$CYGPATH -u "$path"`
39751
39752  # Now try to locate executable using which
39753  new_path=`$WHICH "$new_path" 2> /dev/null`
39754  # bat and cmd files are not always considered executable in cygwin causing which
39755  # to not find them
39756  if test "x$new_path" = x \
39757      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39758      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39759    new_path=`$CYGPATH -u "$path"`
39760  fi
39761  if test "x$new_path" = x; then
39762    # Oops. Which didn't find the executable.
39763    # The splitting of arguments from the executable at a space might have been incorrect,
39764    # since paths with space are more likely in Windows. Give it another try with the whole
39765    # argument.
39766    path="$complete"
39767    arguments="EOL"
39768    new_path=`$CYGPATH -u "$path"`
39769    new_path=`$WHICH "$new_path" 2> /dev/null`
39770    # bat and cmd files are not always considered executable in cygwin causing which
39771    # to not find them
39772    if test "x$new_path" = x \
39773        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39774        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39775      new_path=`$CYGPATH -u "$path"`
39776    fi
39777    if test "x$new_path" = x; then
39778      # It's still not found. Now this is an unrecoverable error.
39779      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39780$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39781      has_space=`$ECHO "$complete" | $GREP " "`
39782      if test "x$has_space" != x; then
39783        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39784$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39785      fi
39786      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39787    fi
39788  fi
39789
39790  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39791  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39792  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39793  # "foo.exe" is OK but "foo" is an error.
39794  #
39795  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39796  # It is also a way to make sure we got the proper file name for the real test later on.
39797  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39798  if test "x$test_shortpath" = x; then
39799    # Short path failed, file does not exist as specified.
39800    # Try adding .exe or .cmd
39801    if test -f "${new_path}.exe"; then
39802      input_to_shortpath="${new_path}.exe"
39803    elif test -f "${new_path}.cmd"; then
39804      input_to_shortpath="${new_path}.cmd"
39805    else
39806      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
39807$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
39808      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39809$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39810      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39811    fi
39812  else
39813    input_to_shortpath="$new_path"
39814  fi
39815
39816  # Call helper function which possibly converts this using DOS-style short mode.
39817  # If so, the updated path is stored in $new_path.
39818  new_path="$input_to_shortpath"
39819
39820  input_path="$input_to_shortpath"
39821  # Check if we need to convert this using DOS-style short mode. If the path
39822  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39823  # take no chances and rewrite it.
39824  # Note: m4 eats our [], so we need to use [ and ] instead.
39825  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39826  if test "x$has_forbidden_chars" != x; then
39827    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39828    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39829    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39830    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39831      # Going to short mode and back again did indeed matter. Since short mode is
39832      # case insensitive, let's make it lowercase to improve readability.
39833      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39834      # Now convert it back to Unix-style (cygpath)
39835      input_path=`$CYGPATH -u "$shortmode_path"`
39836      new_path="$input_path"
39837    fi
39838  fi
39839
39840  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39841  if test "x$test_cygdrive_prefix" = x; then
39842    # As a simple fix, exclude /usr/bin since it's not a real path.
39843    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39844      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39845      # a path prefixed by /cygdrive for fixpath to work.
39846      new_path="$CYGWIN_ROOT_PATH$input_path"
39847    fi
39848  fi
39849
39850  # remove trailing .exe if any
39851  new_path="${new_path/%.exe/}"
39852
39853    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39854
39855  # First separate the path from the arguments. This will split at the first
39856  # space.
39857  complete="$NM"
39858  path="${complete%% *}"
39859  tmp="$complete EOL"
39860  arguments="${tmp#* }"
39861
39862  # Input might be given as Windows format, start by converting to
39863  # unix format.
39864  new_path="$path"
39865
39866  windows_path="$new_path"
39867  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39868    unix_path=`$CYGPATH -u "$windows_path"`
39869    new_path="$unix_path"
39870  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39871    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39872    new_path="$unix_path"
39873  fi
39874
39875
39876  # Now try to locate executable using which
39877  new_path=`$WHICH "$new_path" 2> /dev/null`
39878
39879  if test "x$new_path" = x; then
39880    # Oops. Which didn't find the executable.
39881    # The splitting of arguments from the executable at a space might have been incorrect,
39882    # since paths with space are more likely in Windows. Give it another try with the whole
39883    # argument.
39884    path="$complete"
39885    arguments="EOL"
39886    new_path="$path"
39887
39888  windows_path="$new_path"
39889  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39890    unix_path=`$CYGPATH -u "$windows_path"`
39891    new_path="$unix_path"
39892  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39893    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39894    new_path="$unix_path"
39895  fi
39896
39897
39898    new_path=`$WHICH "$new_path" 2> /dev/null`
39899    # bat and cmd files are not always considered executable in MSYS causing which
39900    # to not find them
39901    if test "x$new_path" = x \
39902        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39903        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39904      new_path="$path"
39905
39906  windows_path="$new_path"
39907  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39908    unix_path=`$CYGPATH -u "$windows_path"`
39909    new_path="$unix_path"
39910  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39911    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39912    new_path="$unix_path"
39913  fi
39914
39915    fi
39916
39917    if test "x$new_path" = x; then
39918      # It's still not found. Now this is an unrecoverable error.
39919      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39920$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39921      has_space=`$ECHO "$complete" | $GREP " "`
39922      if test "x$has_space" != x; then
39923        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39924$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39925      fi
39926      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39927    fi
39928  fi
39929
39930  # Now new_path has a complete unix path to the binary
39931  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39932    # Keep paths in /bin as-is, but remove trailing .exe if any
39933    new_path="${new_path/%.exe/}"
39934    # Do not save /bin paths to all_fixpath_prefixes!
39935  else
39936    # Not in mixed or Windows style, start by that.
39937    new_path=`cmd //c echo $new_path`
39938
39939  input_path="$new_path"
39940  # Check if we need to convert this using DOS-style short mode. If the path
39941  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39942  # take no chances and rewrite it.
39943  # Note: m4 eats our [], so we need to use [ and ] instead.
39944  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39945  if test "x$has_forbidden_chars" != x; then
39946    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39947    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39948  fi
39949
39950    # Output is in $new_path
39951
39952  windows_path="$new_path"
39953  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39954    unix_path=`$CYGPATH -u "$windows_path"`
39955    new_path="$unix_path"
39956  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39957    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39958    new_path="$unix_path"
39959  fi
39960
39961    # remove trailing .exe if any
39962    new_path="${new_path/%.exe/}"
39963
39964    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39965    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39966  fi
39967
39968    else
39969      # We're on a unix platform. Hooray! :)
39970      # First separate the path from the arguments. This will split at the first
39971      # space.
39972      complete="$NM"
39973      path="${complete%% *}"
39974      tmp="$complete EOL"
39975      arguments="${tmp#* }"
39976
39977      # Cannot rely on the command "which" here since it doesn't always work.
39978      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39979      if test -z "$is_absolute_path"; then
39980        # Path to executable is not absolute. Find it.
39981        IFS_save="$IFS"
39982        IFS=:
39983        for p in $PATH; do
39984          if test -f "$p/$path" && test -x "$p/$path"; then
39985            new_path="$p/$path"
39986            break
39987          fi
39988        done
39989        IFS="$IFS_save"
39990      else
39991        # This is an absolute path, we can use it without further modifications.
39992        new_path="$path"
39993      fi
39994
39995      if test "x$new_path" = x; then
39996        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39997$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39998        has_space=`$ECHO "$complete" | $GREP " "`
39999        if test "x$has_space" != x; then
40000          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40001$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40002        fi
40003        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40004      fi
40005    fi
40006
40007    # Now join together the path and the arguments once again
40008    if test "x$arguments" != xEOL; then
40009      new_complete="$new_path ${arguments% *}"
40010    else
40011      new_complete="$new_path"
40012    fi
40013
40014    if test "x$complete" != "x$new_complete"; then
40015      NM="$new_complete"
40016      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
40017$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
40018    fi
40019  fi
40020
40021
40022
40023  # Publish this variable in the help.
40024
40025
40026  if [ -z "${GNM+x}" ]; then
40027    # The variable is not set by user, try to locate tool using the code snippet
40028    for ac_prog in gnm
40029do
40030  # Extract the first word of "$ac_prog", so it can be a program name with args.
40031set dummy $ac_prog; ac_word=$2
40032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40033$as_echo_n "checking for $ac_word... " >&6; }
40034if ${ac_cv_path_GNM+:} false; then :
40035  $as_echo_n "(cached) " >&6
40036else
40037  case $GNM in
40038  [\\/]* | ?:[\\/]*)
40039  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40040  ;;
40041  *)
40042  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40043for as_dir in $PATH
40044do
40045  IFS=$as_save_IFS
40046  test -z "$as_dir" && as_dir=.
40047    for ac_exec_ext in '' $ac_executable_extensions; do
40048  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40049    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40050    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40051    break 2
40052  fi
40053done
40054  done
40055IFS=$as_save_IFS
40056
40057  ;;
40058esac
40059fi
40060GNM=$ac_cv_path_GNM
40061if test -n "$GNM"; then
40062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40063$as_echo "$GNM" >&6; }
40064else
40065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40066$as_echo "no" >&6; }
40067fi
40068
40069
40070  test -n "$GNM" && break
40071done
40072
40073  else
40074    # The variable is set, but is it from the command line or the environment?
40075
40076    # Try to remove the string !GNM! from our list.
40077    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
40078    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40079      # If it failed, the variable was not from the command line. Ignore it,
40080      # but warn the user (except for BASH, which is always set by the calling BASH).
40081      if test "xGNM" != xBASH; then
40082        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
40083$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
40084      fi
40085      # Try to locate tool using the code snippet
40086      for ac_prog in gnm
40087do
40088  # Extract the first word of "$ac_prog", so it can be a program name with args.
40089set dummy $ac_prog; ac_word=$2
40090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40091$as_echo_n "checking for $ac_word... " >&6; }
40092if ${ac_cv_path_GNM+:} false; then :
40093  $as_echo_n "(cached) " >&6
40094else
40095  case $GNM in
40096  [\\/]* | ?:[\\/]*)
40097  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40098  ;;
40099  *)
40100  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40101for as_dir in $PATH
40102do
40103  IFS=$as_save_IFS
40104  test -z "$as_dir" && as_dir=.
40105    for ac_exec_ext in '' $ac_executable_extensions; do
40106  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40107    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40108    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40109    break 2
40110  fi
40111done
40112  done
40113IFS=$as_save_IFS
40114
40115  ;;
40116esac
40117fi
40118GNM=$ac_cv_path_GNM
40119if test -n "$GNM"; then
40120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40121$as_echo "$GNM" >&6; }
40122else
40123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40124$as_echo "no" >&6; }
40125fi
40126
40127
40128  test -n "$GNM" && break
40129done
40130
40131    else
40132      # If it succeeded, then it was overridden by the user. We will use it
40133      # for the tool.
40134
40135      # First remove it from the list of overridden variables, so we can test
40136      # for unknown variables in the end.
40137      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40138
40139      # Check if we try to supply an empty value
40140      if test "x$GNM" = x; then
40141        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
40142$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
40143        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40144$as_echo_n "checking for GNM... " >&6; }
40145        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40146$as_echo "disabled" >&6; }
40147      else
40148        # Check if the provided tool contains a complete path.
40149        tool_specified="$GNM"
40150        tool_basename="${tool_specified##*/}"
40151        if test "x$tool_basename" = "x$tool_specified"; then
40152          # A command without a complete path is provided, search $PATH.
40153          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
40154$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
40155          # Extract the first word of "$tool_basename", so it can be a program name with args.
40156set dummy $tool_basename; ac_word=$2
40157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40158$as_echo_n "checking for $ac_word... " >&6; }
40159if ${ac_cv_path_GNM+:} false; then :
40160  $as_echo_n "(cached) " >&6
40161else
40162  case $GNM in
40163  [\\/]* | ?:[\\/]*)
40164  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40165  ;;
40166  *)
40167  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40168for as_dir in $PATH
40169do
40170  IFS=$as_save_IFS
40171  test -z "$as_dir" && as_dir=.
40172    for ac_exec_ext in '' $ac_executable_extensions; do
40173  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40174    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40175    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40176    break 2
40177  fi
40178done
40179  done
40180IFS=$as_save_IFS
40181
40182  ;;
40183esac
40184fi
40185GNM=$ac_cv_path_GNM
40186if test -n "$GNM"; then
40187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40188$as_echo "$GNM" >&6; }
40189else
40190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40191$as_echo "no" >&6; }
40192fi
40193
40194
40195          if test "x$GNM" = x; then
40196            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40197          fi
40198        else
40199          # Otherwise we believe it is a complete path. Use it as it is.
40200          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
40201$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
40202          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40203$as_echo_n "checking for GNM... " >&6; }
40204          if test ! -x "$tool_specified"; then
40205            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40206$as_echo "not found" >&6; }
40207            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
40208          fi
40209          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40210$as_echo "$tool_specified" >&6; }
40211        fi
40212      fi
40213    fi
40214
40215  fi
40216
40217
40218
40219  # Only process if variable expands to non-empty
40220
40221  if test "x$GNM" != x; then
40222    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40223
40224  # First separate the path from the arguments. This will split at the first
40225  # space.
40226  complete="$GNM"
40227  path="${complete%% *}"
40228  tmp="$complete EOL"
40229  arguments="${tmp#* }"
40230
40231  # Input might be given as Windows format, start by converting to
40232  # unix format.
40233  new_path=`$CYGPATH -u "$path"`
40234
40235  # Now try to locate executable using which
40236  new_path=`$WHICH "$new_path" 2> /dev/null`
40237  # bat and cmd files are not always considered executable in cygwin causing which
40238  # to not find them
40239  if test "x$new_path" = x \
40240      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40241      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40242    new_path=`$CYGPATH -u "$path"`
40243  fi
40244  if test "x$new_path" = x; then
40245    # Oops. Which didn't find the executable.
40246    # The splitting of arguments from the executable at a space might have been incorrect,
40247    # since paths with space are more likely in Windows. Give it another try with the whole
40248    # argument.
40249    path="$complete"
40250    arguments="EOL"
40251    new_path=`$CYGPATH -u "$path"`
40252    new_path=`$WHICH "$new_path" 2> /dev/null`
40253    # bat and cmd files are not always considered executable in cygwin causing which
40254    # to not find them
40255    if test "x$new_path" = x \
40256        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40257        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40258      new_path=`$CYGPATH -u "$path"`
40259    fi
40260    if test "x$new_path" = x; then
40261      # It's still not found. Now this is an unrecoverable error.
40262      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40263$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40264      has_space=`$ECHO "$complete" | $GREP " "`
40265      if test "x$has_space" != x; then
40266        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40267$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40268      fi
40269      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40270    fi
40271  fi
40272
40273  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40274  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40275  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40276  # "foo.exe" is OK but "foo" is an error.
40277  #
40278  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40279  # It is also a way to make sure we got the proper file name for the real test later on.
40280  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40281  if test "x$test_shortpath" = x; then
40282    # Short path failed, file does not exist as specified.
40283    # Try adding .exe or .cmd
40284    if test -f "${new_path}.exe"; then
40285      input_to_shortpath="${new_path}.exe"
40286    elif test -f "${new_path}.cmd"; then
40287      input_to_shortpath="${new_path}.cmd"
40288    else
40289      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
40290$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
40291      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40292$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40293      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40294    fi
40295  else
40296    input_to_shortpath="$new_path"
40297  fi
40298
40299  # Call helper function which possibly converts this using DOS-style short mode.
40300  # If so, the updated path is stored in $new_path.
40301  new_path="$input_to_shortpath"
40302
40303  input_path="$input_to_shortpath"
40304  # Check if we need to convert this using DOS-style short mode. If the path
40305  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40306  # take no chances and rewrite it.
40307  # Note: m4 eats our [], so we need to use [ and ] instead.
40308  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40309  if test "x$has_forbidden_chars" != x; then
40310    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40311    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40312    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40313    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40314      # Going to short mode and back again did indeed matter. Since short mode is
40315      # case insensitive, let's make it lowercase to improve readability.
40316      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40317      # Now convert it back to Unix-style (cygpath)
40318      input_path=`$CYGPATH -u "$shortmode_path"`
40319      new_path="$input_path"
40320    fi
40321  fi
40322
40323  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40324  if test "x$test_cygdrive_prefix" = x; then
40325    # As a simple fix, exclude /usr/bin since it's not a real path.
40326    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40327      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40328      # a path prefixed by /cygdrive for fixpath to work.
40329      new_path="$CYGWIN_ROOT_PATH$input_path"
40330    fi
40331  fi
40332
40333  # remove trailing .exe if any
40334  new_path="${new_path/%.exe/}"
40335
40336    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40337
40338  # First separate the path from the arguments. This will split at the first
40339  # space.
40340  complete="$GNM"
40341  path="${complete%% *}"
40342  tmp="$complete EOL"
40343  arguments="${tmp#* }"
40344
40345  # Input might be given as Windows format, start by converting to
40346  # unix format.
40347  new_path="$path"
40348
40349  windows_path="$new_path"
40350  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40351    unix_path=`$CYGPATH -u "$windows_path"`
40352    new_path="$unix_path"
40353  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40354    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40355    new_path="$unix_path"
40356  fi
40357
40358
40359  # Now try to locate executable using which
40360  new_path=`$WHICH "$new_path" 2> /dev/null`
40361
40362  if test "x$new_path" = x; then
40363    # Oops. Which didn't find the executable.
40364    # The splitting of arguments from the executable at a space might have been incorrect,
40365    # since paths with space are more likely in Windows. Give it another try with the whole
40366    # argument.
40367    path="$complete"
40368    arguments="EOL"
40369    new_path="$path"
40370
40371  windows_path="$new_path"
40372  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40373    unix_path=`$CYGPATH -u "$windows_path"`
40374    new_path="$unix_path"
40375  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40376    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40377    new_path="$unix_path"
40378  fi
40379
40380
40381    new_path=`$WHICH "$new_path" 2> /dev/null`
40382    # bat and cmd files are not always considered executable in MSYS causing which
40383    # to not find them
40384    if test "x$new_path" = x \
40385        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40386        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40387      new_path="$path"
40388
40389  windows_path="$new_path"
40390  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40391    unix_path=`$CYGPATH -u "$windows_path"`
40392    new_path="$unix_path"
40393  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40394    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40395    new_path="$unix_path"
40396  fi
40397
40398    fi
40399
40400    if test "x$new_path" = x; then
40401      # It's still not found. Now this is an unrecoverable error.
40402      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40403$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40404      has_space=`$ECHO "$complete" | $GREP " "`
40405      if test "x$has_space" != x; then
40406        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40407$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40408      fi
40409      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40410    fi
40411  fi
40412
40413  # Now new_path has a complete unix path to the binary
40414  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40415    # Keep paths in /bin as-is, but remove trailing .exe if any
40416    new_path="${new_path/%.exe/}"
40417    # Do not save /bin paths to all_fixpath_prefixes!
40418  else
40419    # Not in mixed or Windows style, start by that.
40420    new_path=`cmd //c echo $new_path`
40421
40422  input_path="$new_path"
40423  # Check if we need to convert this using DOS-style short mode. If the path
40424  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40425  # take no chances and rewrite it.
40426  # Note: m4 eats our [], so we need to use [ and ] instead.
40427  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40428  if test "x$has_forbidden_chars" != x; then
40429    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40430    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40431  fi
40432
40433    # Output is in $new_path
40434
40435  windows_path="$new_path"
40436  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40437    unix_path=`$CYGPATH -u "$windows_path"`
40438    new_path="$unix_path"
40439  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40440    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40441    new_path="$unix_path"
40442  fi
40443
40444    # remove trailing .exe if any
40445    new_path="${new_path/%.exe/}"
40446
40447    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40448    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40449  fi
40450
40451    else
40452      # We're on a unix platform. Hooray! :)
40453      # First separate the path from the arguments. This will split at the first
40454      # space.
40455      complete="$GNM"
40456      path="${complete%% *}"
40457      tmp="$complete EOL"
40458      arguments="${tmp#* }"
40459
40460      # Cannot rely on the command "which" here since it doesn't always work.
40461      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40462      if test -z "$is_absolute_path"; then
40463        # Path to executable is not absolute. Find it.
40464        IFS_save="$IFS"
40465        IFS=:
40466        for p in $PATH; do
40467          if test -f "$p/$path" && test -x "$p/$path"; then
40468            new_path="$p/$path"
40469            break
40470          fi
40471        done
40472        IFS="$IFS_save"
40473      else
40474        # This is an absolute path, we can use it without further modifications.
40475        new_path="$path"
40476      fi
40477
40478      if test "x$new_path" = x; then
40479        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40480$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40481        has_space=`$ECHO "$complete" | $GREP " "`
40482        if test "x$has_space" != x; then
40483          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40484$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40485        fi
40486        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40487      fi
40488    fi
40489
40490    # Now join together the path and the arguments once again
40491    if test "x$arguments" != xEOL; then
40492      new_complete="$new_path ${arguments% *}"
40493    else
40494      new_complete="$new_path"
40495    fi
40496
40497    if test "x$complete" != "x$new_complete"; then
40498      GNM="$new_complete"
40499      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
40500$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
40501    fi
40502  fi
40503
40504  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
40505    # FIXME: we should unify this with the solaris case above.
40506
40507
40508  # Publish this variable in the help.
40509
40510
40511  if [ -z "${STRIP+x}" ]; then
40512    # The variable is not set by user, try to locate tool using the code snippet
40513    if test -n "$ac_tool_prefix"; then
40514  for ac_prog in strip
40515  do
40516    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40517set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40519$as_echo_n "checking for $ac_word... " >&6; }
40520if ${ac_cv_prog_STRIP+:} false; then :
40521  $as_echo_n "(cached) " >&6
40522else
40523  if test -n "$STRIP"; then
40524  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
40525else
40526as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40527for as_dir in $PATH
40528do
40529  IFS=$as_save_IFS
40530  test -z "$as_dir" && as_dir=.
40531    for ac_exec_ext in '' $ac_executable_extensions; do
40532  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40533    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
40534    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40535    break 2
40536  fi
40537done
40538  done
40539IFS=$as_save_IFS
40540
40541fi
40542fi
40543STRIP=$ac_cv_prog_STRIP
40544if test -n "$STRIP"; then
40545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40546$as_echo "$STRIP" >&6; }
40547else
40548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40549$as_echo "no" >&6; }
40550fi
40551
40552
40553    test -n "$STRIP" && break
40554  done
40555fi
40556if test -z "$STRIP"; then
40557  ac_ct_STRIP=$STRIP
40558  for ac_prog in strip
40559do
40560  # Extract the first word of "$ac_prog", so it can be a program name with args.
40561set dummy $ac_prog; ac_word=$2
40562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40563$as_echo_n "checking for $ac_word... " >&6; }
40564if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
40565  $as_echo_n "(cached) " >&6
40566else
40567  if test -n "$ac_ct_STRIP"; then
40568  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
40569else
40570as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40571for as_dir in $PATH
40572do
40573  IFS=$as_save_IFS
40574  test -z "$as_dir" && as_dir=.
40575    for ac_exec_ext in '' $ac_executable_extensions; do
40576  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40577    ac_cv_prog_ac_ct_STRIP="$ac_prog"
40578    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40579    break 2
40580  fi
40581done
40582  done
40583IFS=$as_save_IFS
40584
40585fi
40586fi
40587ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
40588if test -n "$ac_ct_STRIP"; then
40589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
40590$as_echo "$ac_ct_STRIP" >&6; }
40591else
40592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40593$as_echo "no" >&6; }
40594fi
40595
40596
40597  test -n "$ac_ct_STRIP" && break
40598done
40599
40600  if test "x$ac_ct_STRIP" = x; then
40601    STRIP=""
40602  else
40603    case $cross_compiling:$ac_tool_warned in
40604yes:)
40605{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40606$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40607ac_tool_warned=yes ;;
40608esac
40609    STRIP=$ac_ct_STRIP
40610  fi
40611fi
40612
40613  else
40614    # The variable is set, but is it from the command line or the environment?
40615
40616    # Try to remove the string !STRIP! from our list.
40617    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
40618    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40619      # If it failed, the variable was not from the command line. Ignore it,
40620      # but warn the user (except for BASH, which is always set by the calling BASH).
40621      if test "xSTRIP" != xBASH; then
40622        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
40623$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
40624      fi
40625      # Try to locate tool using the code snippet
40626      if test -n "$ac_tool_prefix"; then
40627  for ac_prog in strip
40628  do
40629    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40630set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40632$as_echo_n "checking for $ac_word... " >&6; }
40633if ${ac_cv_prog_STRIP+:} false; then :
40634  $as_echo_n "(cached) " >&6
40635else
40636  if test -n "$STRIP"; then
40637  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
40638else
40639as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40640for as_dir in $PATH
40641do
40642  IFS=$as_save_IFS
40643  test -z "$as_dir" && as_dir=.
40644    for ac_exec_ext in '' $ac_executable_extensions; do
40645  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40646    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
40647    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40648    break 2
40649  fi
40650done
40651  done
40652IFS=$as_save_IFS
40653
40654fi
40655fi
40656STRIP=$ac_cv_prog_STRIP
40657if test -n "$STRIP"; then
40658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40659$as_echo "$STRIP" >&6; }
40660else
40661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40662$as_echo "no" >&6; }
40663fi
40664
40665
40666    test -n "$STRIP" && break
40667  done
40668fi
40669if test -z "$STRIP"; then
40670  ac_ct_STRIP=$STRIP
40671  for ac_prog in strip
40672do
40673  # Extract the first word of "$ac_prog", so it can be a program name with args.
40674set dummy $ac_prog; ac_word=$2
40675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40676$as_echo_n "checking for $ac_word... " >&6; }
40677if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
40678  $as_echo_n "(cached) " >&6
40679else
40680  if test -n "$ac_ct_STRIP"; then
40681  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
40682else
40683as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40684for as_dir in $PATH
40685do
40686  IFS=$as_save_IFS
40687  test -z "$as_dir" && as_dir=.
40688    for ac_exec_ext in '' $ac_executable_extensions; do
40689  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40690    ac_cv_prog_ac_ct_STRIP="$ac_prog"
40691    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40692    break 2
40693  fi
40694done
40695  done
40696IFS=$as_save_IFS
40697
40698fi
40699fi
40700ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
40701if test -n "$ac_ct_STRIP"; then
40702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
40703$as_echo "$ac_ct_STRIP" >&6; }
40704else
40705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40706$as_echo "no" >&6; }
40707fi
40708
40709
40710  test -n "$ac_ct_STRIP" && break
40711done
40712
40713  if test "x$ac_ct_STRIP" = x; then
40714    STRIP=""
40715  else
40716    case $cross_compiling:$ac_tool_warned in
40717yes:)
40718{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40719$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40720ac_tool_warned=yes ;;
40721esac
40722    STRIP=$ac_ct_STRIP
40723  fi
40724fi
40725
40726    else
40727      # If it succeeded, then it was overridden by the user. We will use it
40728      # for the tool.
40729
40730      # First remove it from the list of overridden variables, so we can test
40731      # for unknown variables in the end.
40732      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40733
40734      # Check if we try to supply an empty value
40735      if test "x$STRIP" = x; then
40736        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
40737$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
40738        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40739$as_echo_n "checking for STRIP... " >&6; }
40740        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40741$as_echo "disabled" >&6; }
40742      else
40743        # Check if the provided tool contains a complete path.
40744        tool_specified="$STRIP"
40745        tool_basename="${tool_specified##*/}"
40746        if test "x$tool_basename" = "x$tool_specified"; then
40747          # A command without a complete path is provided, search $PATH.
40748          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
40749$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
40750          # Extract the first word of "$tool_basename", so it can be a program name with args.
40751set dummy $tool_basename; ac_word=$2
40752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40753$as_echo_n "checking for $ac_word... " >&6; }
40754if ${ac_cv_path_STRIP+:} false; then :
40755  $as_echo_n "(cached) " >&6
40756else
40757  case $STRIP in
40758  [\\/]* | ?:[\\/]*)
40759  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40760  ;;
40761  *)
40762  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40763for as_dir in $PATH
40764do
40765  IFS=$as_save_IFS
40766  test -z "$as_dir" && as_dir=.
40767    for ac_exec_ext in '' $ac_executable_extensions; do
40768  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40769    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40770    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40771    break 2
40772  fi
40773done
40774  done
40775IFS=$as_save_IFS
40776
40777  ;;
40778esac
40779fi
40780STRIP=$ac_cv_path_STRIP
40781if test -n "$STRIP"; then
40782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40783$as_echo "$STRIP" >&6; }
40784else
40785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40786$as_echo "no" >&6; }
40787fi
40788
40789
40790          if test "x$STRIP" = x; then
40791            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40792          fi
40793        else
40794          # Otherwise we believe it is a complete path. Use it as it is.
40795          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
40796$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
40797          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40798$as_echo_n "checking for STRIP... " >&6; }
40799          if test ! -x "$tool_specified"; then
40800            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40801$as_echo "not found" >&6; }
40802            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
40803          fi
40804          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40805$as_echo "$tool_specified" >&6; }
40806        fi
40807      fi
40808    fi
40809
40810  fi
40811
40812
40813
40814  # Only process if variable expands to non-empty
40815
40816  if test "x$STRIP" != x; then
40817    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40818
40819  # First separate the path from the arguments. This will split at the first
40820  # space.
40821  complete="$STRIP"
40822  path="${complete%% *}"
40823  tmp="$complete EOL"
40824  arguments="${tmp#* }"
40825
40826  # Input might be given as Windows format, start by converting to
40827  # unix format.
40828  new_path=`$CYGPATH -u "$path"`
40829
40830  # Now try to locate executable using which
40831  new_path=`$WHICH "$new_path" 2> /dev/null`
40832  # bat and cmd files are not always considered executable in cygwin causing which
40833  # to not find them
40834  if test "x$new_path" = x \
40835      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40836      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40837    new_path=`$CYGPATH -u "$path"`
40838  fi
40839  if test "x$new_path" = x; then
40840    # Oops. Which didn't find the executable.
40841    # The splitting of arguments from the executable at a space might have been incorrect,
40842    # since paths with space are more likely in Windows. Give it another try with the whole
40843    # argument.
40844    path="$complete"
40845    arguments="EOL"
40846    new_path=`$CYGPATH -u "$path"`
40847    new_path=`$WHICH "$new_path" 2> /dev/null`
40848    # bat and cmd files are not always considered executable in cygwin causing which
40849    # to not find them
40850    if test "x$new_path" = x \
40851        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40852        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40853      new_path=`$CYGPATH -u "$path"`
40854    fi
40855    if test "x$new_path" = x; then
40856      # It's still not found. Now this is an unrecoverable error.
40857      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40858$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40859      has_space=`$ECHO "$complete" | $GREP " "`
40860      if test "x$has_space" != x; then
40861        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40862$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40863      fi
40864      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40865    fi
40866  fi
40867
40868  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40869  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40870  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40871  # "foo.exe" is OK but "foo" is an error.
40872  #
40873  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40874  # It is also a way to make sure we got the proper file name for the real test later on.
40875  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40876  if test "x$test_shortpath" = x; then
40877    # Short path failed, file does not exist as specified.
40878    # Try adding .exe or .cmd
40879    if test -f "${new_path}.exe"; then
40880      input_to_shortpath="${new_path}.exe"
40881    elif test -f "${new_path}.cmd"; then
40882      input_to_shortpath="${new_path}.cmd"
40883    else
40884      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
40885$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
40886      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40887$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40888      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40889    fi
40890  else
40891    input_to_shortpath="$new_path"
40892  fi
40893
40894  # Call helper function which possibly converts this using DOS-style short mode.
40895  # If so, the updated path is stored in $new_path.
40896  new_path="$input_to_shortpath"
40897
40898  input_path="$input_to_shortpath"
40899  # Check if we need to convert this using DOS-style short mode. If the path
40900  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40901  # take no chances and rewrite it.
40902  # Note: m4 eats our [], so we need to use [ and ] instead.
40903  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40904  if test "x$has_forbidden_chars" != x; then
40905    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40906    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40907    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40908    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40909      # Going to short mode and back again did indeed matter. Since short mode is
40910      # case insensitive, let's make it lowercase to improve readability.
40911      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40912      # Now convert it back to Unix-style (cygpath)
40913      input_path=`$CYGPATH -u "$shortmode_path"`
40914      new_path="$input_path"
40915    fi
40916  fi
40917
40918  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40919  if test "x$test_cygdrive_prefix" = x; then
40920    # As a simple fix, exclude /usr/bin since it's not a real path.
40921    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40922      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40923      # a path prefixed by /cygdrive for fixpath to work.
40924      new_path="$CYGWIN_ROOT_PATH$input_path"
40925    fi
40926  fi
40927
40928  # remove trailing .exe if any
40929  new_path="${new_path/%.exe/}"
40930
40931    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40932
40933  # First separate the path from the arguments. This will split at the first
40934  # space.
40935  complete="$STRIP"
40936  path="${complete%% *}"
40937  tmp="$complete EOL"
40938  arguments="${tmp#* }"
40939
40940  # Input might be given as Windows format, start by converting to
40941  # unix format.
40942  new_path="$path"
40943
40944  windows_path="$new_path"
40945  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40946    unix_path=`$CYGPATH -u "$windows_path"`
40947    new_path="$unix_path"
40948  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40949    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40950    new_path="$unix_path"
40951  fi
40952
40953
40954  # Now try to locate executable using which
40955  new_path=`$WHICH "$new_path" 2> /dev/null`
40956
40957  if test "x$new_path" = x; then
40958    # Oops. Which didn't find the executable.
40959    # The splitting of arguments from the executable at a space might have been incorrect,
40960    # since paths with space are more likely in Windows. Give it another try with the whole
40961    # argument.
40962    path="$complete"
40963    arguments="EOL"
40964    new_path="$path"
40965
40966  windows_path="$new_path"
40967  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40968    unix_path=`$CYGPATH -u "$windows_path"`
40969    new_path="$unix_path"
40970  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40971    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40972    new_path="$unix_path"
40973  fi
40974
40975
40976    new_path=`$WHICH "$new_path" 2> /dev/null`
40977    # bat and cmd files are not always considered executable in MSYS causing which
40978    # to not find them
40979    if test "x$new_path" = x \
40980        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40981        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40982      new_path="$path"
40983
40984  windows_path="$new_path"
40985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40986    unix_path=`$CYGPATH -u "$windows_path"`
40987    new_path="$unix_path"
40988  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40989    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40990    new_path="$unix_path"
40991  fi
40992
40993    fi
40994
40995    if test "x$new_path" = x; then
40996      # It's still not found. Now this is an unrecoverable error.
40997      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40998$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40999      has_space=`$ECHO "$complete" | $GREP " "`
41000      if test "x$has_space" != x; then
41001        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41002$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41003      fi
41004      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41005    fi
41006  fi
41007
41008  # Now new_path has a complete unix path to the binary
41009  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41010    # Keep paths in /bin as-is, but remove trailing .exe if any
41011    new_path="${new_path/%.exe/}"
41012    # Do not save /bin paths to all_fixpath_prefixes!
41013  else
41014    # Not in mixed or Windows style, start by that.
41015    new_path=`cmd //c echo $new_path`
41016
41017  input_path="$new_path"
41018  # Check if we need to convert this using DOS-style short mode. If the path
41019  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41020  # take no chances and rewrite it.
41021  # Note: m4 eats our [], so we need to use [ and ] instead.
41022  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41023  if test "x$has_forbidden_chars" != x; then
41024    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41025    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41026  fi
41027
41028    # Output is in $new_path
41029
41030  windows_path="$new_path"
41031  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41032    unix_path=`$CYGPATH -u "$windows_path"`
41033    new_path="$unix_path"
41034  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41035    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41036    new_path="$unix_path"
41037  fi
41038
41039    # remove trailing .exe if any
41040    new_path="${new_path/%.exe/}"
41041
41042    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41043    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41044  fi
41045
41046    else
41047      # We're on a unix platform. Hooray! :)
41048      # First separate the path from the arguments. This will split at the first
41049      # space.
41050      complete="$STRIP"
41051      path="${complete%% *}"
41052      tmp="$complete EOL"
41053      arguments="${tmp#* }"
41054
41055      # Cannot rely on the command "which" here since it doesn't always work.
41056      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41057      if test -z "$is_absolute_path"; then
41058        # Path to executable is not absolute. Find it.
41059        IFS_save="$IFS"
41060        IFS=:
41061        for p in $PATH; do
41062          if test -f "$p/$path" && test -x "$p/$path"; then
41063            new_path="$p/$path"
41064            break
41065          fi
41066        done
41067        IFS="$IFS_save"
41068      else
41069        # This is an absolute path, we can use it without further modifications.
41070        new_path="$path"
41071      fi
41072
41073      if test "x$new_path" = x; then
41074        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41075$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41076        has_space=`$ECHO "$complete" | $GREP " "`
41077        if test "x$has_space" != x; then
41078          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41079$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41080        fi
41081        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41082      fi
41083    fi
41084
41085    # Now join together the path and the arguments once again
41086    if test "x$arguments" != xEOL; then
41087      new_complete="$new_path ${arguments% *}"
41088    else
41089      new_complete="$new_path"
41090    fi
41091
41092    if test "x$complete" != "x$new_complete"; then
41093      STRIP="$new_complete"
41094      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
41095$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
41096    fi
41097  fi
41098
41099    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41100
41101
41102  # Publish this variable in the help.
41103
41104
41105  if [ -z "${NM+x}" ]; then
41106    # The variable is not set by user, try to locate tool using the code snippet
41107    if test -n "$ac_tool_prefix"; then
41108  for ac_prog in nm gcc-nm
41109  do
41110    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41111set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41113$as_echo_n "checking for $ac_word... " >&6; }
41114if ${ac_cv_prog_NM+:} false; then :
41115  $as_echo_n "(cached) " >&6
41116else
41117  if test -n "$NM"; then
41118  ac_cv_prog_NM="$NM" # Let the user override the test.
41119else
41120as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41121for as_dir in $PATH
41122do
41123  IFS=$as_save_IFS
41124  test -z "$as_dir" && as_dir=.
41125    for ac_exec_ext in '' $ac_executable_extensions; do
41126  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41127    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41128    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41129    break 2
41130  fi
41131done
41132  done
41133IFS=$as_save_IFS
41134
41135fi
41136fi
41137NM=$ac_cv_prog_NM
41138if test -n "$NM"; then
41139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41140$as_echo "$NM" >&6; }
41141else
41142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41143$as_echo "no" >&6; }
41144fi
41145
41146
41147    test -n "$NM" && break
41148  done
41149fi
41150if test -z "$NM"; then
41151  ac_ct_NM=$NM
41152  for ac_prog in nm gcc-nm
41153do
41154  # Extract the first word of "$ac_prog", so it can be a program name with args.
41155set dummy $ac_prog; ac_word=$2
41156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41157$as_echo_n "checking for $ac_word... " >&6; }
41158if ${ac_cv_prog_ac_ct_NM+:} false; then :
41159  $as_echo_n "(cached) " >&6
41160else
41161  if test -n "$ac_ct_NM"; then
41162  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41163else
41164as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41165for as_dir in $PATH
41166do
41167  IFS=$as_save_IFS
41168  test -z "$as_dir" && as_dir=.
41169    for ac_exec_ext in '' $ac_executable_extensions; do
41170  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41171    ac_cv_prog_ac_ct_NM="$ac_prog"
41172    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41173    break 2
41174  fi
41175done
41176  done
41177IFS=$as_save_IFS
41178
41179fi
41180fi
41181ac_ct_NM=$ac_cv_prog_ac_ct_NM
41182if test -n "$ac_ct_NM"; then
41183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41184$as_echo "$ac_ct_NM" >&6; }
41185else
41186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41187$as_echo "no" >&6; }
41188fi
41189
41190
41191  test -n "$ac_ct_NM" && break
41192done
41193
41194  if test "x$ac_ct_NM" = x; then
41195    NM=""
41196  else
41197    case $cross_compiling:$ac_tool_warned in
41198yes:)
41199{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41200$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41201ac_tool_warned=yes ;;
41202esac
41203    NM=$ac_ct_NM
41204  fi
41205fi
41206
41207  else
41208    # The variable is set, but is it from the command line or the environment?
41209
41210    # Try to remove the string !NM! from our list.
41211    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41212    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41213      # If it failed, the variable was not from the command line. Ignore it,
41214      # but warn the user (except for BASH, which is always set by the calling BASH).
41215      if test "xNM" != xBASH; then
41216        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41217$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41218      fi
41219      # Try to locate tool using the code snippet
41220      if test -n "$ac_tool_prefix"; then
41221  for ac_prog in nm gcc-nm
41222  do
41223    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41224set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41226$as_echo_n "checking for $ac_word... " >&6; }
41227if ${ac_cv_prog_NM+:} false; then :
41228  $as_echo_n "(cached) " >&6
41229else
41230  if test -n "$NM"; then
41231  ac_cv_prog_NM="$NM" # Let the user override the test.
41232else
41233as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41234for as_dir in $PATH
41235do
41236  IFS=$as_save_IFS
41237  test -z "$as_dir" && as_dir=.
41238    for ac_exec_ext in '' $ac_executable_extensions; do
41239  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41240    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41241    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41242    break 2
41243  fi
41244done
41245  done
41246IFS=$as_save_IFS
41247
41248fi
41249fi
41250NM=$ac_cv_prog_NM
41251if test -n "$NM"; then
41252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41253$as_echo "$NM" >&6; }
41254else
41255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41256$as_echo "no" >&6; }
41257fi
41258
41259
41260    test -n "$NM" && break
41261  done
41262fi
41263if test -z "$NM"; then
41264  ac_ct_NM=$NM
41265  for ac_prog in nm gcc-nm
41266do
41267  # Extract the first word of "$ac_prog", so it can be a program name with args.
41268set dummy $ac_prog; ac_word=$2
41269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41270$as_echo_n "checking for $ac_word... " >&6; }
41271if ${ac_cv_prog_ac_ct_NM+:} false; then :
41272  $as_echo_n "(cached) " >&6
41273else
41274  if test -n "$ac_ct_NM"; then
41275  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41276else
41277as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41278for as_dir in $PATH
41279do
41280  IFS=$as_save_IFS
41281  test -z "$as_dir" && as_dir=.
41282    for ac_exec_ext in '' $ac_executable_extensions; do
41283  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41284    ac_cv_prog_ac_ct_NM="$ac_prog"
41285    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41286    break 2
41287  fi
41288done
41289  done
41290IFS=$as_save_IFS
41291
41292fi
41293fi
41294ac_ct_NM=$ac_cv_prog_ac_ct_NM
41295if test -n "$ac_ct_NM"; then
41296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41297$as_echo "$ac_ct_NM" >&6; }
41298else
41299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41300$as_echo "no" >&6; }
41301fi
41302
41303
41304  test -n "$ac_ct_NM" && break
41305done
41306
41307  if test "x$ac_ct_NM" = x; then
41308    NM=""
41309  else
41310    case $cross_compiling:$ac_tool_warned in
41311yes:)
41312{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41313$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41314ac_tool_warned=yes ;;
41315esac
41316    NM=$ac_ct_NM
41317  fi
41318fi
41319
41320    else
41321      # If it succeeded, then it was overridden by the user. We will use it
41322      # for the tool.
41323
41324      # First remove it from the list of overridden variables, so we can test
41325      # for unknown variables in the end.
41326      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41327
41328      # Check if we try to supply an empty value
41329      if test "x$NM" = x; then
41330        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41331$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41332        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41333$as_echo_n "checking for NM... " >&6; }
41334        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41335$as_echo "disabled" >&6; }
41336      else
41337        # Check if the provided tool contains a complete path.
41338        tool_specified="$NM"
41339        tool_basename="${tool_specified##*/}"
41340        if test "x$tool_basename" = "x$tool_specified"; then
41341          # A command without a complete path is provided, search $PATH.
41342          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41343$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41344          # Extract the first word of "$tool_basename", so it can be a program name with args.
41345set dummy $tool_basename; ac_word=$2
41346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41347$as_echo_n "checking for $ac_word... " >&6; }
41348if ${ac_cv_path_NM+:} false; then :
41349  $as_echo_n "(cached) " >&6
41350else
41351  case $NM in
41352  [\\/]* | ?:[\\/]*)
41353  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41354  ;;
41355  *)
41356  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41357for as_dir in $PATH
41358do
41359  IFS=$as_save_IFS
41360  test -z "$as_dir" && as_dir=.
41361    for ac_exec_ext in '' $ac_executable_extensions; do
41362  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41363    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41364    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41365    break 2
41366  fi
41367done
41368  done
41369IFS=$as_save_IFS
41370
41371  ;;
41372esac
41373fi
41374NM=$ac_cv_path_NM
41375if test -n "$NM"; then
41376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41377$as_echo "$NM" >&6; }
41378else
41379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41380$as_echo "no" >&6; }
41381fi
41382
41383
41384          if test "x$NM" = x; then
41385            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41386          fi
41387        else
41388          # Otherwise we believe it is a complete path. Use it as it is.
41389          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41390$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41391          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41392$as_echo_n "checking for NM... " >&6; }
41393          if test ! -x "$tool_specified"; then
41394            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41395$as_echo "not found" >&6; }
41396            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41397          fi
41398          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41399$as_echo "$tool_specified" >&6; }
41400        fi
41401      fi
41402    fi
41403
41404  fi
41405
41406
41407    else
41408
41409
41410  # Publish this variable in the help.
41411
41412
41413  if [ -z "${NM+x}" ]; then
41414    # The variable is not set by user, try to locate tool using the code snippet
41415    if test -n "$ac_tool_prefix"; then
41416  for ac_prog in nm
41417  do
41418    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41419set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41421$as_echo_n "checking for $ac_word... " >&6; }
41422if ${ac_cv_prog_NM+:} false; then :
41423  $as_echo_n "(cached) " >&6
41424else
41425  if test -n "$NM"; then
41426  ac_cv_prog_NM="$NM" # Let the user override the test.
41427else
41428as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41429for as_dir in $PATH
41430do
41431  IFS=$as_save_IFS
41432  test -z "$as_dir" && as_dir=.
41433    for ac_exec_ext in '' $ac_executable_extensions; do
41434  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41435    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41436    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41437    break 2
41438  fi
41439done
41440  done
41441IFS=$as_save_IFS
41442
41443fi
41444fi
41445NM=$ac_cv_prog_NM
41446if test -n "$NM"; then
41447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41448$as_echo "$NM" >&6; }
41449else
41450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41451$as_echo "no" >&6; }
41452fi
41453
41454
41455    test -n "$NM" && break
41456  done
41457fi
41458if test -z "$NM"; then
41459  ac_ct_NM=$NM
41460  for ac_prog in nm
41461do
41462  # Extract the first word of "$ac_prog", so it can be a program name with args.
41463set dummy $ac_prog; ac_word=$2
41464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41465$as_echo_n "checking for $ac_word... " >&6; }
41466if ${ac_cv_prog_ac_ct_NM+:} false; then :
41467  $as_echo_n "(cached) " >&6
41468else
41469  if test -n "$ac_ct_NM"; then
41470  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41471else
41472as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41473for as_dir in $PATH
41474do
41475  IFS=$as_save_IFS
41476  test -z "$as_dir" && as_dir=.
41477    for ac_exec_ext in '' $ac_executable_extensions; do
41478  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41479    ac_cv_prog_ac_ct_NM="$ac_prog"
41480    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41481    break 2
41482  fi
41483done
41484  done
41485IFS=$as_save_IFS
41486
41487fi
41488fi
41489ac_ct_NM=$ac_cv_prog_ac_ct_NM
41490if test -n "$ac_ct_NM"; then
41491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41492$as_echo "$ac_ct_NM" >&6; }
41493else
41494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41495$as_echo "no" >&6; }
41496fi
41497
41498
41499  test -n "$ac_ct_NM" && break
41500done
41501
41502  if test "x$ac_ct_NM" = x; then
41503    NM=""
41504  else
41505    case $cross_compiling:$ac_tool_warned in
41506yes:)
41507{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41508$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41509ac_tool_warned=yes ;;
41510esac
41511    NM=$ac_ct_NM
41512  fi
41513fi
41514
41515  else
41516    # The variable is set, but is it from the command line or the environment?
41517
41518    # Try to remove the string !NM! from our list.
41519    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41520    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41521      # If it failed, the variable was not from the command line. Ignore it,
41522      # but warn the user (except for BASH, which is always set by the calling BASH).
41523      if test "xNM" != xBASH; then
41524        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41525$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41526      fi
41527      # Try to locate tool using the code snippet
41528      if test -n "$ac_tool_prefix"; then
41529  for ac_prog in nm
41530  do
41531    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41532set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41534$as_echo_n "checking for $ac_word... " >&6; }
41535if ${ac_cv_prog_NM+:} false; then :
41536  $as_echo_n "(cached) " >&6
41537else
41538  if test -n "$NM"; then
41539  ac_cv_prog_NM="$NM" # Let the user override the test.
41540else
41541as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41542for as_dir in $PATH
41543do
41544  IFS=$as_save_IFS
41545  test -z "$as_dir" && as_dir=.
41546    for ac_exec_ext in '' $ac_executable_extensions; do
41547  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41548    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41549    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41550    break 2
41551  fi
41552done
41553  done
41554IFS=$as_save_IFS
41555
41556fi
41557fi
41558NM=$ac_cv_prog_NM
41559if test -n "$NM"; then
41560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41561$as_echo "$NM" >&6; }
41562else
41563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41564$as_echo "no" >&6; }
41565fi
41566
41567
41568    test -n "$NM" && break
41569  done
41570fi
41571if test -z "$NM"; then
41572  ac_ct_NM=$NM
41573  for ac_prog in nm
41574do
41575  # Extract the first word of "$ac_prog", so it can be a program name with args.
41576set dummy $ac_prog; ac_word=$2
41577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41578$as_echo_n "checking for $ac_word... " >&6; }
41579if ${ac_cv_prog_ac_ct_NM+:} false; then :
41580  $as_echo_n "(cached) " >&6
41581else
41582  if test -n "$ac_ct_NM"; then
41583  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41584else
41585as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41586for as_dir in $PATH
41587do
41588  IFS=$as_save_IFS
41589  test -z "$as_dir" && as_dir=.
41590    for ac_exec_ext in '' $ac_executable_extensions; do
41591  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41592    ac_cv_prog_ac_ct_NM="$ac_prog"
41593    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41594    break 2
41595  fi
41596done
41597  done
41598IFS=$as_save_IFS
41599
41600fi
41601fi
41602ac_ct_NM=$ac_cv_prog_ac_ct_NM
41603if test -n "$ac_ct_NM"; then
41604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41605$as_echo "$ac_ct_NM" >&6; }
41606else
41607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41608$as_echo "no" >&6; }
41609fi
41610
41611
41612  test -n "$ac_ct_NM" && break
41613done
41614
41615  if test "x$ac_ct_NM" = x; then
41616    NM=""
41617  else
41618    case $cross_compiling:$ac_tool_warned in
41619yes:)
41620{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41621$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41622ac_tool_warned=yes ;;
41623esac
41624    NM=$ac_ct_NM
41625  fi
41626fi
41627
41628    else
41629      # If it succeeded, then it was overridden by the user. We will use it
41630      # for the tool.
41631
41632      # First remove it from the list of overridden variables, so we can test
41633      # for unknown variables in the end.
41634      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41635
41636      # Check if we try to supply an empty value
41637      if test "x$NM" = x; then
41638        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41639$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41640        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41641$as_echo_n "checking for NM... " >&6; }
41642        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41643$as_echo "disabled" >&6; }
41644      else
41645        # Check if the provided tool contains a complete path.
41646        tool_specified="$NM"
41647        tool_basename="${tool_specified##*/}"
41648        if test "x$tool_basename" = "x$tool_specified"; then
41649          # A command without a complete path is provided, search $PATH.
41650          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41651$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41652          # Extract the first word of "$tool_basename", so it can be a program name with args.
41653set dummy $tool_basename; ac_word=$2
41654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41655$as_echo_n "checking for $ac_word... " >&6; }
41656if ${ac_cv_path_NM+:} false; then :
41657  $as_echo_n "(cached) " >&6
41658else
41659  case $NM in
41660  [\\/]* | ?:[\\/]*)
41661  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41662  ;;
41663  *)
41664  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41665for as_dir in $PATH
41666do
41667  IFS=$as_save_IFS
41668  test -z "$as_dir" && as_dir=.
41669    for ac_exec_ext in '' $ac_executable_extensions; do
41670  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41671    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41672    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41673    break 2
41674  fi
41675done
41676  done
41677IFS=$as_save_IFS
41678
41679  ;;
41680esac
41681fi
41682NM=$ac_cv_path_NM
41683if test -n "$NM"; then
41684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41685$as_echo "$NM" >&6; }
41686else
41687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41688$as_echo "no" >&6; }
41689fi
41690
41691
41692          if test "x$NM" = x; then
41693            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41694          fi
41695        else
41696          # Otherwise we believe it is a complete path. Use it as it is.
41697          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41698$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41699          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41700$as_echo_n "checking for NM... " >&6; }
41701          if test ! -x "$tool_specified"; then
41702            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41703$as_echo "not found" >&6; }
41704            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41705          fi
41706          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41707$as_echo "$tool_specified" >&6; }
41708        fi
41709      fi
41710    fi
41711
41712  fi
41713
41714
41715    fi
41716
41717  # Only process if variable expands to non-empty
41718
41719  if test "x$NM" != x; then
41720    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41721
41722  # First separate the path from the arguments. This will split at the first
41723  # space.
41724  complete="$NM"
41725  path="${complete%% *}"
41726  tmp="$complete EOL"
41727  arguments="${tmp#* }"
41728
41729  # Input might be given as Windows format, start by converting to
41730  # unix format.
41731  new_path=`$CYGPATH -u "$path"`
41732
41733  # Now try to locate executable using which
41734  new_path=`$WHICH "$new_path" 2> /dev/null`
41735  # bat and cmd files are not always considered executable in cygwin causing which
41736  # to not find them
41737  if test "x$new_path" = x \
41738      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41739      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41740    new_path=`$CYGPATH -u "$path"`
41741  fi
41742  if test "x$new_path" = x; then
41743    # Oops. Which didn't find the executable.
41744    # The splitting of arguments from the executable at a space might have been incorrect,
41745    # since paths with space are more likely in Windows. Give it another try with the whole
41746    # argument.
41747    path="$complete"
41748    arguments="EOL"
41749    new_path=`$CYGPATH -u "$path"`
41750    new_path=`$WHICH "$new_path" 2> /dev/null`
41751    # bat and cmd files are not always considered executable in cygwin causing which
41752    # to not find them
41753    if test "x$new_path" = x \
41754        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41755        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41756      new_path=`$CYGPATH -u "$path"`
41757    fi
41758    if test "x$new_path" = x; then
41759      # It's still not found. Now this is an unrecoverable error.
41760      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41761$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41762      has_space=`$ECHO "$complete" | $GREP " "`
41763      if test "x$has_space" != x; then
41764        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41765$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41766      fi
41767      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41768    fi
41769  fi
41770
41771  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41772  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41773  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41774  # "foo.exe" is OK but "foo" is an error.
41775  #
41776  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41777  # It is also a way to make sure we got the proper file name for the real test later on.
41778  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41779  if test "x$test_shortpath" = x; then
41780    # Short path failed, file does not exist as specified.
41781    # Try adding .exe or .cmd
41782    if test -f "${new_path}.exe"; then
41783      input_to_shortpath="${new_path}.exe"
41784    elif test -f "${new_path}.cmd"; then
41785      input_to_shortpath="${new_path}.cmd"
41786    else
41787      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
41788$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
41789      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41790$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41791      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41792    fi
41793  else
41794    input_to_shortpath="$new_path"
41795  fi
41796
41797  # Call helper function which possibly converts this using DOS-style short mode.
41798  # If so, the updated path is stored in $new_path.
41799  new_path="$input_to_shortpath"
41800
41801  input_path="$input_to_shortpath"
41802  # Check if we need to convert this using DOS-style short mode. If the path
41803  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41804  # take no chances and rewrite it.
41805  # Note: m4 eats our [], so we need to use [ and ] instead.
41806  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41807  if test "x$has_forbidden_chars" != x; then
41808    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41809    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41810    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41811    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41812      # Going to short mode and back again did indeed matter. Since short mode is
41813      # case insensitive, let's make it lowercase to improve readability.
41814      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41815      # Now convert it back to Unix-style (cygpath)
41816      input_path=`$CYGPATH -u "$shortmode_path"`
41817      new_path="$input_path"
41818    fi
41819  fi
41820
41821  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41822  if test "x$test_cygdrive_prefix" = x; then
41823    # As a simple fix, exclude /usr/bin since it's not a real path.
41824    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41825      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41826      # a path prefixed by /cygdrive for fixpath to work.
41827      new_path="$CYGWIN_ROOT_PATH$input_path"
41828    fi
41829  fi
41830
41831  # remove trailing .exe if any
41832  new_path="${new_path/%.exe/}"
41833
41834    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41835
41836  # First separate the path from the arguments. This will split at the first
41837  # space.
41838  complete="$NM"
41839  path="${complete%% *}"
41840  tmp="$complete EOL"
41841  arguments="${tmp#* }"
41842
41843  # Input might be given as Windows format, start by converting to
41844  # unix format.
41845  new_path="$path"
41846
41847  windows_path="$new_path"
41848  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41849    unix_path=`$CYGPATH -u "$windows_path"`
41850    new_path="$unix_path"
41851  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41852    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41853    new_path="$unix_path"
41854  fi
41855
41856
41857  # Now try to locate executable using which
41858  new_path=`$WHICH "$new_path" 2> /dev/null`
41859
41860  if test "x$new_path" = x; then
41861    # Oops. Which didn't find the executable.
41862    # The splitting of arguments from the executable at a space might have been incorrect,
41863    # since paths with space are more likely in Windows. Give it another try with the whole
41864    # argument.
41865    path="$complete"
41866    arguments="EOL"
41867    new_path="$path"
41868
41869  windows_path="$new_path"
41870  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41871    unix_path=`$CYGPATH -u "$windows_path"`
41872    new_path="$unix_path"
41873  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41874    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41875    new_path="$unix_path"
41876  fi
41877
41878
41879    new_path=`$WHICH "$new_path" 2> /dev/null`
41880    # bat and cmd files are not always considered executable in MSYS causing which
41881    # to not find them
41882    if test "x$new_path" = x \
41883        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41884        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41885      new_path="$path"
41886
41887  windows_path="$new_path"
41888  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41889    unix_path=`$CYGPATH -u "$windows_path"`
41890    new_path="$unix_path"
41891  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41892    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41893    new_path="$unix_path"
41894  fi
41895
41896    fi
41897
41898    if test "x$new_path" = x; then
41899      # It's still not found. Now this is an unrecoverable error.
41900      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41901$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41902      has_space=`$ECHO "$complete" | $GREP " "`
41903      if test "x$has_space" != x; then
41904        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41905$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41906      fi
41907      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41908    fi
41909  fi
41910
41911  # Now new_path has a complete unix path to the binary
41912  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41913    # Keep paths in /bin as-is, but remove trailing .exe if any
41914    new_path="${new_path/%.exe/}"
41915    # Do not save /bin paths to all_fixpath_prefixes!
41916  else
41917    # Not in mixed or Windows style, start by that.
41918    new_path=`cmd //c echo $new_path`
41919
41920  input_path="$new_path"
41921  # Check if we need to convert this using DOS-style short mode. If the path
41922  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41923  # take no chances and rewrite it.
41924  # Note: m4 eats our [], so we need to use [ and ] instead.
41925  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41926  if test "x$has_forbidden_chars" != x; then
41927    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41928    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41929  fi
41930
41931    # Output is in $new_path
41932
41933  windows_path="$new_path"
41934  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41935    unix_path=`$CYGPATH -u "$windows_path"`
41936    new_path="$unix_path"
41937  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41938    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41939    new_path="$unix_path"
41940  fi
41941
41942    # remove trailing .exe if any
41943    new_path="${new_path/%.exe/}"
41944
41945    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41946    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41947  fi
41948
41949    else
41950      # We're on a unix platform. Hooray! :)
41951      # First separate the path from the arguments. This will split at the first
41952      # space.
41953      complete="$NM"
41954      path="${complete%% *}"
41955      tmp="$complete EOL"
41956      arguments="${tmp#* }"
41957
41958      # Cannot rely on the command "which" here since it doesn't always work.
41959      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41960      if test -z "$is_absolute_path"; then
41961        # Path to executable is not absolute. Find it.
41962        IFS_save="$IFS"
41963        IFS=:
41964        for p in $PATH; do
41965          if test -f "$p/$path" && test -x "$p/$path"; then
41966            new_path="$p/$path"
41967            break
41968          fi
41969        done
41970        IFS="$IFS_save"
41971      else
41972        # This is an absolute path, we can use it without further modifications.
41973        new_path="$path"
41974      fi
41975
41976      if test "x$new_path" = x; then
41977        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41978$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41979        has_space=`$ECHO "$complete" | $GREP " "`
41980        if test "x$has_space" != x; then
41981          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41982$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41983        fi
41984        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41985      fi
41986    fi
41987
41988    # Now join together the path and the arguments once again
41989    if test "x$arguments" != xEOL; then
41990      new_complete="$new_path ${arguments% *}"
41991    else
41992      new_complete="$new_path"
41993    fi
41994
41995    if test "x$complete" != "x$new_complete"; then
41996      NM="$new_complete"
41997      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
41998$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
41999    fi
42000  fi
42001
42002    GNM="$NM"
42003
42004  fi
42005
42006  # objcopy is used for moving debug symbols to separate files when
42007  # full debug symbols are enabled.
42008  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
42009
42010
42011  # Publish this variable in the help.
42012
42013
42014  if [ -z "${OBJCOPY+x}" ]; then
42015    # The variable is not set by user, try to locate tool using the code snippet
42016    if test -n "$ac_tool_prefix"; then
42017  for ac_prog in gobjcopy objcopy
42018  do
42019    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42020set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42022$as_echo_n "checking for $ac_word... " >&6; }
42023if ${ac_cv_prog_OBJCOPY+:} false; then :
42024  $as_echo_n "(cached) " >&6
42025else
42026  if test -n "$OBJCOPY"; then
42027  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42028else
42029as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42030for as_dir in $PATH
42031do
42032  IFS=$as_save_IFS
42033  test -z "$as_dir" && as_dir=.
42034    for ac_exec_ext in '' $ac_executable_extensions; do
42035  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42036    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42037    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42038    break 2
42039  fi
42040done
42041  done
42042IFS=$as_save_IFS
42043
42044fi
42045fi
42046OBJCOPY=$ac_cv_prog_OBJCOPY
42047if test -n "$OBJCOPY"; then
42048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42049$as_echo "$OBJCOPY" >&6; }
42050else
42051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42052$as_echo "no" >&6; }
42053fi
42054
42055
42056    test -n "$OBJCOPY" && break
42057  done
42058fi
42059if test -z "$OBJCOPY"; then
42060  ac_ct_OBJCOPY=$OBJCOPY
42061  for ac_prog in gobjcopy objcopy
42062do
42063  # Extract the first word of "$ac_prog", so it can be a program name with args.
42064set dummy $ac_prog; ac_word=$2
42065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42066$as_echo_n "checking for $ac_word... " >&6; }
42067if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42068  $as_echo_n "(cached) " >&6
42069else
42070  if test -n "$ac_ct_OBJCOPY"; then
42071  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42072else
42073as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42074for as_dir in $PATH
42075do
42076  IFS=$as_save_IFS
42077  test -z "$as_dir" && as_dir=.
42078    for ac_exec_ext in '' $ac_executable_extensions; do
42079  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42080    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42081    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42082    break 2
42083  fi
42084done
42085  done
42086IFS=$as_save_IFS
42087
42088fi
42089fi
42090ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42091if test -n "$ac_ct_OBJCOPY"; then
42092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42093$as_echo "$ac_ct_OBJCOPY" >&6; }
42094else
42095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42096$as_echo "no" >&6; }
42097fi
42098
42099
42100  test -n "$ac_ct_OBJCOPY" && break
42101done
42102
42103  if test "x$ac_ct_OBJCOPY" = x; then
42104    OBJCOPY=""
42105  else
42106    case $cross_compiling:$ac_tool_warned in
42107yes:)
42108{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42109$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42110ac_tool_warned=yes ;;
42111esac
42112    OBJCOPY=$ac_ct_OBJCOPY
42113  fi
42114fi
42115
42116  else
42117    # The variable is set, but is it from the command line or the environment?
42118
42119    # Try to remove the string !OBJCOPY! from our list.
42120    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
42121    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42122      # If it failed, the variable was not from the command line. Ignore it,
42123      # but warn the user (except for BASH, which is always set by the calling BASH).
42124      if test "xOBJCOPY" != xBASH; then
42125        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
42126$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
42127      fi
42128      # Try to locate tool using the code snippet
42129      if test -n "$ac_tool_prefix"; then
42130  for ac_prog in gobjcopy objcopy
42131  do
42132    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42133set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42135$as_echo_n "checking for $ac_word... " >&6; }
42136if ${ac_cv_prog_OBJCOPY+:} false; then :
42137  $as_echo_n "(cached) " >&6
42138else
42139  if test -n "$OBJCOPY"; then
42140  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42141else
42142as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42143for as_dir in $PATH
42144do
42145  IFS=$as_save_IFS
42146  test -z "$as_dir" && as_dir=.
42147    for ac_exec_ext in '' $ac_executable_extensions; do
42148  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42149    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42150    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42151    break 2
42152  fi
42153done
42154  done
42155IFS=$as_save_IFS
42156
42157fi
42158fi
42159OBJCOPY=$ac_cv_prog_OBJCOPY
42160if test -n "$OBJCOPY"; then
42161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42162$as_echo "$OBJCOPY" >&6; }
42163else
42164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42165$as_echo "no" >&6; }
42166fi
42167
42168
42169    test -n "$OBJCOPY" && break
42170  done
42171fi
42172if test -z "$OBJCOPY"; then
42173  ac_ct_OBJCOPY=$OBJCOPY
42174  for ac_prog in gobjcopy objcopy
42175do
42176  # Extract the first word of "$ac_prog", so it can be a program name with args.
42177set dummy $ac_prog; ac_word=$2
42178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42179$as_echo_n "checking for $ac_word... " >&6; }
42180if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42181  $as_echo_n "(cached) " >&6
42182else
42183  if test -n "$ac_ct_OBJCOPY"; then
42184  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42185else
42186as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42187for as_dir in $PATH
42188do
42189  IFS=$as_save_IFS
42190  test -z "$as_dir" && as_dir=.
42191    for ac_exec_ext in '' $ac_executable_extensions; do
42192  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42193    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42194    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42195    break 2
42196  fi
42197done
42198  done
42199IFS=$as_save_IFS
42200
42201fi
42202fi
42203ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42204if test -n "$ac_ct_OBJCOPY"; then
42205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42206$as_echo "$ac_ct_OBJCOPY" >&6; }
42207else
42208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42209$as_echo "no" >&6; }
42210fi
42211
42212
42213  test -n "$ac_ct_OBJCOPY" && break
42214done
42215
42216  if test "x$ac_ct_OBJCOPY" = x; then
42217    OBJCOPY=""
42218  else
42219    case $cross_compiling:$ac_tool_warned in
42220yes:)
42221{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42222$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42223ac_tool_warned=yes ;;
42224esac
42225    OBJCOPY=$ac_ct_OBJCOPY
42226  fi
42227fi
42228
42229    else
42230      # If it succeeded, then it was overridden by the user. We will use it
42231      # for the tool.
42232
42233      # First remove it from the list of overridden variables, so we can test
42234      # for unknown variables in the end.
42235      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42236
42237      # Check if we try to supply an empty value
42238      if test "x$OBJCOPY" = x; then
42239        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
42240$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
42241        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42242$as_echo_n "checking for OBJCOPY... " >&6; }
42243        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42244$as_echo "disabled" >&6; }
42245      else
42246        # Check if the provided tool contains a complete path.
42247        tool_specified="$OBJCOPY"
42248        tool_basename="${tool_specified##*/}"
42249        if test "x$tool_basename" = "x$tool_specified"; then
42250          # A command without a complete path is provided, search $PATH.
42251          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
42252$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
42253          # Extract the first word of "$tool_basename", so it can be a program name with args.
42254set dummy $tool_basename; ac_word=$2
42255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42256$as_echo_n "checking for $ac_word... " >&6; }
42257if ${ac_cv_path_OBJCOPY+:} false; then :
42258  $as_echo_n "(cached) " >&6
42259else
42260  case $OBJCOPY in
42261  [\\/]* | ?:[\\/]*)
42262  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
42263  ;;
42264  *)
42265  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42266for as_dir in $PATH
42267do
42268  IFS=$as_save_IFS
42269  test -z "$as_dir" && as_dir=.
42270    for ac_exec_ext in '' $ac_executable_extensions; do
42271  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42272    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
42273    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42274    break 2
42275  fi
42276done
42277  done
42278IFS=$as_save_IFS
42279
42280  ;;
42281esac
42282fi
42283OBJCOPY=$ac_cv_path_OBJCOPY
42284if test -n "$OBJCOPY"; then
42285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42286$as_echo "$OBJCOPY" >&6; }
42287else
42288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42289$as_echo "no" >&6; }
42290fi
42291
42292
42293          if test "x$OBJCOPY" = x; then
42294            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42295          fi
42296        else
42297          # Otherwise we believe it is a complete path. Use it as it is.
42298          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
42299$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
42300          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42301$as_echo_n "checking for OBJCOPY... " >&6; }
42302          if test ! -x "$tool_specified"; then
42303            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42304$as_echo "not found" >&6; }
42305            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
42306          fi
42307          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42308$as_echo "$tool_specified" >&6; }
42309        fi
42310      fi
42311    fi
42312
42313  fi
42314
42315
42316    # Only call fixup if objcopy was found.
42317    if test -n "$OBJCOPY"; then
42318
42319  # Only process if variable expands to non-empty
42320
42321  if test "x$OBJCOPY" != x; then
42322    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42323
42324  # First separate the path from the arguments. This will split at the first
42325  # space.
42326  complete="$OBJCOPY"
42327  path="${complete%% *}"
42328  tmp="$complete EOL"
42329  arguments="${tmp#* }"
42330
42331  # Input might be given as Windows format, start by converting to
42332  # unix format.
42333  new_path=`$CYGPATH -u "$path"`
42334
42335  # Now try to locate executable using which
42336  new_path=`$WHICH "$new_path" 2> /dev/null`
42337  # bat and cmd files are not always considered executable in cygwin causing which
42338  # to not find them
42339  if test "x$new_path" = x \
42340      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42341      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42342    new_path=`$CYGPATH -u "$path"`
42343  fi
42344  if test "x$new_path" = x; then
42345    # Oops. Which didn't find the executable.
42346    # The splitting of arguments from the executable at a space might have been incorrect,
42347    # since paths with space are more likely in Windows. Give it another try with the whole
42348    # argument.
42349    path="$complete"
42350    arguments="EOL"
42351    new_path=`$CYGPATH -u "$path"`
42352    new_path=`$WHICH "$new_path" 2> /dev/null`
42353    # bat and cmd files are not always considered executable in cygwin causing which
42354    # to not find them
42355    if test "x$new_path" = x \
42356        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42357        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42358      new_path=`$CYGPATH -u "$path"`
42359    fi
42360    if test "x$new_path" = x; then
42361      # It's still not found. Now this is an unrecoverable error.
42362      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42363$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42364      has_space=`$ECHO "$complete" | $GREP " "`
42365      if test "x$has_space" != x; then
42366        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42367$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42368      fi
42369      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42370    fi
42371  fi
42372
42373  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42374  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42375  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42376  # "foo.exe" is OK but "foo" is an error.
42377  #
42378  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42379  # It is also a way to make sure we got the proper file name for the real test later on.
42380  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42381  if test "x$test_shortpath" = x; then
42382    # Short path failed, file does not exist as specified.
42383    # Try adding .exe or .cmd
42384    if test -f "${new_path}.exe"; then
42385      input_to_shortpath="${new_path}.exe"
42386    elif test -f "${new_path}.cmd"; then
42387      input_to_shortpath="${new_path}.cmd"
42388    else
42389      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
42390$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
42391      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42392$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42393      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42394    fi
42395  else
42396    input_to_shortpath="$new_path"
42397  fi
42398
42399  # Call helper function which possibly converts this using DOS-style short mode.
42400  # If so, the updated path is stored in $new_path.
42401  new_path="$input_to_shortpath"
42402
42403  input_path="$input_to_shortpath"
42404  # Check if we need to convert this using DOS-style short mode. If the path
42405  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42406  # take no chances and rewrite it.
42407  # Note: m4 eats our [], so we need to use [ and ] instead.
42408  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42409  if test "x$has_forbidden_chars" != x; then
42410    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42411    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42412    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42413    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42414      # Going to short mode and back again did indeed matter. Since short mode is
42415      # case insensitive, let's make it lowercase to improve readability.
42416      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42417      # Now convert it back to Unix-style (cygpath)
42418      input_path=`$CYGPATH -u "$shortmode_path"`
42419      new_path="$input_path"
42420    fi
42421  fi
42422
42423  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42424  if test "x$test_cygdrive_prefix" = x; then
42425    # As a simple fix, exclude /usr/bin since it's not a real path.
42426    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42427      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42428      # a path prefixed by /cygdrive for fixpath to work.
42429      new_path="$CYGWIN_ROOT_PATH$input_path"
42430    fi
42431  fi
42432
42433  # remove trailing .exe if any
42434  new_path="${new_path/%.exe/}"
42435
42436    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42437
42438  # First separate the path from the arguments. This will split at the first
42439  # space.
42440  complete="$OBJCOPY"
42441  path="${complete%% *}"
42442  tmp="$complete EOL"
42443  arguments="${tmp#* }"
42444
42445  # Input might be given as Windows format, start by converting to
42446  # unix format.
42447  new_path="$path"
42448
42449  windows_path="$new_path"
42450  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42451    unix_path=`$CYGPATH -u "$windows_path"`
42452    new_path="$unix_path"
42453  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42454    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42455    new_path="$unix_path"
42456  fi
42457
42458
42459  # Now try to locate executable using which
42460  new_path=`$WHICH "$new_path" 2> /dev/null`
42461
42462  if test "x$new_path" = x; then
42463    # Oops. Which didn't find the executable.
42464    # The splitting of arguments from the executable at a space might have been incorrect,
42465    # since paths with space are more likely in Windows. Give it another try with the whole
42466    # argument.
42467    path="$complete"
42468    arguments="EOL"
42469    new_path="$path"
42470
42471  windows_path="$new_path"
42472  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42473    unix_path=`$CYGPATH -u "$windows_path"`
42474    new_path="$unix_path"
42475  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42476    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42477    new_path="$unix_path"
42478  fi
42479
42480
42481    new_path=`$WHICH "$new_path" 2> /dev/null`
42482    # bat and cmd files are not always considered executable in MSYS causing which
42483    # to not find them
42484    if test "x$new_path" = x \
42485        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42486        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42487      new_path="$path"
42488
42489  windows_path="$new_path"
42490  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42491    unix_path=`$CYGPATH -u "$windows_path"`
42492    new_path="$unix_path"
42493  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42494    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42495    new_path="$unix_path"
42496  fi
42497
42498    fi
42499
42500    if test "x$new_path" = x; then
42501      # It's still not found. Now this is an unrecoverable error.
42502      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42503$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42504      has_space=`$ECHO "$complete" | $GREP " "`
42505      if test "x$has_space" != x; then
42506        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42507$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42508      fi
42509      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42510    fi
42511  fi
42512
42513  # Now new_path has a complete unix path to the binary
42514  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42515    # Keep paths in /bin as-is, but remove trailing .exe if any
42516    new_path="${new_path/%.exe/}"
42517    # Do not save /bin paths to all_fixpath_prefixes!
42518  else
42519    # Not in mixed or Windows style, start by that.
42520    new_path=`cmd //c echo $new_path`
42521
42522  input_path="$new_path"
42523  # Check if we need to convert this using DOS-style short mode. If the path
42524  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42525  # take no chances and rewrite it.
42526  # Note: m4 eats our [], so we need to use [ and ] instead.
42527  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42528  if test "x$has_forbidden_chars" != x; then
42529    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42530    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42531  fi
42532
42533    # Output is in $new_path
42534
42535  windows_path="$new_path"
42536  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42537    unix_path=`$CYGPATH -u "$windows_path"`
42538    new_path="$unix_path"
42539  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42540    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42541    new_path="$unix_path"
42542  fi
42543
42544    # remove trailing .exe if any
42545    new_path="${new_path/%.exe/}"
42546
42547    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42548    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42549  fi
42550
42551    else
42552      # We're on a unix platform. Hooray! :)
42553      # First separate the path from the arguments. This will split at the first
42554      # space.
42555      complete="$OBJCOPY"
42556      path="${complete%% *}"
42557      tmp="$complete EOL"
42558      arguments="${tmp#* }"
42559
42560      # Cannot rely on the command "which" here since it doesn't always work.
42561      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42562      if test -z "$is_absolute_path"; then
42563        # Path to executable is not absolute. Find it.
42564        IFS_save="$IFS"
42565        IFS=:
42566        for p in $PATH; do
42567          if test -f "$p/$path" && test -x "$p/$path"; then
42568            new_path="$p/$path"
42569            break
42570          fi
42571        done
42572        IFS="$IFS_save"
42573      else
42574        # This is an absolute path, we can use it without further modifications.
42575        new_path="$path"
42576      fi
42577
42578      if test "x$new_path" = x; then
42579        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42580$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42581        has_space=`$ECHO "$complete" | $GREP " "`
42582        if test "x$has_space" != x; then
42583          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42584$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42585        fi
42586        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42587      fi
42588    fi
42589
42590    # Now join together the path and the arguments once again
42591    if test "x$arguments" != xEOL; then
42592      new_complete="$new_path ${arguments% *}"
42593    else
42594      new_complete="$new_path"
42595    fi
42596
42597    if test "x$complete" != "x$new_complete"; then
42598      OBJCOPY="$new_complete"
42599      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
42600$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
42601    fi
42602  fi
42603
42604      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
42605        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
42606        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
42607        # - version number is last blank separate word on first line
42608        # - version number formats that have been seen:
42609        #   - <major>.<minor>
42610        #   - <major>.<minor>.<micro>
42611        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
42612        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
42613         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
42614              -e 's/.* //' \
42615              -e '/^[01]\./b bad' \
42616              -e '/^2\./{' \
42617              -e '  s/^2\.//' \
42618              -e '  /^[0-9]$/b bad' \
42619              -e '  /^[0-9]\./b bad' \
42620              -e '  /^1[0-9]$/b bad' \
42621              -e '  /^1[0-9]\./b bad' \
42622              -e '  /^20\./b bad' \
42623              -e '  /^21\.0$/b bad' \
42624              -e '  /^21\.0\./b bad' \
42625              -e '}' \
42626              -e ':good' \
42627              -e 's/.*/VALID_VERSION/p' \
42628              -e 'q' \
42629              -e ':bad' \
42630              -e 's/.*/BAD_VERSION/p' \
42631              -e 'q'`
42632        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
42633          OBJCOPY=
42634          { $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
42635$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
42636          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
42637$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
42638          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
42639$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
42640          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
42641$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
42642          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
42643$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
42644        fi
42645      fi
42646    fi
42647  fi
42648
42649
42650
42651  # Publish this variable in the help.
42652
42653
42654  if [ -z "${OBJDUMP+x}" ]; then
42655    # The variable is not set by user, try to locate tool using the code snippet
42656    if test -n "$ac_tool_prefix"; then
42657  for ac_prog in gobjdump objdump
42658  do
42659    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42660set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42662$as_echo_n "checking for $ac_word... " >&6; }
42663if ${ac_cv_prog_OBJDUMP+:} false; then :
42664  $as_echo_n "(cached) " >&6
42665else
42666  if test -n "$OBJDUMP"; then
42667  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
42668else
42669as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42670for as_dir in $PATH
42671do
42672  IFS=$as_save_IFS
42673  test -z "$as_dir" && as_dir=.
42674    for ac_exec_ext in '' $ac_executable_extensions; do
42675  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42676    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
42677    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42678    break 2
42679  fi
42680done
42681  done
42682IFS=$as_save_IFS
42683
42684fi
42685fi
42686OBJDUMP=$ac_cv_prog_OBJDUMP
42687if test -n "$OBJDUMP"; then
42688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42689$as_echo "$OBJDUMP" >&6; }
42690else
42691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42692$as_echo "no" >&6; }
42693fi
42694
42695
42696    test -n "$OBJDUMP" && break
42697  done
42698fi
42699if test -z "$OBJDUMP"; then
42700  ac_ct_OBJDUMP=$OBJDUMP
42701  for ac_prog in gobjdump objdump
42702do
42703  # Extract the first word of "$ac_prog", so it can be a program name with args.
42704set dummy $ac_prog; ac_word=$2
42705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42706$as_echo_n "checking for $ac_word... " >&6; }
42707if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
42708  $as_echo_n "(cached) " >&6
42709else
42710  if test -n "$ac_ct_OBJDUMP"; then
42711  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
42712else
42713as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42714for as_dir in $PATH
42715do
42716  IFS=$as_save_IFS
42717  test -z "$as_dir" && as_dir=.
42718    for ac_exec_ext in '' $ac_executable_extensions; do
42719  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42720    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
42721    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42722    break 2
42723  fi
42724done
42725  done
42726IFS=$as_save_IFS
42727
42728fi
42729fi
42730ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
42731if test -n "$ac_ct_OBJDUMP"; then
42732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
42733$as_echo "$ac_ct_OBJDUMP" >&6; }
42734else
42735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42736$as_echo "no" >&6; }
42737fi
42738
42739
42740  test -n "$ac_ct_OBJDUMP" && break
42741done
42742
42743  if test "x$ac_ct_OBJDUMP" = x; then
42744    OBJDUMP=""
42745  else
42746    case $cross_compiling:$ac_tool_warned in
42747yes:)
42748{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42749$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42750ac_tool_warned=yes ;;
42751esac
42752    OBJDUMP=$ac_ct_OBJDUMP
42753  fi
42754fi
42755
42756  else
42757    # The variable is set, but is it from the command line or the environment?
42758
42759    # Try to remove the string !OBJDUMP! from our list.
42760    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
42761    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42762      # If it failed, the variable was not from the command line. Ignore it,
42763      # but warn the user (except for BASH, which is always set by the calling BASH).
42764      if test "xOBJDUMP" != xBASH; then
42765        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
42766$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
42767      fi
42768      # Try to locate tool using the code snippet
42769      if test -n "$ac_tool_prefix"; then
42770  for ac_prog in gobjdump objdump
42771  do
42772    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42773set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42775$as_echo_n "checking for $ac_word... " >&6; }
42776if ${ac_cv_prog_OBJDUMP+:} false; then :
42777  $as_echo_n "(cached) " >&6
42778else
42779  if test -n "$OBJDUMP"; then
42780  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
42781else
42782as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42783for as_dir in $PATH
42784do
42785  IFS=$as_save_IFS
42786  test -z "$as_dir" && as_dir=.
42787    for ac_exec_ext in '' $ac_executable_extensions; do
42788  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42789    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
42790    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42791    break 2
42792  fi
42793done
42794  done
42795IFS=$as_save_IFS
42796
42797fi
42798fi
42799OBJDUMP=$ac_cv_prog_OBJDUMP
42800if test -n "$OBJDUMP"; then
42801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42802$as_echo "$OBJDUMP" >&6; }
42803else
42804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42805$as_echo "no" >&6; }
42806fi
42807
42808
42809    test -n "$OBJDUMP" && break
42810  done
42811fi
42812if test -z "$OBJDUMP"; then
42813  ac_ct_OBJDUMP=$OBJDUMP
42814  for ac_prog in gobjdump objdump
42815do
42816  # Extract the first word of "$ac_prog", so it can be a program name with args.
42817set dummy $ac_prog; ac_word=$2
42818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42819$as_echo_n "checking for $ac_word... " >&6; }
42820if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
42821  $as_echo_n "(cached) " >&6
42822else
42823  if test -n "$ac_ct_OBJDUMP"; then
42824  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
42825else
42826as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42827for as_dir in $PATH
42828do
42829  IFS=$as_save_IFS
42830  test -z "$as_dir" && as_dir=.
42831    for ac_exec_ext in '' $ac_executable_extensions; do
42832  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42833    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
42834    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42835    break 2
42836  fi
42837done
42838  done
42839IFS=$as_save_IFS
42840
42841fi
42842fi
42843ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
42844if test -n "$ac_ct_OBJDUMP"; then
42845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
42846$as_echo "$ac_ct_OBJDUMP" >&6; }
42847else
42848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42849$as_echo "no" >&6; }
42850fi
42851
42852
42853  test -n "$ac_ct_OBJDUMP" && break
42854done
42855
42856  if test "x$ac_ct_OBJDUMP" = x; then
42857    OBJDUMP=""
42858  else
42859    case $cross_compiling:$ac_tool_warned in
42860yes:)
42861{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42862$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42863ac_tool_warned=yes ;;
42864esac
42865    OBJDUMP=$ac_ct_OBJDUMP
42866  fi
42867fi
42868
42869    else
42870      # If it succeeded, then it was overridden by the user. We will use it
42871      # for the tool.
42872
42873      # First remove it from the list of overridden variables, so we can test
42874      # for unknown variables in the end.
42875      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42876
42877      # Check if we try to supply an empty value
42878      if test "x$OBJDUMP" = x; then
42879        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
42880$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
42881        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
42882$as_echo_n "checking for OBJDUMP... " >&6; }
42883        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42884$as_echo "disabled" >&6; }
42885      else
42886        # Check if the provided tool contains a complete path.
42887        tool_specified="$OBJDUMP"
42888        tool_basename="${tool_specified##*/}"
42889        if test "x$tool_basename" = "x$tool_specified"; then
42890          # A command without a complete path is provided, search $PATH.
42891          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
42892$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
42893          # Extract the first word of "$tool_basename", so it can be a program name with args.
42894set dummy $tool_basename; ac_word=$2
42895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42896$as_echo_n "checking for $ac_word... " >&6; }
42897if ${ac_cv_path_OBJDUMP+:} false; then :
42898  $as_echo_n "(cached) " >&6
42899else
42900  case $OBJDUMP in
42901  [\\/]* | ?:[\\/]*)
42902  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
42903  ;;
42904  *)
42905  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42906for as_dir in $PATH
42907do
42908  IFS=$as_save_IFS
42909  test -z "$as_dir" && as_dir=.
42910    for ac_exec_ext in '' $ac_executable_extensions; do
42911  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42912    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
42913    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42914    break 2
42915  fi
42916done
42917  done
42918IFS=$as_save_IFS
42919
42920  ;;
42921esac
42922fi
42923OBJDUMP=$ac_cv_path_OBJDUMP
42924if test -n "$OBJDUMP"; then
42925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42926$as_echo "$OBJDUMP" >&6; }
42927else
42928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42929$as_echo "no" >&6; }
42930fi
42931
42932
42933          if test "x$OBJDUMP" = x; then
42934            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42935          fi
42936        else
42937          # Otherwise we believe it is a complete path. Use it as it is.
42938          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
42939$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
42940          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
42941$as_echo_n "checking for OBJDUMP... " >&6; }
42942          if test ! -x "$tool_specified"; then
42943            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42944$as_echo "not found" >&6; }
42945            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
42946          fi
42947          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42948$as_echo "$tool_specified" >&6; }
42949        fi
42950      fi
42951    fi
42952
42953  fi
42954
42955
42956  if test "x$OBJDUMP" != x; then
42957    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
42958    # bails if argument is missing.
42959
42960  # Only process if variable expands to non-empty
42961
42962  if test "x$OBJDUMP" != x; then
42963    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42964
42965  # First separate the path from the arguments. This will split at the first
42966  # space.
42967  complete="$OBJDUMP"
42968  path="${complete%% *}"
42969  tmp="$complete EOL"
42970  arguments="${tmp#* }"
42971
42972  # Input might be given as Windows format, start by converting to
42973  # unix format.
42974  new_path=`$CYGPATH -u "$path"`
42975
42976  # Now try to locate executable using which
42977  new_path=`$WHICH "$new_path" 2> /dev/null`
42978  # bat and cmd files are not always considered executable in cygwin causing which
42979  # to not find them
42980  if test "x$new_path" = x \
42981      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42982      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42983    new_path=`$CYGPATH -u "$path"`
42984  fi
42985  if test "x$new_path" = x; then
42986    # Oops. Which didn't find the executable.
42987    # The splitting of arguments from the executable at a space might have been incorrect,
42988    # since paths with space are more likely in Windows. Give it another try with the whole
42989    # argument.
42990    path="$complete"
42991    arguments="EOL"
42992    new_path=`$CYGPATH -u "$path"`
42993    new_path=`$WHICH "$new_path" 2> /dev/null`
42994    # bat and cmd files are not always considered executable in cygwin causing which
42995    # to not find them
42996    if test "x$new_path" = x \
42997        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42998        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42999      new_path=`$CYGPATH -u "$path"`
43000    fi
43001    if test "x$new_path" = x; then
43002      # It's still not found. Now this is an unrecoverable error.
43003      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43004$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43005      has_space=`$ECHO "$complete" | $GREP " "`
43006      if test "x$has_space" != x; then
43007        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43008$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43009      fi
43010      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43011    fi
43012  fi
43013
43014  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43015  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43016  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43017  # "foo.exe" is OK but "foo" is an error.
43018  #
43019  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43020  # It is also a way to make sure we got the proper file name for the real test later on.
43021  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43022  if test "x$test_shortpath" = x; then
43023    # Short path failed, file does not exist as specified.
43024    # Try adding .exe or .cmd
43025    if test -f "${new_path}.exe"; then
43026      input_to_shortpath="${new_path}.exe"
43027    elif test -f "${new_path}.cmd"; then
43028      input_to_shortpath="${new_path}.cmd"
43029    else
43030      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
43031$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
43032      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43033$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43034      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43035    fi
43036  else
43037    input_to_shortpath="$new_path"
43038  fi
43039
43040  # Call helper function which possibly converts this using DOS-style short mode.
43041  # If so, the updated path is stored in $new_path.
43042  new_path="$input_to_shortpath"
43043
43044  input_path="$input_to_shortpath"
43045  # Check if we need to convert this using DOS-style short mode. If the path
43046  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43047  # take no chances and rewrite it.
43048  # Note: m4 eats our [], so we need to use [ and ] instead.
43049  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43050  if test "x$has_forbidden_chars" != x; then
43051    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43052    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43053    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43054    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43055      # Going to short mode and back again did indeed matter. Since short mode is
43056      # case insensitive, let's make it lowercase to improve readability.
43057      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43058      # Now convert it back to Unix-style (cygpath)
43059      input_path=`$CYGPATH -u "$shortmode_path"`
43060      new_path="$input_path"
43061    fi
43062  fi
43063
43064  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43065  if test "x$test_cygdrive_prefix" = x; then
43066    # As a simple fix, exclude /usr/bin since it's not a real path.
43067    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43068      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43069      # a path prefixed by /cygdrive for fixpath to work.
43070      new_path="$CYGWIN_ROOT_PATH$input_path"
43071    fi
43072  fi
43073
43074  # remove trailing .exe if any
43075  new_path="${new_path/%.exe/}"
43076
43077    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43078
43079  # First separate the path from the arguments. This will split at the first
43080  # space.
43081  complete="$OBJDUMP"
43082  path="${complete%% *}"
43083  tmp="$complete EOL"
43084  arguments="${tmp#* }"
43085
43086  # Input might be given as Windows format, start by converting to
43087  # unix format.
43088  new_path="$path"
43089
43090  windows_path="$new_path"
43091  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43092    unix_path=`$CYGPATH -u "$windows_path"`
43093    new_path="$unix_path"
43094  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43095    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43096    new_path="$unix_path"
43097  fi
43098
43099
43100  # Now try to locate executable using which
43101  new_path=`$WHICH "$new_path" 2> /dev/null`
43102
43103  if test "x$new_path" = x; then
43104    # Oops. Which didn't find the executable.
43105    # The splitting of arguments from the executable at a space might have been incorrect,
43106    # since paths with space are more likely in Windows. Give it another try with the whole
43107    # argument.
43108    path="$complete"
43109    arguments="EOL"
43110    new_path="$path"
43111
43112  windows_path="$new_path"
43113  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43114    unix_path=`$CYGPATH -u "$windows_path"`
43115    new_path="$unix_path"
43116  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43117    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43118    new_path="$unix_path"
43119  fi
43120
43121
43122    new_path=`$WHICH "$new_path" 2> /dev/null`
43123    # bat and cmd files are not always considered executable in MSYS causing which
43124    # to not find them
43125    if test "x$new_path" = x \
43126        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43127        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43128      new_path="$path"
43129
43130  windows_path="$new_path"
43131  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43132    unix_path=`$CYGPATH -u "$windows_path"`
43133    new_path="$unix_path"
43134  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43135    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43136    new_path="$unix_path"
43137  fi
43138
43139    fi
43140
43141    if test "x$new_path" = x; then
43142      # It's still not found. Now this is an unrecoverable error.
43143      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43144$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43145      has_space=`$ECHO "$complete" | $GREP " "`
43146      if test "x$has_space" != x; then
43147        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43148$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43149      fi
43150      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43151    fi
43152  fi
43153
43154  # Now new_path has a complete unix path to the binary
43155  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43156    # Keep paths in /bin as-is, but remove trailing .exe if any
43157    new_path="${new_path/%.exe/}"
43158    # Do not save /bin paths to all_fixpath_prefixes!
43159  else
43160    # Not in mixed or Windows style, start by that.
43161    new_path=`cmd //c echo $new_path`
43162
43163  input_path="$new_path"
43164  # Check if we need to convert this using DOS-style short mode. If the path
43165  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43166  # take no chances and rewrite it.
43167  # Note: m4 eats our [], so we need to use [ and ] instead.
43168  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43169  if test "x$has_forbidden_chars" != x; then
43170    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43171    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43172  fi
43173
43174    # Output is in $new_path
43175
43176  windows_path="$new_path"
43177  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43178    unix_path=`$CYGPATH -u "$windows_path"`
43179    new_path="$unix_path"
43180  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43181    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43182    new_path="$unix_path"
43183  fi
43184
43185    # remove trailing .exe if any
43186    new_path="${new_path/%.exe/}"
43187
43188    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43189    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43190  fi
43191
43192    else
43193      # We're on a unix platform. Hooray! :)
43194      # First separate the path from the arguments. This will split at the first
43195      # space.
43196      complete="$OBJDUMP"
43197      path="${complete%% *}"
43198      tmp="$complete EOL"
43199      arguments="${tmp#* }"
43200
43201      # Cannot rely on the command "which" here since it doesn't always work.
43202      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43203      if test -z "$is_absolute_path"; then
43204        # Path to executable is not absolute. Find it.
43205        IFS_save="$IFS"
43206        IFS=:
43207        for p in $PATH; do
43208          if test -f "$p/$path" && test -x "$p/$path"; then
43209            new_path="$p/$path"
43210            break
43211          fi
43212        done
43213        IFS="$IFS_save"
43214      else
43215        # This is an absolute path, we can use it without further modifications.
43216        new_path="$path"
43217      fi
43218
43219      if test "x$new_path" = x; then
43220        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43221$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43222        has_space=`$ECHO "$complete" | $GREP " "`
43223        if test "x$has_space" != x; then
43224          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43225$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43226        fi
43227        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43228      fi
43229    fi
43230
43231    # Now join together the path and the arguments once again
43232    if test "x$arguments" != xEOL; then
43233      new_complete="$new_path ${arguments% *}"
43234    else
43235      new_complete="$new_path"
43236    fi
43237
43238    if test "x$complete" != "x$new_complete"; then
43239      OBJDUMP="$new_complete"
43240      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
43241$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
43242    fi
43243  fi
43244
43245  fi
43246
43247
43248  # Restore old path.
43249  PATH="$OLD_PATH"
43250
43251  # Restore the flags to the user specified values.
43252  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
43253  CFLAGS="$ORG_CFLAGS"
43254  CXXFLAGS="$ORG_CXXFLAGS"
43255
43256
43257# Finally do some processing after the detection phase
43258
43259  if test "x$COMPILE_TYPE" = "xcross"; then
43260    # Now we need to find a C/C++ compiler that can build executables for the
43261    # build platform. We can't use the AC_PROG_CC macro, since it can only be
43262    # used once. Also, we need to do this without adding a tools dir to the
43263    # path, otherwise we might pick up cross-compilers which don't use standard
43264    # naming.
43265
43266    OLDPATH="$PATH"
43267
43268
43269# Check whether --with-build-devkit was given.
43270if test "${with_build_devkit+set}" = set; then :
43271  withval=$with_build_devkit;
43272fi
43273
43274    if test "x$with_build_devkit" = "xyes"; then
43275      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
43276    elif test -n "$with_build_devkit"; then
43277      if test ! -d "$with_build_devkit"; then
43278        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
43279      else
43280
43281  # Only process if variable expands to non-empty
43282
43283  if test "x$with_build_devkit" != x; then
43284    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43285
43286  # Input might be given as Windows format, start by converting to
43287  # unix format.
43288  path="$with_build_devkit"
43289  new_path=`$CYGPATH -u "$path"`
43290
43291  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43292  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43293  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43294  # "foo.exe" is OK but "foo" is an error.
43295  #
43296  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43297  # It is also a way to make sure we got the proper file name for the real test later on.
43298  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43299  if test "x$test_shortpath" = x; then
43300    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43301$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43302    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
43303  fi
43304
43305  # Call helper function which possibly converts this using DOS-style short mode.
43306  # If so, the updated path is stored in $new_path.
43307
43308  input_path="$new_path"
43309  # Check if we need to convert this using DOS-style short mode. If the path
43310  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43311  # take no chances and rewrite it.
43312  # Note: m4 eats our [], so we need to use [ and ] instead.
43313  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43314  if test "x$has_forbidden_chars" != x; then
43315    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43316    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43317    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43318    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43319      # Going to short mode and back again did indeed matter. Since short mode is
43320      # case insensitive, let's make it lowercase to improve readability.
43321      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43322      # Now convert it back to Unix-style (cygpath)
43323      input_path=`$CYGPATH -u "$shortmode_path"`
43324      new_path="$input_path"
43325    fi
43326  fi
43327
43328  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43329  if test "x$test_cygdrive_prefix" = x; then
43330    # As a simple fix, exclude /usr/bin since it's not a real path.
43331    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43332      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43333      # a path prefixed by /cygdrive for fixpath to work.
43334      new_path="$CYGWIN_ROOT_PATH$input_path"
43335    fi
43336  fi
43337
43338
43339  if test "x$path" != "x$new_path"; then
43340    with_build_devkit="$new_path"
43341    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43342$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43343  fi
43344
43345    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43346
43347  path="$with_build_devkit"
43348  has_colon=`$ECHO $path | $GREP ^.:`
43349  new_path="$path"
43350  if test "x$has_colon" = x; then
43351    # Not in mixed or Windows style, start by that.
43352    new_path=`cmd //c echo $path`
43353  fi
43354
43355
43356  input_path="$new_path"
43357  # Check if we need to convert this using DOS-style short mode. If the path
43358  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43359  # take no chances and rewrite it.
43360  # Note: m4 eats our [], so we need to use [ and ] instead.
43361  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43362  if test "x$has_forbidden_chars" != x; then
43363    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43364    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43365  fi
43366
43367
43368  windows_path="$new_path"
43369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43370    unix_path=`$CYGPATH -u "$windows_path"`
43371    new_path="$unix_path"
43372  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43373    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43374    new_path="$unix_path"
43375  fi
43376
43377  if test "x$path" != "x$new_path"; then
43378    with_build_devkit="$new_path"
43379    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43380$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43381  fi
43382
43383  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43384  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43385
43386    else
43387      # We're on a unix platform. Hooray! :)
43388      path="$with_build_devkit"
43389      has_space=`$ECHO "$path" | $GREP " "`
43390      if test "x$has_space" != x; then
43391        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43392$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43393        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43394      fi
43395
43396      # Use eval to expand a potential ~
43397      eval path="$path"
43398      if test ! -f "$path" && test ! -d "$path"; then
43399        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
43400      fi
43401
43402      if test -d "$path"; then
43403        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
43404      else
43405        dir="`$DIRNAME "$path"`"
43406        base="`$BASENAME "$path"`"
43407        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
43408      fi
43409    fi
43410  fi
43411
43412        BUILD_DEVKIT_ROOT="$with_build_devkit"
43413        # Check for a meta data info file in the root of the devkit
43414        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
43415          # Process devkit.info so that existing devkit variables are not
43416          # modified by this
43417          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
43418              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
43419              -e "s/\$host/\$build/g" \
43420              $BUILD_DEVKIT_ROOT/devkit.info \
43421              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43422          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43423          # This potentially sets the following:
43424          # A descriptive name of the devkit
43425
43426  if test "x$BUILD_DEVKIT_NAME" = x; then
43427    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
43428  fi
43429
43430          # Corresponds to --with-extra-path
43431
43432  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
43433    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
43434  fi
43435
43436          # Corresponds to --with-toolchain-path
43437
43438  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43439    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
43440  fi
43441
43442          # Corresponds to --with-sysroot
43443
43444  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
43445    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
43446  fi
43447
43448          # Skip the Window specific parts
43449        fi
43450
43451        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
43452$as_echo_n "checking for build platform devkit... " >&6; }
43453        if test "x$BUILD_DEVKIT_NAME" != x; then
43454          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
43455$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
43456        else
43457          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
43458$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
43459        fi
43460
43461        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
43462
43463  if test "x$BUILD_SYSROOT" != "x"; then
43464    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43465      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43466        # Solaris Studio does not have a concept of sysroot. Instead we must
43467        # make sure the default include and lib dirs are appended to each
43468        # compile and link command line. Must also add -I-xbuiltin to enable
43469        # inlining of system functions and intrinsics.
43470        BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
43471        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
43472            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
43473            -L$BUILD_SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
43474      fi
43475    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
43476      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
43477      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
43478    elif test "x$TOOLCHAIN_TYPE" = xclang; then
43479      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
43480      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
43481    fi
43482    # Propagate the sysroot args to hotspot
43483    BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
43484    BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
43485    BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
43486    # The global CFLAGS and LDFLAGS variables need these for configure to function
43487    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
43488    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
43489    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
43490    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
43491  fi
43492
43493  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43494    # We also need -iframework<path>/System/Library/Frameworks
43495    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
43496    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
43497    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
43498    # set this here so it doesn't have to be peppered throughout the forest
43499    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
43500    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
43501  fi
43502
43503
43504
43505
43506
43507         # Fallback default of just /bin if DEVKIT_PATH is not defined
43508        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43509          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
43510        fi
43511        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
43512      fi
43513    fi
43514
43515    # FIXME: we should list the discovered compilers as an exclude pattern!
43516    # If we do that, we can do this detection before POST_DETECTION, and still
43517    # find the build compilers in the tools dir, if needed.
43518
43519
43520
43521  # Publish this variable in the help.
43522
43523
43524  if [ -z "${BUILD_CC+x}" ]; then
43525    # The variable is not set by user, try to locate tool using the code snippet
43526    for ac_prog in cl cc gcc
43527do
43528  # Extract the first word of "$ac_prog", so it can be a program name with args.
43529set dummy $ac_prog; ac_word=$2
43530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43531$as_echo_n "checking for $ac_word... " >&6; }
43532if ${ac_cv_path_BUILD_CC+:} false; then :
43533  $as_echo_n "(cached) " >&6
43534else
43535  case $BUILD_CC in
43536  [\\/]* | ?:[\\/]*)
43537  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
43538  ;;
43539  *)
43540  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43541for as_dir in $PATH
43542do
43543  IFS=$as_save_IFS
43544  test -z "$as_dir" && as_dir=.
43545    for ac_exec_ext in '' $ac_executable_extensions; do
43546  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43547    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
43548    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43549    break 2
43550  fi
43551done
43552  done
43553IFS=$as_save_IFS
43554
43555  ;;
43556esac
43557fi
43558BUILD_CC=$ac_cv_path_BUILD_CC
43559if test -n "$BUILD_CC"; then
43560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
43561$as_echo "$BUILD_CC" >&6; }
43562else
43563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43564$as_echo "no" >&6; }
43565fi
43566
43567
43568  test -n "$BUILD_CC" && break
43569done
43570
43571  else
43572    # The variable is set, but is it from the command line or the environment?
43573
43574    # Try to remove the string !BUILD_CC! from our list.
43575    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
43576    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43577      # If it failed, the variable was not from the command line. Ignore it,
43578      # but warn the user (except for BASH, which is always set by the calling BASH).
43579      if test "xBUILD_CC" != xBASH; then
43580        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
43581$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
43582      fi
43583      # Try to locate tool using the code snippet
43584      for ac_prog in cl cc gcc
43585do
43586  # Extract the first word of "$ac_prog", so it can be a program name with args.
43587set dummy $ac_prog; ac_word=$2
43588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43589$as_echo_n "checking for $ac_word... " >&6; }
43590if ${ac_cv_path_BUILD_CC+:} false; then :
43591  $as_echo_n "(cached) " >&6
43592else
43593  case $BUILD_CC in
43594  [\\/]* | ?:[\\/]*)
43595  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
43596  ;;
43597  *)
43598  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43599for as_dir in $PATH
43600do
43601  IFS=$as_save_IFS
43602  test -z "$as_dir" && as_dir=.
43603    for ac_exec_ext in '' $ac_executable_extensions; do
43604  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43605    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
43606    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43607    break 2
43608  fi
43609done
43610  done
43611IFS=$as_save_IFS
43612
43613  ;;
43614esac
43615fi
43616BUILD_CC=$ac_cv_path_BUILD_CC
43617if test -n "$BUILD_CC"; then
43618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
43619$as_echo "$BUILD_CC" >&6; }
43620else
43621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43622$as_echo "no" >&6; }
43623fi
43624
43625
43626  test -n "$BUILD_CC" && break
43627done
43628
43629    else
43630      # If it succeeded, then it was overridden by the user. We will use it
43631      # for the tool.
43632
43633      # First remove it from the list of overridden variables, so we can test
43634      # for unknown variables in the end.
43635      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43636
43637      # Check if we try to supply an empty value
43638      if test "x$BUILD_CC" = x; then
43639        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
43640$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
43641        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
43642$as_echo_n "checking for BUILD_CC... " >&6; }
43643        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43644$as_echo "disabled" >&6; }
43645      else
43646        # Check if the provided tool contains a complete path.
43647        tool_specified="$BUILD_CC"
43648        tool_basename="${tool_specified##*/}"
43649        if test "x$tool_basename" = "x$tool_specified"; then
43650          # A command without a complete path is provided, search $PATH.
43651          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
43652$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
43653          # Extract the first word of "$tool_basename", so it can be a program name with args.
43654set dummy $tool_basename; ac_word=$2
43655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43656$as_echo_n "checking for $ac_word... " >&6; }
43657if ${ac_cv_path_BUILD_CC+:} false; then :
43658  $as_echo_n "(cached) " >&6
43659else
43660  case $BUILD_CC in
43661  [\\/]* | ?:[\\/]*)
43662  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
43663  ;;
43664  *)
43665  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43666for as_dir in $PATH
43667do
43668  IFS=$as_save_IFS
43669  test -z "$as_dir" && as_dir=.
43670    for ac_exec_ext in '' $ac_executable_extensions; do
43671  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43672    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
43673    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43674    break 2
43675  fi
43676done
43677  done
43678IFS=$as_save_IFS
43679
43680  ;;
43681esac
43682fi
43683BUILD_CC=$ac_cv_path_BUILD_CC
43684if test -n "$BUILD_CC"; then
43685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
43686$as_echo "$BUILD_CC" >&6; }
43687else
43688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43689$as_echo "no" >&6; }
43690fi
43691
43692
43693          if test "x$BUILD_CC" = x; then
43694            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43695          fi
43696        else
43697          # Otherwise we believe it is a complete path. Use it as it is.
43698          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
43699$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
43700          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
43701$as_echo_n "checking for BUILD_CC... " >&6; }
43702          if test ! -x "$tool_specified"; then
43703            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43704$as_echo "not found" >&6; }
43705            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
43706          fi
43707          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43708$as_echo "$tool_specified" >&6; }
43709        fi
43710      fi
43711    fi
43712
43713  fi
43714
43715
43716
43717  if test "x$BUILD_CC" = x; then
43718    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
43719  fi
43720
43721
43722
43723  # Only process if variable expands to non-empty
43724
43725  if test "x$BUILD_CC" != x; then
43726    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43727
43728  # First separate the path from the arguments. This will split at the first
43729  # space.
43730  complete="$BUILD_CC"
43731  path="${complete%% *}"
43732  tmp="$complete EOL"
43733  arguments="${tmp#* }"
43734
43735  # Input might be given as Windows format, start by converting to
43736  # unix format.
43737  new_path=`$CYGPATH -u "$path"`
43738
43739  # Now try to locate executable using which
43740  new_path=`$WHICH "$new_path" 2> /dev/null`
43741  # bat and cmd files are not always considered executable in cygwin causing which
43742  # to not find them
43743  if test "x$new_path" = x \
43744      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43745      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43746    new_path=`$CYGPATH -u "$path"`
43747  fi
43748  if test "x$new_path" = x; then
43749    # Oops. Which didn't find the executable.
43750    # The splitting of arguments from the executable at a space might have been incorrect,
43751    # since paths with space are more likely in Windows. Give it another try with the whole
43752    # argument.
43753    path="$complete"
43754    arguments="EOL"
43755    new_path=`$CYGPATH -u "$path"`
43756    new_path=`$WHICH "$new_path" 2> /dev/null`
43757    # bat and cmd files are not always considered executable in cygwin causing which
43758    # to not find them
43759    if test "x$new_path" = x \
43760        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43761        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43762      new_path=`$CYGPATH -u "$path"`
43763    fi
43764    if test "x$new_path" = x; then
43765      # It's still not found. Now this is an unrecoverable error.
43766      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43767$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43768      has_space=`$ECHO "$complete" | $GREP " "`
43769      if test "x$has_space" != x; then
43770        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43771$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43772      fi
43773      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43774    fi
43775  fi
43776
43777  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43778  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43779  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43780  # "foo.exe" is OK but "foo" is an error.
43781  #
43782  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43783  # It is also a way to make sure we got the proper file name for the real test later on.
43784  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43785  if test "x$test_shortpath" = x; then
43786    # Short path failed, file does not exist as specified.
43787    # Try adding .exe or .cmd
43788    if test -f "${new_path}.exe"; then
43789      input_to_shortpath="${new_path}.exe"
43790    elif test -f "${new_path}.cmd"; then
43791      input_to_shortpath="${new_path}.cmd"
43792    else
43793      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
43794$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
43795      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43796$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43797      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43798    fi
43799  else
43800    input_to_shortpath="$new_path"
43801  fi
43802
43803  # Call helper function which possibly converts this using DOS-style short mode.
43804  # If so, the updated path is stored in $new_path.
43805  new_path="$input_to_shortpath"
43806
43807  input_path="$input_to_shortpath"
43808  # Check if we need to convert this using DOS-style short mode. If the path
43809  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43810  # take no chances and rewrite it.
43811  # Note: m4 eats our [], so we need to use [ and ] instead.
43812  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43813  if test "x$has_forbidden_chars" != x; then
43814    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43815    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43816    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43817    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43818      # Going to short mode and back again did indeed matter. Since short mode is
43819      # case insensitive, let's make it lowercase to improve readability.
43820      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43821      # Now convert it back to Unix-style (cygpath)
43822      input_path=`$CYGPATH -u "$shortmode_path"`
43823      new_path="$input_path"
43824    fi
43825  fi
43826
43827  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43828  if test "x$test_cygdrive_prefix" = x; then
43829    # As a simple fix, exclude /usr/bin since it's not a real path.
43830    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43831      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43832      # a path prefixed by /cygdrive for fixpath to work.
43833      new_path="$CYGWIN_ROOT_PATH$input_path"
43834    fi
43835  fi
43836
43837  # remove trailing .exe if any
43838  new_path="${new_path/%.exe/}"
43839
43840    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43841
43842  # First separate the path from the arguments. This will split at the first
43843  # space.
43844  complete="$BUILD_CC"
43845  path="${complete%% *}"
43846  tmp="$complete EOL"
43847  arguments="${tmp#* }"
43848
43849  # Input might be given as Windows format, start by converting to
43850  # unix format.
43851  new_path="$path"
43852
43853  windows_path="$new_path"
43854  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43855    unix_path=`$CYGPATH -u "$windows_path"`
43856    new_path="$unix_path"
43857  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43858    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43859    new_path="$unix_path"
43860  fi
43861
43862
43863  # Now try to locate executable using which
43864  new_path=`$WHICH "$new_path" 2> /dev/null`
43865
43866  if test "x$new_path" = x; then
43867    # Oops. Which didn't find the executable.
43868    # The splitting of arguments from the executable at a space might have been incorrect,
43869    # since paths with space are more likely in Windows. Give it another try with the whole
43870    # argument.
43871    path="$complete"
43872    arguments="EOL"
43873    new_path="$path"
43874
43875  windows_path="$new_path"
43876  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43877    unix_path=`$CYGPATH -u "$windows_path"`
43878    new_path="$unix_path"
43879  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43880    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43881    new_path="$unix_path"
43882  fi
43883
43884
43885    new_path=`$WHICH "$new_path" 2> /dev/null`
43886    # bat and cmd files are not always considered executable in MSYS causing which
43887    # to not find them
43888    if test "x$new_path" = x \
43889        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43890        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43891      new_path="$path"
43892
43893  windows_path="$new_path"
43894  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43895    unix_path=`$CYGPATH -u "$windows_path"`
43896    new_path="$unix_path"
43897  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43898    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43899    new_path="$unix_path"
43900  fi
43901
43902    fi
43903
43904    if test "x$new_path" = x; then
43905      # It's still not found. Now this is an unrecoverable error.
43906      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43907$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43908      has_space=`$ECHO "$complete" | $GREP " "`
43909      if test "x$has_space" != x; then
43910        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43911$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43912      fi
43913      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43914    fi
43915  fi
43916
43917  # Now new_path has a complete unix path to the binary
43918  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43919    # Keep paths in /bin as-is, but remove trailing .exe if any
43920    new_path="${new_path/%.exe/}"
43921    # Do not save /bin paths to all_fixpath_prefixes!
43922  else
43923    # Not in mixed or Windows style, start by that.
43924    new_path=`cmd //c echo $new_path`
43925
43926  input_path="$new_path"
43927  # Check if we need to convert this using DOS-style short mode. If the path
43928  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43929  # take no chances and rewrite it.
43930  # Note: m4 eats our [], so we need to use [ and ] instead.
43931  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43932  if test "x$has_forbidden_chars" != x; then
43933    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43934    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43935  fi
43936
43937    # Output is in $new_path
43938
43939  windows_path="$new_path"
43940  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43941    unix_path=`$CYGPATH -u "$windows_path"`
43942    new_path="$unix_path"
43943  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43944    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43945    new_path="$unix_path"
43946  fi
43947
43948    # remove trailing .exe if any
43949    new_path="${new_path/%.exe/}"
43950
43951    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43952    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43953  fi
43954
43955    else
43956      # We're on a unix platform. Hooray! :)
43957      # First separate the path from the arguments. This will split at the first
43958      # space.
43959      complete="$BUILD_CC"
43960      path="${complete%% *}"
43961      tmp="$complete EOL"
43962      arguments="${tmp#* }"
43963
43964      # Cannot rely on the command "which" here since it doesn't always work.
43965      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43966      if test -z "$is_absolute_path"; then
43967        # Path to executable is not absolute. Find it.
43968        IFS_save="$IFS"
43969        IFS=:
43970        for p in $PATH; do
43971          if test -f "$p/$path" && test -x "$p/$path"; then
43972            new_path="$p/$path"
43973            break
43974          fi
43975        done
43976        IFS="$IFS_save"
43977      else
43978        # This is an absolute path, we can use it without further modifications.
43979        new_path="$path"
43980      fi
43981
43982      if test "x$new_path" = x; then
43983        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43984$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43985        has_space=`$ECHO "$complete" | $GREP " "`
43986        if test "x$has_space" != x; then
43987          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43988$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43989        fi
43990        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43991      fi
43992    fi
43993
43994    # Now join together the path and the arguments once again
43995    if test "x$arguments" != xEOL; then
43996      new_complete="$new_path ${arguments% *}"
43997    else
43998      new_complete="$new_path"
43999    fi
44000
44001    if test "x$complete" != "x$new_complete"; then
44002      BUILD_CC="$new_complete"
44003      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
44004$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
44005    fi
44006  fi
44007
44008
44009
44010
44011  # Publish this variable in the help.
44012
44013
44014  if [ -z "${BUILD_CXX+x}" ]; then
44015    # The variable is not set by user, try to locate tool using the code snippet
44016    for ac_prog in cl CC g++
44017do
44018  # Extract the first word of "$ac_prog", so it can be a program name with args.
44019set dummy $ac_prog; ac_word=$2
44020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44021$as_echo_n "checking for $ac_word... " >&6; }
44022if ${ac_cv_path_BUILD_CXX+:} false; then :
44023  $as_echo_n "(cached) " >&6
44024else
44025  case $BUILD_CXX in
44026  [\\/]* | ?:[\\/]*)
44027  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44028  ;;
44029  *)
44030  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44031for as_dir in $PATH
44032do
44033  IFS=$as_save_IFS
44034  test -z "$as_dir" && as_dir=.
44035    for ac_exec_ext in '' $ac_executable_extensions; do
44036  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44037    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44038    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44039    break 2
44040  fi
44041done
44042  done
44043IFS=$as_save_IFS
44044
44045  ;;
44046esac
44047fi
44048BUILD_CXX=$ac_cv_path_BUILD_CXX
44049if test -n "$BUILD_CXX"; then
44050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44051$as_echo "$BUILD_CXX" >&6; }
44052else
44053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44054$as_echo "no" >&6; }
44055fi
44056
44057
44058  test -n "$BUILD_CXX" && break
44059done
44060
44061  else
44062    # The variable is set, but is it from the command line or the environment?
44063
44064    # Try to remove the string !BUILD_CXX! from our list.
44065    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
44066    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44067      # If it failed, the variable was not from the command line. Ignore it,
44068      # but warn the user (except for BASH, which is always set by the calling BASH).
44069      if test "xBUILD_CXX" != xBASH; then
44070        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
44071$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
44072      fi
44073      # Try to locate tool using the code snippet
44074      for ac_prog in cl CC g++
44075do
44076  # Extract the first word of "$ac_prog", so it can be a program name with args.
44077set dummy $ac_prog; ac_word=$2
44078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44079$as_echo_n "checking for $ac_word... " >&6; }
44080if ${ac_cv_path_BUILD_CXX+:} false; then :
44081  $as_echo_n "(cached) " >&6
44082else
44083  case $BUILD_CXX in
44084  [\\/]* | ?:[\\/]*)
44085  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44086  ;;
44087  *)
44088  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44089for as_dir in $PATH
44090do
44091  IFS=$as_save_IFS
44092  test -z "$as_dir" && as_dir=.
44093    for ac_exec_ext in '' $ac_executable_extensions; do
44094  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44095    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44096    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44097    break 2
44098  fi
44099done
44100  done
44101IFS=$as_save_IFS
44102
44103  ;;
44104esac
44105fi
44106BUILD_CXX=$ac_cv_path_BUILD_CXX
44107if test -n "$BUILD_CXX"; then
44108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44109$as_echo "$BUILD_CXX" >&6; }
44110else
44111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44112$as_echo "no" >&6; }
44113fi
44114
44115
44116  test -n "$BUILD_CXX" && break
44117done
44118
44119    else
44120      # If it succeeded, then it was overridden by the user. We will use it
44121      # for the tool.
44122
44123      # First remove it from the list of overridden variables, so we can test
44124      # for unknown variables in the end.
44125      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44126
44127      # Check if we try to supply an empty value
44128      if test "x$BUILD_CXX" = x; then
44129        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
44130$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
44131        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44132$as_echo_n "checking for BUILD_CXX... " >&6; }
44133        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44134$as_echo "disabled" >&6; }
44135      else
44136        # Check if the provided tool contains a complete path.
44137        tool_specified="$BUILD_CXX"
44138        tool_basename="${tool_specified##*/}"
44139        if test "x$tool_basename" = "x$tool_specified"; then
44140          # A command without a complete path is provided, search $PATH.
44141          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
44142$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
44143          # Extract the first word of "$tool_basename", so it can be a program name with args.
44144set dummy $tool_basename; ac_word=$2
44145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44146$as_echo_n "checking for $ac_word... " >&6; }
44147if ${ac_cv_path_BUILD_CXX+:} false; then :
44148  $as_echo_n "(cached) " >&6
44149else
44150  case $BUILD_CXX in
44151  [\\/]* | ?:[\\/]*)
44152  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44153  ;;
44154  *)
44155  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44156for as_dir in $PATH
44157do
44158  IFS=$as_save_IFS
44159  test -z "$as_dir" && as_dir=.
44160    for ac_exec_ext in '' $ac_executable_extensions; do
44161  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44162    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44163    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44164    break 2
44165  fi
44166done
44167  done
44168IFS=$as_save_IFS
44169
44170  ;;
44171esac
44172fi
44173BUILD_CXX=$ac_cv_path_BUILD_CXX
44174if test -n "$BUILD_CXX"; then
44175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44176$as_echo "$BUILD_CXX" >&6; }
44177else
44178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44179$as_echo "no" >&6; }
44180fi
44181
44182
44183          if test "x$BUILD_CXX" = x; then
44184            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44185          fi
44186        else
44187          # Otherwise we believe it is a complete path. Use it as it is.
44188          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
44189$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
44190          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44191$as_echo_n "checking for BUILD_CXX... " >&6; }
44192          if test ! -x "$tool_specified"; then
44193            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44194$as_echo "not found" >&6; }
44195            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
44196          fi
44197          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44198$as_echo "$tool_specified" >&6; }
44199        fi
44200      fi
44201    fi
44202
44203  fi
44204
44205
44206
44207  if test "x$BUILD_CXX" = x; then
44208    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
44209  fi
44210
44211
44212
44213  # Only process if variable expands to non-empty
44214
44215  if test "x$BUILD_CXX" != x; then
44216    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44217
44218  # First separate the path from the arguments. This will split at the first
44219  # space.
44220  complete="$BUILD_CXX"
44221  path="${complete%% *}"
44222  tmp="$complete EOL"
44223  arguments="${tmp#* }"
44224
44225  # Input might be given as Windows format, start by converting to
44226  # unix format.
44227  new_path=`$CYGPATH -u "$path"`
44228
44229  # Now try to locate executable using which
44230  new_path=`$WHICH "$new_path" 2> /dev/null`
44231  # bat and cmd files are not always considered executable in cygwin causing which
44232  # to not find them
44233  if test "x$new_path" = x \
44234      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44235      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44236    new_path=`$CYGPATH -u "$path"`
44237  fi
44238  if test "x$new_path" = x; then
44239    # Oops. Which didn't find the executable.
44240    # The splitting of arguments from the executable at a space might have been incorrect,
44241    # since paths with space are more likely in Windows. Give it another try with the whole
44242    # argument.
44243    path="$complete"
44244    arguments="EOL"
44245    new_path=`$CYGPATH -u "$path"`
44246    new_path=`$WHICH "$new_path" 2> /dev/null`
44247    # bat and cmd files are not always considered executable in cygwin causing which
44248    # to not find them
44249    if test "x$new_path" = x \
44250        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44251        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44252      new_path=`$CYGPATH -u "$path"`
44253    fi
44254    if test "x$new_path" = x; then
44255      # It's still not found. Now this is an unrecoverable error.
44256      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44257$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44258      has_space=`$ECHO "$complete" | $GREP " "`
44259      if test "x$has_space" != x; then
44260        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44261$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44262      fi
44263      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44264    fi
44265  fi
44266
44267  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44268  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44269  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44270  # "foo.exe" is OK but "foo" is an error.
44271  #
44272  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44273  # It is also a way to make sure we got the proper file name for the real test later on.
44274  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44275  if test "x$test_shortpath" = x; then
44276    # Short path failed, file does not exist as specified.
44277    # Try adding .exe or .cmd
44278    if test -f "${new_path}.exe"; then
44279      input_to_shortpath="${new_path}.exe"
44280    elif test -f "${new_path}.cmd"; then
44281      input_to_shortpath="${new_path}.cmd"
44282    else
44283      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
44284$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
44285      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44286$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44287      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44288    fi
44289  else
44290    input_to_shortpath="$new_path"
44291  fi
44292
44293  # Call helper function which possibly converts this using DOS-style short mode.
44294  # If so, the updated path is stored in $new_path.
44295  new_path="$input_to_shortpath"
44296
44297  input_path="$input_to_shortpath"
44298  # Check if we need to convert this using DOS-style short mode. If the path
44299  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44300  # take no chances and rewrite it.
44301  # Note: m4 eats our [], so we need to use [ and ] instead.
44302  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44303  if test "x$has_forbidden_chars" != x; then
44304    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44305    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44306    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44307    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44308      # Going to short mode and back again did indeed matter. Since short mode is
44309      # case insensitive, let's make it lowercase to improve readability.
44310      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44311      # Now convert it back to Unix-style (cygpath)
44312      input_path=`$CYGPATH -u "$shortmode_path"`
44313      new_path="$input_path"
44314    fi
44315  fi
44316
44317  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44318  if test "x$test_cygdrive_prefix" = x; then
44319    # As a simple fix, exclude /usr/bin since it's not a real path.
44320    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44321      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44322      # a path prefixed by /cygdrive for fixpath to work.
44323      new_path="$CYGWIN_ROOT_PATH$input_path"
44324    fi
44325  fi
44326
44327  # remove trailing .exe if any
44328  new_path="${new_path/%.exe/}"
44329
44330    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44331
44332  # First separate the path from the arguments. This will split at the first
44333  # space.
44334  complete="$BUILD_CXX"
44335  path="${complete%% *}"
44336  tmp="$complete EOL"
44337  arguments="${tmp#* }"
44338
44339  # Input might be given as Windows format, start by converting to
44340  # unix format.
44341  new_path="$path"
44342
44343  windows_path="$new_path"
44344  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44345    unix_path=`$CYGPATH -u "$windows_path"`
44346    new_path="$unix_path"
44347  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44348    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44349    new_path="$unix_path"
44350  fi
44351
44352
44353  # Now try to locate executable using which
44354  new_path=`$WHICH "$new_path" 2> /dev/null`
44355
44356  if test "x$new_path" = x; then
44357    # Oops. Which didn't find the executable.
44358    # The splitting of arguments from the executable at a space might have been incorrect,
44359    # since paths with space are more likely in Windows. Give it another try with the whole
44360    # argument.
44361    path="$complete"
44362    arguments="EOL"
44363    new_path="$path"
44364
44365  windows_path="$new_path"
44366  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44367    unix_path=`$CYGPATH -u "$windows_path"`
44368    new_path="$unix_path"
44369  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44370    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44371    new_path="$unix_path"
44372  fi
44373
44374
44375    new_path=`$WHICH "$new_path" 2> /dev/null`
44376    # bat and cmd files are not always considered executable in MSYS causing which
44377    # to not find them
44378    if test "x$new_path" = x \
44379        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44380        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44381      new_path="$path"
44382
44383  windows_path="$new_path"
44384  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44385    unix_path=`$CYGPATH -u "$windows_path"`
44386    new_path="$unix_path"
44387  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44388    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44389    new_path="$unix_path"
44390  fi
44391
44392    fi
44393
44394    if test "x$new_path" = x; then
44395      # It's still not found. Now this is an unrecoverable error.
44396      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44397$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44398      has_space=`$ECHO "$complete" | $GREP " "`
44399      if test "x$has_space" != x; then
44400        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44401$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44402      fi
44403      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44404    fi
44405  fi
44406
44407  # Now new_path has a complete unix path to the binary
44408  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44409    # Keep paths in /bin as-is, but remove trailing .exe if any
44410    new_path="${new_path/%.exe/}"
44411    # Do not save /bin paths to all_fixpath_prefixes!
44412  else
44413    # Not in mixed or Windows style, start by that.
44414    new_path=`cmd //c echo $new_path`
44415
44416  input_path="$new_path"
44417  # Check if we need to convert this using DOS-style short mode. If the path
44418  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44419  # take no chances and rewrite it.
44420  # Note: m4 eats our [], so we need to use [ and ] instead.
44421  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44422  if test "x$has_forbidden_chars" != x; then
44423    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44424    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44425  fi
44426
44427    # Output is in $new_path
44428
44429  windows_path="$new_path"
44430  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44431    unix_path=`$CYGPATH -u "$windows_path"`
44432    new_path="$unix_path"
44433  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44434    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44435    new_path="$unix_path"
44436  fi
44437
44438    # remove trailing .exe if any
44439    new_path="${new_path/%.exe/}"
44440
44441    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44442    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44443  fi
44444
44445    else
44446      # We're on a unix platform. Hooray! :)
44447      # First separate the path from the arguments. This will split at the first
44448      # space.
44449      complete="$BUILD_CXX"
44450      path="${complete%% *}"
44451      tmp="$complete EOL"
44452      arguments="${tmp#* }"
44453
44454      # Cannot rely on the command "which" here since it doesn't always work.
44455      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44456      if test -z "$is_absolute_path"; then
44457        # Path to executable is not absolute. Find it.
44458        IFS_save="$IFS"
44459        IFS=:
44460        for p in $PATH; do
44461          if test -f "$p/$path" && test -x "$p/$path"; then
44462            new_path="$p/$path"
44463            break
44464          fi
44465        done
44466        IFS="$IFS_save"
44467      else
44468        # This is an absolute path, we can use it without further modifications.
44469        new_path="$path"
44470      fi
44471
44472      if test "x$new_path" = x; then
44473        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44474$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44475        has_space=`$ECHO "$complete" | $GREP " "`
44476        if test "x$has_space" != x; then
44477          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44478$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44479        fi
44480        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44481      fi
44482    fi
44483
44484    # Now join together the path and the arguments once again
44485    if test "x$arguments" != xEOL; then
44486      new_complete="$new_path ${arguments% *}"
44487    else
44488      new_complete="$new_path"
44489    fi
44490
44491    if test "x$complete" != "x$new_complete"; then
44492      BUILD_CXX="$new_complete"
44493      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
44494$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
44495    fi
44496  fi
44497
44498
44499
44500  # Publish this variable in the help.
44501
44502
44503  if [ -z "${BUILD_NM+x}" ]; then
44504    # The variable is not set by user, try to locate tool using the code snippet
44505    for ac_prog in nm gcc-nm
44506do
44507  # Extract the first word of "$ac_prog", so it can be a program name with args.
44508set dummy $ac_prog; ac_word=$2
44509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44510$as_echo_n "checking for $ac_word... " >&6; }
44511if ${ac_cv_path_BUILD_NM+:} false; then :
44512  $as_echo_n "(cached) " >&6
44513else
44514  case $BUILD_NM in
44515  [\\/]* | ?:[\\/]*)
44516  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44517  ;;
44518  *)
44519  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44520for as_dir in $PATH
44521do
44522  IFS=$as_save_IFS
44523  test -z "$as_dir" && as_dir=.
44524    for ac_exec_ext in '' $ac_executable_extensions; do
44525  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44526    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
44527    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44528    break 2
44529  fi
44530done
44531  done
44532IFS=$as_save_IFS
44533
44534  ;;
44535esac
44536fi
44537BUILD_NM=$ac_cv_path_BUILD_NM
44538if test -n "$BUILD_NM"; then
44539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
44540$as_echo "$BUILD_NM" >&6; }
44541else
44542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44543$as_echo "no" >&6; }
44544fi
44545
44546
44547  test -n "$BUILD_NM" && break
44548done
44549
44550  else
44551    # The variable is set, but is it from the command line or the environment?
44552
44553    # Try to remove the string !BUILD_NM! from our list.
44554    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
44555    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44556      # If it failed, the variable was not from the command line. Ignore it,
44557      # but warn the user (except for BASH, which is always set by the calling BASH).
44558      if test "xBUILD_NM" != xBASH; then
44559        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
44560$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
44561      fi
44562      # Try to locate tool using the code snippet
44563      for ac_prog in nm gcc-nm
44564do
44565  # Extract the first word of "$ac_prog", so it can be a program name with args.
44566set dummy $ac_prog; ac_word=$2
44567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44568$as_echo_n "checking for $ac_word... " >&6; }
44569if ${ac_cv_path_BUILD_NM+:} false; then :
44570  $as_echo_n "(cached) " >&6
44571else
44572  case $BUILD_NM in
44573  [\\/]* | ?:[\\/]*)
44574  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44575  ;;
44576  *)
44577  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44578for as_dir in $PATH
44579do
44580  IFS=$as_save_IFS
44581  test -z "$as_dir" && as_dir=.
44582    for ac_exec_ext in '' $ac_executable_extensions; do
44583  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44584    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
44585    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44586    break 2
44587  fi
44588done
44589  done
44590IFS=$as_save_IFS
44591
44592  ;;
44593esac
44594fi
44595BUILD_NM=$ac_cv_path_BUILD_NM
44596if test -n "$BUILD_NM"; then
44597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
44598$as_echo "$BUILD_NM" >&6; }
44599else
44600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44601$as_echo "no" >&6; }
44602fi
44603
44604
44605  test -n "$BUILD_NM" && break
44606done
44607
44608    else
44609      # If it succeeded, then it was overridden by the user. We will use it
44610      # for the tool.
44611
44612      # First remove it from the list of overridden variables, so we can test
44613      # for unknown variables in the end.
44614      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44615
44616      # Check if we try to supply an empty value
44617      if test "x$BUILD_NM" = x; then
44618        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
44619$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
44620        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
44621$as_echo_n "checking for BUILD_NM... " >&6; }
44622        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44623$as_echo "disabled" >&6; }
44624      else
44625        # Check if the provided tool contains a complete path.
44626        tool_specified="$BUILD_NM"
44627        tool_basename="${tool_specified##*/}"
44628        if test "x$tool_basename" = "x$tool_specified"; then
44629          # A command without a complete path is provided, search $PATH.
44630          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
44631$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
44632          # Extract the first word of "$tool_basename", so it can be a program name with args.
44633set dummy $tool_basename; ac_word=$2
44634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44635$as_echo_n "checking for $ac_word... " >&6; }
44636if ${ac_cv_path_BUILD_NM+:} false; then :
44637  $as_echo_n "(cached) " >&6
44638else
44639  case $BUILD_NM in
44640  [\\/]* | ?:[\\/]*)
44641  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44642  ;;
44643  *)
44644  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44645for as_dir in $PATH
44646do
44647  IFS=$as_save_IFS
44648  test -z "$as_dir" && as_dir=.
44649    for ac_exec_ext in '' $ac_executable_extensions; do
44650  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44651    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
44652    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44653    break 2
44654  fi
44655done
44656  done
44657IFS=$as_save_IFS
44658
44659  ;;
44660esac
44661fi
44662BUILD_NM=$ac_cv_path_BUILD_NM
44663if test -n "$BUILD_NM"; then
44664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
44665$as_echo "$BUILD_NM" >&6; }
44666else
44667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44668$as_echo "no" >&6; }
44669fi
44670
44671
44672          if test "x$BUILD_NM" = x; then
44673            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44674          fi
44675        else
44676          # Otherwise we believe it is a complete path. Use it as it is.
44677          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
44678$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
44679          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
44680$as_echo_n "checking for BUILD_NM... " >&6; }
44681          if test ! -x "$tool_specified"; then
44682            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44683$as_echo "not found" >&6; }
44684            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
44685          fi
44686          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44687$as_echo "$tool_specified" >&6; }
44688        fi
44689      fi
44690    fi
44691
44692  fi
44693
44694
44695
44696  # Only process if variable expands to non-empty
44697
44698  if test "x$BUILD_NM" != x; then
44699    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44700
44701  # First separate the path from the arguments. This will split at the first
44702  # space.
44703  complete="$BUILD_NM"
44704  path="${complete%% *}"
44705  tmp="$complete EOL"
44706  arguments="${tmp#* }"
44707
44708  # Input might be given as Windows format, start by converting to
44709  # unix format.
44710  new_path=`$CYGPATH -u "$path"`
44711
44712  # Now try to locate executable using which
44713  new_path=`$WHICH "$new_path" 2> /dev/null`
44714  # bat and cmd files are not always considered executable in cygwin causing which
44715  # to not find them
44716  if test "x$new_path" = x \
44717      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44718      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44719    new_path=`$CYGPATH -u "$path"`
44720  fi
44721  if test "x$new_path" = x; then
44722    # Oops. Which didn't find the executable.
44723    # The splitting of arguments from the executable at a space might have been incorrect,
44724    # since paths with space are more likely in Windows. Give it another try with the whole
44725    # argument.
44726    path="$complete"
44727    arguments="EOL"
44728    new_path=`$CYGPATH -u "$path"`
44729    new_path=`$WHICH "$new_path" 2> /dev/null`
44730    # bat and cmd files are not always considered executable in cygwin causing which
44731    # to not find them
44732    if test "x$new_path" = x \
44733        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44734        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44735      new_path=`$CYGPATH -u "$path"`
44736    fi
44737    if test "x$new_path" = x; then
44738      # It's still not found. Now this is an unrecoverable error.
44739      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44740$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44741      has_space=`$ECHO "$complete" | $GREP " "`
44742      if test "x$has_space" != x; then
44743        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44744$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44745      fi
44746      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44747    fi
44748  fi
44749
44750  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44751  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44752  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44753  # "foo.exe" is OK but "foo" is an error.
44754  #
44755  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44756  # It is also a way to make sure we got the proper file name for the real test later on.
44757  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44758  if test "x$test_shortpath" = x; then
44759    # Short path failed, file does not exist as specified.
44760    # Try adding .exe or .cmd
44761    if test -f "${new_path}.exe"; then
44762      input_to_shortpath="${new_path}.exe"
44763    elif test -f "${new_path}.cmd"; then
44764      input_to_shortpath="${new_path}.cmd"
44765    else
44766      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
44767$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
44768      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44769$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44770      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44771    fi
44772  else
44773    input_to_shortpath="$new_path"
44774  fi
44775
44776  # Call helper function which possibly converts this using DOS-style short mode.
44777  # If so, the updated path is stored in $new_path.
44778  new_path="$input_to_shortpath"
44779
44780  input_path="$input_to_shortpath"
44781  # Check if we need to convert this using DOS-style short mode. If the path
44782  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44783  # take no chances and rewrite it.
44784  # Note: m4 eats our [], so we need to use [ and ] instead.
44785  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44786  if test "x$has_forbidden_chars" != x; then
44787    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44788    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44789    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44790    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44791      # Going to short mode and back again did indeed matter. Since short mode is
44792      # case insensitive, let's make it lowercase to improve readability.
44793      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44794      # Now convert it back to Unix-style (cygpath)
44795      input_path=`$CYGPATH -u "$shortmode_path"`
44796      new_path="$input_path"
44797    fi
44798  fi
44799
44800  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44801  if test "x$test_cygdrive_prefix" = x; then
44802    # As a simple fix, exclude /usr/bin since it's not a real path.
44803    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44804      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44805      # a path prefixed by /cygdrive for fixpath to work.
44806      new_path="$CYGWIN_ROOT_PATH$input_path"
44807    fi
44808  fi
44809
44810  # remove trailing .exe if any
44811  new_path="${new_path/%.exe/}"
44812
44813    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44814
44815  # First separate the path from the arguments. This will split at the first
44816  # space.
44817  complete="$BUILD_NM"
44818  path="${complete%% *}"
44819  tmp="$complete EOL"
44820  arguments="${tmp#* }"
44821
44822  # Input might be given as Windows format, start by converting to
44823  # unix format.
44824  new_path="$path"
44825
44826  windows_path="$new_path"
44827  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44828    unix_path=`$CYGPATH -u "$windows_path"`
44829    new_path="$unix_path"
44830  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44831    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44832    new_path="$unix_path"
44833  fi
44834
44835
44836  # Now try to locate executable using which
44837  new_path=`$WHICH "$new_path" 2> /dev/null`
44838
44839  if test "x$new_path" = x; then
44840    # Oops. Which didn't find the executable.
44841    # The splitting of arguments from the executable at a space might have been incorrect,
44842    # since paths with space are more likely in Windows. Give it another try with the whole
44843    # argument.
44844    path="$complete"
44845    arguments="EOL"
44846    new_path="$path"
44847
44848  windows_path="$new_path"
44849  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44850    unix_path=`$CYGPATH -u "$windows_path"`
44851    new_path="$unix_path"
44852  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44853    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44854    new_path="$unix_path"
44855  fi
44856
44857
44858    new_path=`$WHICH "$new_path" 2> /dev/null`
44859    # bat and cmd files are not always considered executable in MSYS causing which
44860    # to not find them
44861    if test "x$new_path" = x \
44862        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44863        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44864      new_path="$path"
44865
44866  windows_path="$new_path"
44867  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44868    unix_path=`$CYGPATH -u "$windows_path"`
44869    new_path="$unix_path"
44870  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44871    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44872    new_path="$unix_path"
44873  fi
44874
44875    fi
44876
44877    if test "x$new_path" = x; then
44878      # It's still not found. Now this is an unrecoverable error.
44879      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44880$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44881      has_space=`$ECHO "$complete" | $GREP " "`
44882      if test "x$has_space" != x; then
44883        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44884$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44885      fi
44886      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44887    fi
44888  fi
44889
44890  # Now new_path has a complete unix path to the binary
44891  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44892    # Keep paths in /bin as-is, but remove trailing .exe if any
44893    new_path="${new_path/%.exe/}"
44894    # Do not save /bin paths to all_fixpath_prefixes!
44895  else
44896    # Not in mixed or Windows style, start by that.
44897    new_path=`cmd //c echo $new_path`
44898
44899  input_path="$new_path"
44900  # Check if we need to convert this using DOS-style short mode. If the path
44901  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44902  # take no chances and rewrite it.
44903  # Note: m4 eats our [], so we need to use [ and ] instead.
44904  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44905  if test "x$has_forbidden_chars" != x; then
44906    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44907    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44908  fi
44909
44910    # Output is in $new_path
44911
44912  windows_path="$new_path"
44913  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44914    unix_path=`$CYGPATH -u "$windows_path"`
44915    new_path="$unix_path"
44916  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44917    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44918    new_path="$unix_path"
44919  fi
44920
44921    # remove trailing .exe if any
44922    new_path="${new_path/%.exe/}"
44923
44924    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44925    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44926  fi
44927
44928    else
44929      # We're on a unix platform. Hooray! :)
44930      # First separate the path from the arguments. This will split at the first
44931      # space.
44932      complete="$BUILD_NM"
44933      path="${complete%% *}"
44934      tmp="$complete EOL"
44935      arguments="${tmp#* }"
44936
44937      # Cannot rely on the command "which" here since it doesn't always work.
44938      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44939      if test -z "$is_absolute_path"; then
44940        # Path to executable is not absolute. Find it.
44941        IFS_save="$IFS"
44942        IFS=:
44943        for p in $PATH; do
44944          if test -f "$p/$path" && test -x "$p/$path"; then
44945            new_path="$p/$path"
44946            break
44947          fi
44948        done
44949        IFS="$IFS_save"
44950      else
44951        # This is an absolute path, we can use it without further modifications.
44952        new_path="$path"
44953      fi
44954
44955      if test "x$new_path" = x; then
44956        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44957$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44958        has_space=`$ECHO "$complete" | $GREP " "`
44959        if test "x$has_space" != x; then
44960          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44961$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44962        fi
44963        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44964      fi
44965    fi
44966
44967    # Now join together the path and the arguments once again
44968    if test "x$arguments" != xEOL; then
44969      new_complete="$new_path ${arguments% *}"
44970    else
44971      new_complete="$new_path"
44972    fi
44973
44974    if test "x$complete" != "x$new_complete"; then
44975      BUILD_NM="$new_complete"
44976      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
44977$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
44978    fi
44979  fi
44980
44981
44982
44983  # Publish this variable in the help.
44984
44985
44986  if [ -z "${BUILD_AR+x}" ]; then
44987    # The variable is not set by user, try to locate tool using the code snippet
44988    for ac_prog in ar gcc-ar
44989do
44990  # Extract the first word of "$ac_prog", so it can be a program name with args.
44991set dummy $ac_prog; ac_word=$2
44992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44993$as_echo_n "checking for $ac_word... " >&6; }
44994if ${ac_cv_path_BUILD_AR+:} false; then :
44995  $as_echo_n "(cached) " >&6
44996else
44997  case $BUILD_AR in
44998  [\\/]* | ?:[\\/]*)
44999  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45000  ;;
45001  *)
45002  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45003for as_dir in $PATH
45004do
45005  IFS=$as_save_IFS
45006  test -z "$as_dir" && as_dir=.
45007    for ac_exec_ext in '' $ac_executable_extensions; do
45008  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45009    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45010    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45011    break 2
45012  fi
45013done
45014  done
45015IFS=$as_save_IFS
45016
45017  ;;
45018esac
45019fi
45020BUILD_AR=$ac_cv_path_BUILD_AR
45021if test -n "$BUILD_AR"; then
45022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45023$as_echo "$BUILD_AR" >&6; }
45024else
45025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45026$as_echo "no" >&6; }
45027fi
45028
45029
45030  test -n "$BUILD_AR" && break
45031done
45032
45033  else
45034    # The variable is set, but is it from the command line or the environment?
45035
45036    # Try to remove the string !BUILD_AR! from our list.
45037    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
45038    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45039      # If it failed, the variable was not from the command line. Ignore it,
45040      # but warn the user (except for BASH, which is always set by the calling BASH).
45041      if test "xBUILD_AR" != xBASH; then
45042        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
45043$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
45044      fi
45045      # Try to locate tool using the code snippet
45046      for ac_prog in ar gcc-ar
45047do
45048  # Extract the first word of "$ac_prog", so it can be a program name with args.
45049set dummy $ac_prog; ac_word=$2
45050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45051$as_echo_n "checking for $ac_word... " >&6; }
45052if ${ac_cv_path_BUILD_AR+:} false; then :
45053  $as_echo_n "(cached) " >&6
45054else
45055  case $BUILD_AR in
45056  [\\/]* | ?:[\\/]*)
45057  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45058  ;;
45059  *)
45060  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45061for as_dir in $PATH
45062do
45063  IFS=$as_save_IFS
45064  test -z "$as_dir" && as_dir=.
45065    for ac_exec_ext in '' $ac_executable_extensions; do
45066  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45067    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45068    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45069    break 2
45070  fi
45071done
45072  done
45073IFS=$as_save_IFS
45074
45075  ;;
45076esac
45077fi
45078BUILD_AR=$ac_cv_path_BUILD_AR
45079if test -n "$BUILD_AR"; then
45080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45081$as_echo "$BUILD_AR" >&6; }
45082else
45083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45084$as_echo "no" >&6; }
45085fi
45086
45087
45088  test -n "$BUILD_AR" && break
45089done
45090
45091    else
45092      # If it succeeded, then it was overridden by the user. We will use it
45093      # for the tool.
45094
45095      # First remove it from the list of overridden variables, so we can test
45096      # for unknown variables in the end.
45097      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45098
45099      # Check if we try to supply an empty value
45100      if test "x$BUILD_AR" = x; then
45101        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
45102$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
45103        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45104$as_echo_n "checking for BUILD_AR... " >&6; }
45105        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45106$as_echo "disabled" >&6; }
45107      else
45108        # Check if the provided tool contains a complete path.
45109        tool_specified="$BUILD_AR"
45110        tool_basename="${tool_specified##*/}"
45111        if test "x$tool_basename" = "x$tool_specified"; then
45112          # A command without a complete path is provided, search $PATH.
45113          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
45114$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
45115          # Extract the first word of "$tool_basename", so it can be a program name with args.
45116set dummy $tool_basename; ac_word=$2
45117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45118$as_echo_n "checking for $ac_word... " >&6; }
45119if ${ac_cv_path_BUILD_AR+:} false; then :
45120  $as_echo_n "(cached) " >&6
45121else
45122  case $BUILD_AR in
45123  [\\/]* | ?:[\\/]*)
45124  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45125  ;;
45126  *)
45127  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45128for as_dir in $PATH
45129do
45130  IFS=$as_save_IFS
45131  test -z "$as_dir" && as_dir=.
45132    for ac_exec_ext in '' $ac_executable_extensions; do
45133  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45134    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45135    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45136    break 2
45137  fi
45138done
45139  done
45140IFS=$as_save_IFS
45141
45142  ;;
45143esac
45144fi
45145BUILD_AR=$ac_cv_path_BUILD_AR
45146if test -n "$BUILD_AR"; then
45147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45148$as_echo "$BUILD_AR" >&6; }
45149else
45150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45151$as_echo "no" >&6; }
45152fi
45153
45154
45155          if test "x$BUILD_AR" = x; then
45156            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45157          fi
45158        else
45159          # Otherwise we believe it is a complete path. Use it as it is.
45160          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
45161$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
45162          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45163$as_echo_n "checking for BUILD_AR... " >&6; }
45164          if test ! -x "$tool_specified"; then
45165            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45166$as_echo "not found" >&6; }
45167            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
45168          fi
45169          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45170$as_echo "$tool_specified" >&6; }
45171        fi
45172      fi
45173    fi
45174
45175  fi
45176
45177
45178
45179  # Only process if variable expands to non-empty
45180
45181  if test "x$BUILD_AR" != x; then
45182    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45183
45184  # First separate the path from the arguments. This will split at the first
45185  # space.
45186  complete="$BUILD_AR"
45187  path="${complete%% *}"
45188  tmp="$complete EOL"
45189  arguments="${tmp#* }"
45190
45191  # Input might be given as Windows format, start by converting to
45192  # unix format.
45193  new_path=`$CYGPATH -u "$path"`
45194
45195  # Now try to locate executable using which
45196  new_path=`$WHICH "$new_path" 2> /dev/null`
45197  # bat and cmd files are not always considered executable in cygwin causing which
45198  # to not find them
45199  if test "x$new_path" = x \
45200      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45201      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45202    new_path=`$CYGPATH -u "$path"`
45203  fi
45204  if test "x$new_path" = x; then
45205    # Oops. Which didn't find the executable.
45206    # The splitting of arguments from the executable at a space might have been incorrect,
45207    # since paths with space are more likely in Windows. Give it another try with the whole
45208    # argument.
45209    path="$complete"
45210    arguments="EOL"
45211    new_path=`$CYGPATH -u "$path"`
45212    new_path=`$WHICH "$new_path" 2> /dev/null`
45213    # bat and cmd files are not always considered executable in cygwin causing which
45214    # to not find them
45215    if test "x$new_path" = x \
45216        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45217        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45218      new_path=`$CYGPATH -u "$path"`
45219    fi
45220    if test "x$new_path" = x; then
45221      # It's still not found. Now this is an unrecoverable error.
45222      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45223$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45224      has_space=`$ECHO "$complete" | $GREP " "`
45225      if test "x$has_space" != x; then
45226        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45227$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45228      fi
45229      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45230    fi
45231  fi
45232
45233  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45234  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45235  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45236  # "foo.exe" is OK but "foo" is an error.
45237  #
45238  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45239  # It is also a way to make sure we got the proper file name for the real test later on.
45240  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45241  if test "x$test_shortpath" = x; then
45242    # Short path failed, file does not exist as specified.
45243    # Try adding .exe or .cmd
45244    if test -f "${new_path}.exe"; then
45245      input_to_shortpath="${new_path}.exe"
45246    elif test -f "${new_path}.cmd"; then
45247      input_to_shortpath="${new_path}.cmd"
45248    else
45249      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
45250$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
45251      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45252$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45253      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45254    fi
45255  else
45256    input_to_shortpath="$new_path"
45257  fi
45258
45259  # Call helper function which possibly converts this using DOS-style short mode.
45260  # If so, the updated path is stored in $new_path.
45261  new_path="$input_to_shortpath"
45262
45263  input_path="$input_to_shortpath"
45264  # Check if we need to convert this using DOS-style short mode. If the path
45265  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45266  # take no chances and rewrite it.
45267  # Note: m4 eats our [], so we need to use [ and ] instead.
45268  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45269  if test "x$has_forbidden_chars" != x; then
45270    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45271    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45272    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45273    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45274      # Going to short mode and back again did indeed matter. Since short mode is
45275      # case insensitive, let's make it lowercase to improve readability.
45276      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45277      # Now convert it back to Unix-style (cygpath)
45278      input_path=`$CYGPATH -u "$shortmode_path"`
45279      new_path="$input_path"
45280    fi
45281  fi
45282
45283  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45284  if test "x$test_cygdrive_prefix" = x; then
45285    # As a simple fix, exclude /usr/bin since it's not a real path.
45286    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45287      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45288      # a path prefixed by /cygdrive for fixpath to work.
45289      new_path="$CYGWIN_ROOT_PATH$input_path"
45290    fi
45291  fi
45292
45293  # remove trailing .exe if any
45294  new_path="${new_path/%.exe/}"
45295
45296    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45297
45298  # First separate the path from the arguments. This will split at the first
45299  # space.
45300  complete="$BUILD_AR"
45301  path="${complete%% *}"
45302  tmp="$complete EOL"
45303  arguments="${tmp#* }"
45304
45305  # Input might be given as Windows format, start by converting to
45306  # unix format.
45307  new_path="$path"
45308
45309  windows_path="$new_path"
45310  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45311    unix_path=`$CYGPATH -u "$windows_path"`
45312    new_path="$unix_path"
45313  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45314    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45315    new_path="$unix_path"
45316  fi
45317
45318
45319  # Now try to locate executable using which
45320  new_path=`$WHICH "$new_path" 2> /dev/null`
45321
45322  if test "x$new_path" = x; then
45323    # Oops. Which didn't find the executable.
45324    # The splitting of arguments from the executable at a space might have been incorrect,
45325    # since paths with space are more likely in Windows. Give it another try with the whole
45326    # argument.
45327    path="$complete"
45328    arguments="EOL"
45329    new_path="$path"
45330
45331  windows_path="$new_path"
45332  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45333    unix_path=`$CYGPATH -u "$windows_path"`
45334    new_path="$unix_path"
45335  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45336    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45337    new_path="$unix_path"
45338  fi
45339
45340
45341    new_path=`$WHICH "$new_path" 2> /dev/null`
45342    # bat and cmd files are not always considered executable in MSYS causing which
45343    # to not find them
45344    if test "x$new_path" = x \
45345        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45346        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45347      new_path="$path"
45348
45349  windows_path="$new_path"
45350  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45351    unix_path=`$CYGPATH -u "$windows_path"`
45352    new_path="$unix_path"
45353  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45354    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45355    new_path="$unix_path"
45356  fi
45357
45358    fi
45359
45360    if test "x$new_path" = x; then
45361      # It's still not found. Now this is an unrecoverable error.
45362      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45363$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45364      has_space=`$ECHO "$complete" | $GREP " "`
45365      if test "x$has_space" != x; then
45366        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45367$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45368      fi
45369      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45370    fi
45371  fi
45372
45373  # Now new_path has a complete unix path to the binary
45374  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45375    # Keep paths in /bin as-is, but remove trailing .exe if any
45376    new_path="${new_path/%.exe/}"
45377    # Do not save /bin paths to all_fixpath_prefixes!
45378  else
45379    # Not in mixed or Windows style, start by that.
45380    new_path=`cmd //c echo $new_path`
45381
45382  input_path="$new_path"
45383  # Check if we need to convert this using DOS-style short mode. If the path
45384  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45385  # take no chances and rewrite it.
45386  # Note: m4 eats our [], so we need to use [ and ] instead.
45387  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45388  if test "x$has_forbidden_chars" != x; then
45389    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45390    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45391  fi
45392
45393    # Output is in $new_path
45394
45395  windows_path="$new_path"
45396  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45397    unix_path=`$CYGPATH -u "$windows_path"`
45398    new_path="$unix_path"
45399  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45400    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45401    new_path="$unix_path"
45402  fi
45403
45404    # remove trailing .exe if any
45405    new_path="${new_path/%.exe/}"
45406
45407    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45408    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45409  fi
45410
45411    else
45412      # We're on a unix platform. Hooray! :)
45413      # First separate the path from the arguments. This will split at the first
45414      # space.
45415      complete="$BUILD_AR"
45416      path="${complete%% *}"
45417      tmp="$complete EOL"
45418      arguments="${tmp#* }"
45419
45420      # Cannot rely on the command "which" here since it doesn't always work.
45421      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45422      if test -z "$is_absolute_path"; then
45423        # Path to executable is not absolute. Find it.
45424        IFS_save="$IFS"
45425        IFS=:
45426        for p in $PATH; do
45427          if test -f "$p/$path" && test -x "$p/$path"; then
45428            new_path="$p/$path"
45429            break
45430          fi
45431        done
45432        IFS="$IFS_save"
45433      else
45434        # This is an absolute path, we can use it without further modifications.
45435        new_path="$path"
45436      fi
45437
45438      if test "x$new_path" = x; then
45439        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45440$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45441        has_space=`$ECHO "$complete" | $GREP " "`
45442        if test "x$has_space" != x; then
45443          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45444$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45445        fi
45446        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45447      fi
45448    fi
45449
45450    # Now join together the path and the arguments once again
45451    if test "x$arguments" != xEOL; then
45452      new_complete="$new_path ${arguments% *}"
45453    else
45454      new_complete="$new_path"
45455    fi
45456
45457    if test "x$complete" != "x$new_complete"; then
45458      BUILD_AR="$new_complete"
45459      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
45460$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
45461    fi
45462  fi
45463
45464
45465
45466  # Publish this variable in the help.
45467
45468
45469  if [ -z "${BUILD_OBJCOPY+x}" ]; then
45470    # The variable is not set by user, try to locate tool using the code snippet
45471    for ac_prog in objcopy
45472do
45473  # Extract the first word of "$ac_prog", so it can be a program name with args.
45474set dummy $ac_prog; ac_word=$2
45475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45476$as_echo_n "checking for $ac_word... " >&6; }
45477if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
45478  $as_echo_n "(cached) " >&6
45479else
45480  case $BUILD_OBJCOPY in
45481  [\\/]* | ?:[\\/]*)
45482  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
45483  ;;
45484  *)
45485  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45486for as_dir in $PATH
45487do
45488  IFS=$as_save_IFS
45489  test -z "$as_dir" && as_dir=.
45490    for ac_exec_ext in '' $ac_executable_extensions; do
45491  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45492    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
45493    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45494    break 2
45495  fi
45496done
45497  done
45498IFS=$as_save_IFS
45499
45500  ;;
45501esac
45502fi
45503BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
45504if test -n "$BUILD_OBJCOPY"; then
45505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
45506$as_echo "$BUILD_OBJCOPY" >&6; }
45507else
45508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45509$as_echo "no" >&6; }
45510fi
45511
45512
45513  test -n "$BUILD_OBJCOPY" && break
45514done
45515
45516  else
45517    # The variable is set, but is it from the command line or the environment?
45518
45519    # Try to remove the string !BUILD_OBJCOPY! from our list.
45520    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
45521    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45522      # If it failed, the variable was not from the command line. Ignore it,
45523      # but warn the user (except for BASH, which is always set by the calling BASH).
45524      if test "xBUILD_OBJCOPY" != xBASH; then
45525        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
45526$as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
45527      fi
45528      # Try to locate tool using the code snippet
45529      for ac_prog in objcopy
45530do
45531  # Extract the first word of "$ac_prog", so it can be a program name with args.
45532set dummy $ac_prog; ac_word=$2
45533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45534$as_echo_n "checking for $ac_word... " >&6; }
45535if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
45536  $as_echo_n "(cached) " >&6
45537else
45538  case $BUILD_OBJCOPY in
45539  [\\/]* | ?:[\\/]*)
45540  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
45541  ;;
45542  *)
45543  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45544for as_dir in $PATH
45545do
45546  IFS=$as_save_IFS
45547  test -z "$as_dir" && as_dir=.
45548    for ac_exec_ext in '' $ac_executable_extensions; do
45549  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45550    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
45551    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45552    break 2
45553  fi
45554done
45555  done
45556IFS=$as_save_IFS
45557
45558  ;;
45559esac
45560fi
45561BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
45562if test -n "$BUILD_OBJCOPY"; then
45563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
45564$as_echo "$BUILD_OBJCOPY" >&6; }
45565else
45566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45567$as_echo "no" >&6; }
45568fi
45569
45570
45571  test -n "$BUILD_OBJCOPY" && break
45572done
45573
45574    else
45575      # If it succeeded, then it was overridden by the user. We will use it
45576      # for the tool.
45577
45578      # First remove it from the list of overridden variables, so we can test
45579      # for unknown variables in the end.
45580      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45581
45582      # Check if we try to supply an empty value
45583      if test "x$BUILD_OBJCOPY" = x; then
45584        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
45585$as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
45586        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
45587$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
45588        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45589$as_echo "disabled" >&6; }
45590      else
45591        # Check if the provided tool contains a complete path.
45592        tool_specified="$BUILD_OBJCOPY"
45593        tool_basename="${tool_specified##*/}"
45594        if test "x$tool_basename" = "x$tool_specified"; then
45595          # A command without a complete path is provided, search $PATH.
45596          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
45597$as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
45598          # Extract the first word of "$tool_basename", so it can be a program name with args.
45599set dummy $tool_basename; ac_word=$2
45600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45601$as_echo_n "checking for $ac_word... " >&6; }
45602if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
45603  $as_echo_n "(cached) " >&6
45604else
45605  case $BUILD_OBJCOPY in
45606  [\\/]* | ?:[\\/]*)
45607  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
45608  ;;
45609  *)
45610  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45611for as_dir in $PATH
45612do
45613  IFS=$as_save_IFS
45614  test -z "$as_dir" && as_dir=.
45615    for ac_exec_ext in '' $ac_executable_extensions; do
45616  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45617    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
45618    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45619    break 2
45620  fi
45621done
45622  done
45623IFS=$as_save_IFS
45624
45625  ;;
45626esac
45627fi
45628BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
45629if test -n "$BUILD_OBJCOPY"; then
45630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
45631$as_echo "$BUILD_OBJCOPY" >&6; }
45632else
45633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45634$as_echo "no" >&6; }
45635fi
45636
45637
45638          if test "x$BUILD_OBJCOPY" = x; then
45639            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45640          fi
45641        else
45642          # Otherwise we believe it is a complete path. Use it as it is.
45643          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
45644$as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
45645          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
45646$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
45647          if test ! -x "$tool_specified"; then
45648            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45649$as_echo "not found" >&6; }
45650            as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
45651          fi
45652          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45653$as_echo "$tool_specified" >&6; }
45654        fi
45655      fi
45656    fi
45657
45658  fi
45659
45660
45661
45662  # Only process if variable expands to non-empty
45663
45664  if test "x$BUILD_OBJCOPY" != x; then
45665    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45666
45667  # First separate the path from the arguments. This will split at the first
45668  # space.
45669  complete="$BUILD_OBJCOPY"
45670  path="${complete%% *}"
45671  tmp="$complete EOL"
45672  arguments="${tmp#* }"
45673
45674  # Input might be given as Windows format, start by converting to
45675  # unix format.
45676  new_path=`$CYGPATH -u "$path"`
45677
45678  # Now try to locate executable using which
45679  new_path=`$WHICH "$new_path" 2> /dev/null`
45680  # bat and cmd files are not always considered executable in cygwin causing which
45681  # to not find them
45682  if test "x$new_path" = x \
45683      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45684      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45685    new_path=`$CYGPATH -u "$path"`
45686  fi
45687  if test "x$new_path" = x; then
45688    # Oops. Which didn't find the executable.
45689    # The splitting of arguments from the executable at a space might have been incorrect,
45690    # since paths with space are more likely in Windows. Give it another try with the whole
45691    # argument.
45692    path="$complete"
45693    arguments="EOL"
45694    new_path=`$CYGPATH -u "$path"`
45695    new_path=`$WHICH "$new_path" 2> /dev/null`
45696    # bat and cmd files are not always considered executable in cygwin causing which
45697    # to not find them
45698    if test "x$new_path" = x \
45699        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45700        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45701      new_path=`$CYGPATH -u "$path"`
45702    fi
45703    if test "x$new_path" = x; then
45704      # It's still not found. Now this is an unrecoverable error.
45705      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
45706$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
45707      has_space=`$ECHO "$complete" | $GREP " "`
45708      if test "x$has_space" != x; then
45709        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45710$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45711      fi
45712      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
45713    fi
45714  fi
45715
45716  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45717  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45718  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45719  # "foo.exe" is OK but "foo" is an error.
45720  #
45721  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45722  # It is also a way to make sure we got the proper file name for the real test later on.
45723  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45724  if test "x$test_shortpath" = x; then
45725    # Short path failed, file does not exist as specified.
45726    # Try adding .exe or .cmd
45727    if test -f "${new_path}.exe"; then
45728      input_to_shortpath="${new_path}.exe"
45729    elif test -f "${new_path}.cmd"; then
45730      input_to_shortpath="${new_path}.cmd"
45731    else
45732      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
45733$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
45734      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45735$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45736      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
45737    fi
45738  else
45739    input_to_shortpath="$new_path"
45740  fi
45741
45742  # Call helper function which possibly converts this using DOS-style short mode.
45743  # If so, the updated path is stored in $new_path.
45744  new_path="$input_to_shortpath"
45745
45746  input_path="$input_to_shortpath"
45747  # Check if we need to convert this using DOS-style short mode. If the path
45748  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45749  # take no chances and rewrite it.
45750  # Note: m4 eats our [], so we need to use [ and ] instead.
45751  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45752  if test "x$has_forbidden_chars" != x; then
45753    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45754    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45755    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45756    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45757      # Going to short mode and back again did indeed matter. Since short mode is
45758      # case insensitive, let's make it lowercase to improve readability.
45759      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45760      # Now convert it back to Unix-style (cygpath)
45761      input_path=`$CYGPATH -u "$shortmode_path"`
45762      new_path="$input_path"
45763    fi
45764  fi
45765
45766  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45767  if test "x$test_cygdrive_prefix" = x; then
45768    # As a simple fix, exclude /usr/bin since it's not a real path.
45769    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45770      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45771      # a path prefixed by /cygdrive for fixpath to work.
45772      new_path="$CYGWIN_ROOT_PATH$input_path"
45773    fi
45774  fi
45775
45776  # remove trailing .exe if any
45777  new_path="${new_path/%.exe/}"
45778
45779    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45780
45781  # First separate the path from the arguments. This will split at the first
45782  # space.
45783  complete="$BUILD_OBJCOPY"
45784  path="${complete%% *}"
45785  tmp="$complete EOL"
45786  arguments="${tmp#* }"
45787
45788  # Input might be given as Windows format, start by converting to
45789  # unix format.
45790  new_path="$path"
45791
45792  windows_path="$new_path"
45793  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45794    unix_path=`$CYGPATH -u "$windows_path"`
45795    new_path="$unix_path"
45796  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45797    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45798    new_path="$unix_path"
45799  fi
45800
45801
45802  # Now try to locate executable using which
45803  new_path=`$WHICH "$new_path" 2> /dev/null`
45804
45805  if test "x$new_path" = x; then
45806    # Oops. Which didn't find the executable.
45807    # The splitting of arguments from the executable at a space might have been incorrect,
45808    # since paths with space are more likely in Windows. Give it another try with the whole
45809    # argument.
45810    path="$complete"
45811    arguments="EOL"
45812    new_path="$path"
45813
45814  windows_path="$new_path"
45815  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45816    unix_path=`$CYGPATH -u "$windows_path"`
45817    new_path="$unix_path"
45818  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45819    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45820    new_path="$unix_path"
45821  fi
45822
45823
45824    new_path=`$WHICH "$new_path" 2> /dev/null`
45825    # bat and cmd files are not always considered executable in MSYS causing which
45826    # to not find them
45827    if test "x$new_path" = x \
45828        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45829        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45830      new_path="$path"
45831
45832  windows_path="$new_path"
45833  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45834    unix_path=`$CYGPATH -u "$windows_path"`
45835    new_path="$unix_path"
45836  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45837    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45838    new_path="$unix_path"
45839  fi
45840
45841    fi
45842
45843    if test "x$new_path" = x; then
45844      # It's still not found. Now this is an unrecoverable error.
45845      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
45846$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
45847      has_space=`$ECHO "$complete" | $GREP " "`
45848      if test "x$has_space" != x; then
45849        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45850$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45851      fi
45852      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
45853    fi
45854  fi
45855
45856  # Now new_path has a complete unix path to the binary
45857  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45858    # Keep paths in /bin as-is, but remove trailing .exe if any
45859    new_path="${new_path/%.exe/}"
45860    # Do not save /bin paths to all_fixpath_prefixes!
45861  else
45862    # Not in mixed or Windows style, start by that.
45863    new_path=`cmd //c echo $new_path`
45864
45865  input_path="$new_path"
45866  # Check if we need to convert this using DOS-style short mode. If the path
45867  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45868  # take no chances and rewrite it.
45869  # Note: m4 eats our [], so we need to use [ and ] instead.
45870  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45871  if test "x$has_forbidden_chars" != x; then
45872    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45873    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45874  fi
45875
45876    # Output is in $new_path
45877
45878  windows_path="$new_path"
45879  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45880    unix_path=`$CYGPATH -u "$windows_path"`
45881    new_path="$unix_path"
45882  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45883    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45884    new_path="$unix_path"
45885  fi
45886
45887    # remove trailing .exe if any
45888    new_path="${new_path/%.exe/}"
45889
45890    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45891    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45892  fi
45893
45894    else
45895      # We're on a unix platform. Hooray! :)
45896      # First separate the path from the arguments. This will split at the first
45897      # space.
45898      complete="$BUILD_OBJCOPY"
45899      path="${complete%% *}"
45900      tmp="$complete EOL"
45901      arguments="${tmp#* }"
45902
45903      # Cannot rely on the command "which" here since it doesn't always work.
45904      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45905      if test -z "$is_absolute_path"; then
45906        # Path to executable is not absolute. Find it.
45907        IFS_save="$IFS"
45908        IFS=:
45909        for p in $PATH; do
45910          if test -f "$p/$path" && test -x "$p/$path"; then
45911            new_path="$p/$path"
45912            break
45913          fi
45914        done
45915        IFS="$IFS_save"
45916      else
45917        # This is an absolute path, we can use it without further modifications.
45918        new_path="$path"
45919      fi
45920
45921      if test "x$new_path" = x; then
45922        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
45923$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
45924        has_space=`$ECHO "$complete" | $GREP " "`
45925        if test "x$has_space" != x; then
45926          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45927$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45928        fi
45929        as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
45930      fi
45931    fi
45932
45933    # Now join together the path and the arguments once again
45934    if test "x$arguments" != xEOL; then
45935      new_complete="$new_path ${arguments% *}"
45936    else
45937      new_complete="$new_path"
45938    fi
45939
45940    if test "x$complete" != "x$new_complete"; then
45941      BUILD_OBJCOPY="$new_complete"
45942      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
45943$as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
45944    fi
45945  fi
45946
45947
45948
45949  # Publish this variable in the help.
45950
45951
45952  if [ -z "${BUILD_STRIP+x}" ]; then
45953    # The variable is not set by user, try to locate tool using the code snippet
45954    for ac_prog in strip
45955do
45956  # Extract the first word of "$ac_prog", so it can be a program name with args.
45957set dummy $ac_prog; ac_word=$2
45958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45959$as_echo_n "checking for $ac_word... " >&6; }
45960if ${ac_cv_path_BUILD_STRIP+:} false; then :
45961  $as_echo_n "(cached) " >&6
45962else
45963  case $BUILD_STRIP in
45964  [\\/]* | ?:[\\/]*)
45965  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
45966  ;;
45967  *)
45968  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45969for as_dir in $PATH
45970do
45971  IFS=$as_save_IFS
45972  test -z "$as_dir" && as_dir=.
45973    for ac_exec_ext in '' $ac_executable_extensions; do
45974  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45975    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
45976    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45977    break 2
45978  fi
45979done
45980  done
45981IFS=$as_save_IFS
45982
45983  ;;
45984esac
45985fi
45986BUILD_STRIP=$ac_cv_path_BUILD_STRIP
45987if test -n "$BUILD_STRIP"; then
45988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
45989$as_echo "$BUILD_STRIP" >&6; }
45990else
45991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45992$as_echo "no" >&6; }
45993fi
45994
45995
45996  test -n "$BUILD_STRIP" && break
45997done
45998
45999  else
46000    # The variable is set, but is it from the command line or the environment?
46001
46002    # Try to remove the string !BUILD_STRIP! from our list.
46003    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
46004    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46005      # If it failed, the variable was not from the command line. Ignore it,
46006      # but warn the user (except for BASH, which is always set by the calling BASH).
46007      if test "xBUILD_STRIP" != xBASH; then
46008        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
46009$as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
46010      fi
46011      # Try to locate tool using the code snippet
46012      for ac_prog in strip
46013do
46014  # Extract the first word of "$ac_prog", so it can be a program name with args.
46015set dummy $ac_prog; ac_word=$2
46016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46017$as_echo_n "checking for $ac_word... " >&6; }
46018if ${ac_cv_path_BUILD_STRIP+:} false; then :
46019  $as_echo_n "(cached) " >&6
46020else
46021  case $BUILD_STRIP in
46022  [\\/]* | ?:[\\/]*)
46023  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46024  ;;
46025  *)
46026  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46027for as_dir in $PATH
46028do
46029  IFS=$as_save_IFS
46030  test -z "$as_dir" && as_dir=.
46031    for ac_exec_ext in '' $ac_executable_extensions; do
46032  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46033    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46034    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46035    break 2
46036  fi
46037done
46038  done
46039IFS=$as_save_IFS
46040
46041  ;;
46042esac
46043fi
46044BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46045if test -n "$BUILD_STRIP"; then
46046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46047$as_echo "$BUILD_STRIP" >&6; }
46048else
46049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46050$as_echo "no" >&6; }
46051fi
46052
46053
46054  test -n "$BUILD_STRIP" && break
46055done
46056
46057    else
46058      # If it succeeded, then it was overridden by the user. We will use it
46059      # for the tool.
46060
46061      # First remove it from the list of overridden variables, so we can test
46062      # for unknown variables in the end.
46063      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46064
46065      # Check if we try to supply an empty value
46066      if test "x$BUILD_STRIP" = x; then
46067        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
46068$as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
46069        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46070$as_echo_n "checking for BUILD_STRIP... " >&6; }
46071        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46072$as_echo "disabled" >&6; }
46073      else
46074        # Check if the provided tool contains a complete path.
46075        tool_specified="$BUILD_STRIP"
46076        tool_basename="${tool_specified##*/}"
46077        if test "x$tool_basename" = "x$tool_specified"; then
46078          # A command without a complete path is provided, search $PATH.
46079          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
46080$as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
46081          # Extract the first word of "$tool_basename", so it can be a program name with args.
46082set dummy $tool_basename; ac_word=$2
46083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46084$as_echo_n "checking for $ac_word... " >&6; }
46085if ${ac_cv_path_BUILD_STRIP+:} false; then :
46086  $as_echo_n "(cached) " >&6
46087else
46088  case $BUILD_STRIP in
46089  [\\/]* | ?:[\\/]*)
46090  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46091  ;;
46092  *)
46093  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46094for as_dir in $PATH
46095do
46096  IFS=$as_save_IFS
46097  test -z "$as_dir" && as_dir=.
46098    for ac_exec_ext in '' $ac_executable_extensions; do
46099  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46100    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46101    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46102    break 2
46103  fi
46104done
46105  done
46106IFS=$as_save_IFS
46107
46108  ;;
46109esac
46110fi
46111BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46112if test -n "$BUILD_STRIP"; then
46113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46114$as_echo "$BUILD_STRIP" >&6; }
46115else
46116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46117$as_echo "no" >&6; }
46118fi
46119
46120
46121          if test "x$BUILD_STRIP" = x; then
46122            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46123          fi
46124        else
46125          # Otherwise we believe it is a complete path. Use it as it is.
46126          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
46127$as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
46128          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46129$as_echo_n "checking for BUILD_STRIP... " >&6; }
46130          if test ! -x "$tool_specified"; then
46131            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46132$as_echo "not found" >&6; }
46133            as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
46134          fi
46135          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46136$as_echo "$tool_specified" >&6; }
46137        fi
46138      fi
46139    fi
46140
46141  fi
46142
46143
46144
46145  # Only process if variable expands to non-empty
46146
46147  if test "x$BUILD_STRIP" != x; then
46148    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46149
46150  # First separate the path from the arguments. This will split at the first
46151  # space.
46152  complete="$BUILD_STRIP"
46153  path="${complete%% *}"
46154  tmp="$complete EOL"
46155  arguments="${tmp#* }"
46156
46157  # Input might be given as Windows format, start by converting to
46158  # unix format.
46159  new_path=`$CYGPATH -u "$path"`
46160
46161  # Now try to locate executable using which
46162  new_path=`$WHICH "$new_path" 2> /dev/null`
46163  # bat and cmd files are not always considered executable in cygwin causing which
46164  # to not find them
46165  if test "x$new_path" = x \
46166      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46167      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46168    new_path=`$CYGPATH -u "$path"`
46169  fi
46170  if test "x$new_path" = x; then
46171    # Oops. Which didn't find the executable.
46172    # The splitting of arguments from the executable at a space might have been incorrect,
46173    # since paths with space are more likely in Windows. Give it another try with the whole
46174    # argument.
46175    path="$complete"
46176    arguments="EOL"
46177    new_path=`$CYGPATH -u "$path"`
46178    new_path=`$WHICH "$new_path" 2> /dev/null`
46179    # bat and cmd files are not always considered executable in cygwin causing which
46180    # to not find them
46181    if test "x$new_path" = x \
46182        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46183        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46184      new_path=`$CYGPATH -u "$path"`
46185    fi
46186    if test "x$new_path" = x; then
46187      # It's still not found. Now this is an unrecoverable error.
46188      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46189$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46190      has_space=`$ECHO "$complete" | $GREP " "`
46191      if test "x$has_space" != x; then
46192        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46193$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46194      fi
46195      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46196    fi
46197  fi
46198
46199  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46200  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46201  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46202  # "foo.exe" is OK but "foo" is an error.
46203  #
46204  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46205  # It is also a way to make sure we got the proper file name for the real test later on.
46206  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46207  if test "x$test_shortpath" = x; then
46208    # Short path failed, file does not exist as specified.
46209    # Try adding .exe or .cmd
46210    if test -f "${new_path}.exe"; then
46211      input_to_shortpath="${new_path}.exe"
46212    elif test -f "${new_path}.cmd"; then
46213      input_to_shortpath="${new_path}.cmd"
46214    else
46215      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
46216$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
46217      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46218$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46219      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46220    fi
46221  else
46222    input_to_shortpath="$new_path"
46223  fi
46224
46225  # Call helper function which possibly converts this using DOS-style short mode.
46226  # If so, the updated path is stored in $new_path.
46227  new_path="$input_to_shortpath"
46228
46229  input_path="$input_to_shortpath"
46230  # Check if we need to convert this using DOS-style short mode. If the path
46231  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46232  # take no chances and rewrite it.
46233  # Note: m4 eats our [], so we need to use [ and ] instead.
46234  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46235  if test "x$has_forbidden_chars" != x; then
46236    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46237    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46238    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46239    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46240      # Going to short mode and back again did indeed matter. Since short mode is
46241      # case insensitive, let's make it lowercase to improve readability.
46242      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46243      # Now convert it back to Unix-style (cygpath)
46244      input_path=`$CYGPATH -u "$shortmode_path"`
46245      new_path="$input_path"
46246    fi
46247  fi
46248
46249  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46250  if test "x$test_cygdrive_prefix" = x; then
46251    # As a simple fix, exclude /usr/bin since it's not a real path.
46252    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46253      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46254      # a path prefixed by /cygdrive for fixpath to work.
46255      new_path="$CYGWIN_ROOT_PATH$input_path"
46256    fi
46257  fi
46258
46259  # remove trailing .exe if any
46260  new_path="${new_path/%.exe/}"
46261
46262    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46263
46264  # First separate the path from the arguments. This will split at the first
46265  # space.
46266  complete="$BUILD_STRIP"
46267  path="${complete%% *}"
46268  tmp="$complete EOL"
46269  arguments="${tmp#* }"
46270
46271  # Input might be given as Windows format, start by converting to
46272  # unix format.
46273  new_path="$path"
46274
46275  windows_path="$new_path"
46276  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46277    unix_path=`$CYGPATH -u "$windows_path"`
46278    new_path="$unix_path"
46279  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46280    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46281    new_path="$unix_path"
46282  fi
46283
46284
46285  # Now try to locate executable using which
46286  new_path=`$WHICH "$new_path" 2> /dev/null`
46287
46288  if test "x$new_path" = x; then
46289    # Oops. Which didn't find the executable.
46290    # The splitting of arguments from the executable at a space might have been incorrect,
46291    # since paths with space are more likely in Windows. Give it another try with the whole
46292    # argument.
46293    path="$complete"
46294    arguments="EOL"
46295    new_path="$path"
46296
46297  windows_path="$new_path"
46298  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46299    unix_path=`$CYGPATH -u "$windows_path"`
46300    new_path="$unix_path"
46301  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46302    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46303    new_path="$unix_path"
46304  fi
46305
46306
46307    new_path=`$WHICH "$new_path" 2> /dev/null`
46308    # bat and cmd files are not always considered executable in MSYS causing which
46309    # to not find them
46310    if test "x$new_path" = x \
46311        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46312        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46313      new_path="$path"
46314
46315  windows_path="$new_path"
46316  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46317    unix_path=`$CYGPATH -u "$windows_path"`
46318    new_path="$unix_path"
46319  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46320    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46321    new_path="$unix_path"
46322  fi
46323
46324    fi
46325
46326    if test "x$new_path" = x; then
46327      # It's still not found. Now this is an unrecoverable error.
46328      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46329$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46330      has_space=`$ECHO "$complete" | $GREP " "`
46331      if test "x$has_space" != x; then
46332        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46333$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46334      fi
46335      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46336    fi
46337  fi
46338
46339  # Now new_path has a complete unix path to the binary
46340  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46341    # Keep paths in /bin as-is, but remove trailing .exe if any
46342    new_path="${new_path/%.exe/}"
46343    # Do not save /bin paths to all_fixpath_prefixes!
46344  else
46345    # Not in mixed or Windows style, start by that.
46346    new_path=`cmd //c echo $new_path`
46347
46348  input_path="$new_path"
46349  # Check if we need to convert this using DOS-style short mode. If the path
46350  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46351  # take no chances and rewrite it.
46352  # Note: m4 eats our [], so we need to use [ and ] instead.
46353  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46354  if test "x$has_forbidden_chars" != x; then
46355    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46356    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46357  fi
46358
46359    # Output is in $new_path
46360
46361  windows_path="$new_path"
46362  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46363    unix_path=`$CYGPATH -u "$windows_path"`
46364    new_path="$unix_path"
46365  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46366    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46367    new_path="$unix_path"
46368  fi
46369
46370    # remove trailing .exe if any
46371    new_path="${new_path/%.exe/}"
46372
46373    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46374    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46375  fi
46376
46377    else
46378      # We're on a unix platform. Hooray! :)
46379      # First separate the path from the arguments. This will split at the first
46380      # space.
46381      complete="$BUILD_STRIP"
46382      path="${complete%% *}"
46383      tmp="$complete EOL"
46384      arguments="${tmp#* }"
46385
46386      # Cannot rely on the command "which" here since it doesn't always work.
46387      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46388      if test -z "$is_absolute_path"; then
46389        # Path to executable is not absolute. Find it.
46390        IFS_save="$IFS"
46391        IFS=:
46392        for p in $PATH; do
46393          if test -f "$p/$path" && test -x "$p/$path"; then
46394            new_path="$p/$path"
46395            break
46396          fi
46397        done
46398        IFS="$IFS_save"
46399      else
46400        # This is an absolute path, we can use it without further modifications.
46401        new_path="$path"
46402      fi
46403
46404      if test "x$new_path" = x; then
46405        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46406$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46407        has_space=`$ECHO "$complete" | $GREP " "`
46408        if test "x$has_space" != x; then
46409          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46410$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46411        fi
46412        as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46413      fi
46414    fi
46415
46416    # Now join together the path and the arguments once again
46417    if test "x$arguments" != xEOL; then
46418      new_complete="$new_path ${arguments% *}"
46419    else
46420      new_complete="$new_path"
46421    fi
46422
46423    if test "x$complete" != "x$new_complete"; then
46424      BUILD_STRIP="$new_complete"
46425      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
46426$as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
46427    fi
46428  fi
46429
46430    # Assume the C compiler is the assembler
46431    BUILD_AS="$BUILD_CC -c"
46432    # Just like for the target compiler, use the compiler as linker
46433    BUILD_LD="$BUILD_CC"
46434    BUILD_LDCXX="$BUILD_CXX"
46435
46436    PATH="$OLDPATH"
46437  else
46438    # If we are not cross compiling, use the normal target compilers for
46439    # building the build platform executables.
46440    BUILD_CC="$CC"
46441    BUILD_CXX="$CXX"
46442    BUILD_LD="$LD"
46443    BUILD_LDCXX="$LDCXX"
46444    BUILD_NM="$NM"
46445    BUILD_AS="$AS"
46446    BUILD_OBJCOPY="$OBJCOPY"
46447    BUILD_STRIP="$STRIP"
46448    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
46449    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
46450    BUILD_AR="$AR"
46451  fi
46452
46453
46454
46455
46456
46457
46458
46459
46460
46461
46462
46463
46464  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46465    # For hotspot, we need these in Windows mixed path,
46466    # so rewrite them all. Need added .exe suffix.
46467    HOTSPOT_CXX="$CXX.exe"
46468    HOTSPOT_LD="$LD.exe"
46469    HOTSPOT_MT="$MT.exe"
46470    HOTSPOT_RC="$RC.exe"
46471
46472  unix_path="$HOTSPOT_CXX"
46473  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46474    windows_path=`$CYGPATH -m "$unix_path"`
46475    HOTSPOT_CXX="$windows_path"
46476  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46477    windows_path=`cmd //c echo $unix_path`
46478    HOTSPOT_CXX="$windows_path"
46479  fi
46480
46481
46482  unix_path="$HOTSPOT_LD"
46483  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46484    windows_path=`$CYGPATH -m "$unix_path"`
46485    HOTSPOT_LD="$windows_path"
46486  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46487    windows_path=`cmd //c echo $unix_path`
46488    HOTSPOT_LD="$windows_path"
46489  fi
46490
46491
46492  unix_path="$HOTSPOT_MT"
46493  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46494    windows_path=`$CYGPATH -m "$unix_path"`
46495    HOTSPOT_MT="$windows_path"
46496  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46497    windows_path=`cmd //c echo $unix_path`
46498    HOTSPOT_MT="$windows_path"
46499  fi
46500
46501
46502  unix_path="$HOTSPOT_RC"
46503  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46504    windows_path=`$CYGPATH -m "$unix_path"`
46505    HOTSPOT_RC="$windows_path"
46506  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46507    windows_path=`cmd //c echo $unix_path`
46508    HOTSPOT_RC="$windows_path"
46509  fi
46510
46511
46512
46513  else
46514    HOTSPOT_CXX="$CXX"
46515    HOTSPOT_LD="$LD"
46516  fi
46517
46518
46519
46520  if test  "x$TOOLCHAIN_TYPE" = xclang; then
46521    USE_CLANG=true
46522  fi
46523
46524
46525
46526
46527
46528  # The package path is used only on macosx?
46529  # FIXME: clean this up, and/or move it elsewhere.
46530  PACKAGE_PATH=/opt/local
46531
46532
46533  # Check for extra potential brokenness.
46534  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46535    # On Windows, double-check that we got the right compiler.
46536    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
46537    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
46538    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
46539      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
46540        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
46541      fi
46542    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
46543      if test "x$COMPILER_CPU_TEST" != "xx64"; then
46544        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
46545      fi
46546    fi
46547  fi
46548
46549  if test "x$TOOLCHAIN_TYPE" = xgcc; then
46550    # If this is a --hash-style=gnu system, use --hash-style=both, why?
46551    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
46552    # This is later checked when setting flags.
46553
46554    # "-Og" suppported for GCC 4.8 and later
46555    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
46556
46557
46558
46559
46560
46561
46562
46563
46564
46565
46566
46567
46568
46569
46570
46571
46572
46573
46574
46575
46576
46577
46578
46579
46580
46581
46582
46583
46584
46585
46586
46587
46588
46589
46590
46591
46592
46593
46594
46595
46596
46597
46598
46599
46600
46601
46602
46603    # Execute function body
46604
46605
46606
46607
46608
46609
46610
46611
46612
46613
46614
46615
46616
46617
46618
46619
46620
46621
46622
46623
46624
46625
46626
46627
46628
46629
46630
46631
46632
46633
46634
46635
46636
46637
46638
46639
46640
46641
46642
46643
46644
46645
46646
46647
46648
46649
46650
46651
46652    # Execute function body
46653
46654  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
46655$as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
46656  supports=yes
46657
46658  saved_cflags="$CFLAGS"
46659  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
46660  ac_ext=c
46661ac_cpp='$CPP $CPPFLAGS'
46662ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46663ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46664ac_compiler_gnu=$ac_cv_c_compiler_gnu
46665
46666  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46667/* end confdefs.h.  */
46668int i;
46669_ACEOF
46670if ac_fn_c_try_compile "$LINENO"; then :
46671
46672else
46673  supports=no
46674fi
46675rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46676  ac_ext=cpp
46677ac_cpp='$CXXCPP $CPPFLAGS'
46678ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46679ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46680ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46681
46682  CFLAGS="$saved_cflags"
46683
46684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46685$as_echo "$supports" >&6; }
46686  if test "x$supports" = "xyes" ; then
46687    :
46688    C_COMP_SUPPORTS="yes"
46689  else
46690    :
46691    C_COMP_SUPPORTS="no"
46692  fi
46693
46694
46695
46696
46697
46698
46699
46700
46701
46702
46703
46704
46705
46706
46707
46708
46709
46710
46711
46712
46713
46714
46715
46716
46717
46718
46719
46720
46721
46722
46723
46724
46725
46726
46727
46728
46729
46730
46731
46732
46733
46734
46735
46736
46737
46738
46739
46740
46741
46742
46743
46744
46745
46746
46747
46748
46749
46750
46751
46752    # Execute function body
46753
46754  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
46755$as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
46756  supports=yes
46757
46758  saved_cxxflags="$CXXFLAGS"
46759  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
46760  ac_ext=cpp
46761ac_cpp='$CXXCPP $CPPFLAGS'
46762ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46763ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46764ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46765
46766  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46767/* end confdefs.h.  */
46768int i;
46769_ACEOF
46770if ac_fn_cxx_try_compile "$LINENO"; then :
46771
46772else
46773  supports=no
46774fi
46775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46776  ac_ext=cpp
46777ac_cpp='$CXXCPP $CPPFLAGS'
46778ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46779ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46780ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46781
46782  CXXFLAGS="$saved_cxxflags"
46783
46784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46785$as_echo "$supports" >&6; }
46786  if test "x$supports" = "xyes" ; then
46787    :
46788    CXX_COMP_SUPPORTS="yes"
46789  else
46790    :
46791    CXX_COMP_SUPPORTS="no"
46792  fi
46793
46794
46795
46796
46797
46798
46799
46800
46801
46802
46803
46804
46805
46806  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
46807$as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
46808  supports=no
46809  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
46810
46811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46812$as_echo "$supports" >&6; }
46813  if test "x$supports" = "xyes" ; then
46814    :
46815    HAS_CFLAG_OPTIMIZE_DEBUG=true
46816  else
46817    :
46818    HAS_CFLAG_OPTIMIZE_DEBUG=false
46819  fi
46820
46821
46822
46823
46824
46825
46826
46827    # "-z relro" supported in GNU binutils 2.17 and later
46828    LINKER_RELRO_FLAG="-Wl,-z,relro"
46829
46830
46831
46832
46833
46834
46835
46836
46837
46838
46839
46840
46841
46842
46843
46844
46845
46846
46847
46848
46849
46850
46851
46852
46853
46854
46855
46856
46857
46858
46859
46860
46861
46862
46863
46864
46865
46866
46867
46868
46869
46870
46871
46872
46873
46874
46875
46876    # Execute function body
46877
46878  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
46879$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
46880  supports=yes
46881
46882  saved_ldflags="$LDFLAGS"
46883  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
46884  ac_ext=c
46885ac_cpp='$CPP $CPPFLAGS'
46886ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46887ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46888ac_compiler_gnu=$ac_cv_c_compiler_gnu
46889
46890  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46891/* end confdefs.h.  */
46892
46893int
46894main ()
46895{
46896
46897  ;
46898  return 0;
46899}
46900_ACEOF
46901if ac_fn_c_try_link "$LINENO"; then :
46902
46903else
46904  supports=no
46905fi
46906rm -f core conftest.err conftest.$ac_objext \
46907    conftest$ac_exeext conftest.$ac_ext
46908  ac_ext=cpp
46909ac_cpp='$CXXCPP $CPPFLAGS'
46910ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46911ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46912ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46913
46914  LDFLAGS="$saved_ldflags"
46915
46916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46917$as_echo "$supports" >&6; }
46918  if test "x$supports" = "xyes" ; then
46919    :
46920    HAS_LINKER_RELRO=true
46921  else
46922    :
46923    HAS_LINKER_RELRO=false
46924  fi
46925
46926
46927
46928
46929
46930
46931
46932
46933
46934
46935
46936
46937
46938    # "-z now" supported in GNU binutils 2.11 and later
46939    LINKER_NOW_FLAG="-Wl,-z,now"
46940
46941
46942
46943
46944
46945
46946
46947
46948
46949
46950
46951
46952
46953
46954
46955
46956
46957
46958
46959
46960
46961
46962
46963
46964
46965
46966
46967
46968
46969
46970
46971
46972
46973
46974
46975
46976
46977
46978
46979
46980
46981
46982
46983
46984
46985
46986
46987    # Execute function body
46988
46989  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
46990$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
46991  supports=yes
46992
46993  saved_ldflags="$LDFLAGS"
46994  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
46995  ac_ext=c
46996ac_cpp='$CPP $CPPFLAGS'
46997ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46998ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46999ac_compiler_gnu=$ac_cv_c_compiler_gnu
47000
47001  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47002/* end confdefs.h.  */
47003
47004int
47005main ()
47006{
47007
47008  ;
47009  return 0;
47010}
47011_ACEOF
47012if ac_fn_c_try_link "$LINENO"; then :
47013
47014else
47015  supports=no
47016fi
47017rm -f core conftest.err conftest.$ac_objext \
47018    conftest$ac_exeext conftest.$ac_ext
47019  ac_ext=cpp
47020ac_cpp='$CXXCPP $CPPFLAGS'
47021ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47022ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47023ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47024
47025  LDFLAGS="$saved_ldflags"
47026
47027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47028$as_echo "$supports" >&6; }
47029  if test "x$supports" = "xyes" ; then
47030    :
47031    HAS_LINKER_NOW=true
47032  else
47033    :
47034    HAS_LINKER_NOW=false
47035  fi
47036
47037
47038
47039
47040
47041
47042
47043
47044
47045
47046
47047
47048  fi
47049
47050  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
47051  # in executable.'
47052  USING_BROKEN_SUSE_LD=no
47053  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
47054    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
47055$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
47056    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
47057    $ECHO "int main() { }" > main.c
47058    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
47059      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47060$as_echo "no" >&6; }
47061      USING_BROKEN_SUSE_LD=no
47062    else
47063      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47064$as_echo "yes" >&6; }
47065      USING_BROKEN_SUSE_LD=yes
47066    fi
47067    rm -rf version-script.map main.c a.out
47068  fi
47069
47070
47071  # Setup hotspot lecagy names for toolchains
47072  HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
47073  if test "x$TOOLCHAIN_TYPE" = xclang; then
47074    HOTSPOT_TOOLCHAIN_TYPE=gcc
47075  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47076    HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
47077  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47078    HOTSPOT_TOOLCHAIN_TYPE=visCPP
47079  fi
47080
47081
47082
47083# Setup the JTReg Regression Test Harness.
47084
47085
47086# Check whether --with-jtreg was given.
47087if test "${with_jtreg+set}" = set; then :
47088  withval=$with_jtreg;
47089else
47090  with_jtreg=no
47091fi
47092
47093
47094  if test "x$with_jtreg" = xno; then
47095    # jtreg disabled
47096    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47097$as_echo_n "checking for jtreg... " >&6; }
47098    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47099$as_echo "no" >&6; }
47100  else
47101    if test "x$with_jtreg" != xyes; then
47102      # with path specified.
47103      JT_HOME="$with_jtreg"
47104    fi
47105
47106    if test "x$JT_HOME" != x; then
47107      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47108$as_echo_n "checking for jtreg... " >&6; }
47109
47110      # use JT_HOME enviroment var.
47111
47112  # Only process if variable expands to non-empty
47113
47114  if test "x$JT_HOME" != x; then
47115    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47116
47117  # Input might be given as Windows format, start by converting to
47118  # unix format.
47119  path="$JT_HOME"
47120  new_path=`$CYGPATH -u "$path"`
47121
47122  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47123  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47124  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47125  # "foo.exe" is OK but "foo" is an error.
47126  #
47127  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47128  # It is also a way to make sure we got the proper file name for the real test later on.
47129  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47130  if test "x$test_shortpath" = x; then
47131    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47132$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
47133    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
47134  fi
47135
47136  # Call helper function which possibly converts this using DOS-style short mode.
47137  # If so, the updated path is stored in $new_path.
47138
47139  input_path="$new_path"
47140  # Check if we need to convert this using DOS-style short mode. If the path
47141  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47142  # take no chances and rewrite it.
47143  # Note: m4 eats our [], so we need to use [ and ] instead.
47144  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47145  if test "x$has_forbidden_chars" != x; then
47146    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47147    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47148    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47149    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47150      # Going to short mode and back again did indeed matter. Since short mode is
47151      # case insensitive, let's make it lowercase to improve readability.
47152      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47153      # Now convert it back to Unix-style (cygpath)
47154      input_path=`$CYGPATH -u "$shortmode_path"`
47155      new_path="$input_path"
47156    fi
47157  fi
47158
47159  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47160  if test "x$test_cygdrive_prefix" = x; then
47161    # As a simple fix, exclude /usr/bin since it's not a real path.
47162    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47163      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47164      # a path prefixed by /cygdrive for fixpath to work.
47165      new_path="$CYGWIN_ROOT_PATH$input_path"
47166    fi
47167  fi
47168
47169
47170  if test "x$path" != "x$new_path"; then
47171    JT_HOME="$new_path"
47172    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47173$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47174  fi
47175
47176    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47177
47178  path="$JT_HOME"
47179  has_colon=`$ECHO $path | $GREP ^.:`
47180  new_path="$path"
47181  if test "x$has_colon" = x; then
47182    # Not in mixed or Windows style, start by that.
47183    new_path=`cmd //c echo $path`
47184  fi
47185
47186
47187  input_path="$new_path"
47188  # Check if we need to convert this using DOS-style short mode. If the path
47189  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47190  # take no chances and rewrite it.
47191  # Note: m4 eats our [], so we need to use [ and ] instead.
47192  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47193  if test "x$has_forbidden_chars" != x; then
47194    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47195    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47196  fi
47197
47198
47199  windows_path="$new_path"
47200  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47201    unix_path=`$CYGPATH -u "$windows_path"`
47202    new_path="$unix_path"
47203  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47204    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47205    new_path="$unix_path"
47206  fi
47207
47208  if test "x$path" != "x$new_path"; then
47209    JT_HOME="$new_path"
47210    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47211$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47212  fi
47213
47214  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47215  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47216
47217    else
47218      # We're on a unix platform. Hooray! :)
47219      path="$JT_HOME"
47220      has_space=`$ECHO "$path" | $GREP " "`
47221      if test "x$has_space" != x; then
47222        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47223$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
47224        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47225      fi
47226
47227      # Use eval to expand a potential ~
47228      eval path="$path"
47229      if test ! -f "$path" && test ! -d "$path"; then
47230        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
47231      fi
47232
47233      if test -d "$path"; then
47234        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
47235      else
47236        dir="`$DIRNAME "$path"`"
47237        base="`$BASENAME "$path"`"
47238        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
47239      fi
47240    fi
47241  fi
47242
47243
47244      # jtreg win32 script works for everybody
47245      JTREGEXE="$JT_HOME/bin/jtreg"
47246
47247      if test ! -f "$JTREGEXE"; then
47248        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
47249      fi
47250
47251      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
47252$as_echo "$JTREGEXE" >&6; }
47253    else
47254      # try to find jtreg on path
47255
47256
47257
47258  # Publish this variable in the help.
47259
47260
47261  if [ -z "${JTREGEXE+x}" ]; then
47262    # The variable is not set by user, try to locate tool using the code snippet
47263    for ac_prog in jtreg
47264do
47265  # Extract the first word of "$ac_prog", so it can be a program name with args.
47266set dummy $ac_prog; ac_word=$2
47267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47268$as_echo_n "checking for $ac_word... " >&6; }
47269if ${ac_cv_path_JTREGEXE+:} false; then :
47270  $as_echo_n "(cached) " >&6
47271else
47272  case $JTREGEXE in
47273  [\\/]* | ?:[\\/]*)
47274  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
47275  ;;
47276  *)
47277  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47278for as_dir in $PATH
47279do
47280  IFS=$as_save_IFS
47281  test -z "$as_dir" && as_dir=.
47282    for ac_exec_ext in '' $ac_executable_extensions; do
47283  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47284    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
47285    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47286    break 2
47287  fi
47288done
47289  done
47290IFS=$as_save_IFS
47291
47292  ;;
47293esac
47294fi
47295JTREGEXE=$ac_cv_path_JTREGEXE
47296if test -n "$JTREGEXE"; then
47297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
47298$as_echo "$JTREGEXE" >&6; }
47299else
47300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47301$as_echo "no" >&6; }
47302fi
47303
47304
47305  test -n "$JTREGEXE" && break
47306done
47307
47308  else
47309    # The variable is set, but is it from the command line or the environment?
47310
47311    # Try to remove the string !JTREGEXE! from our list.
47312    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
47313    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
47314      # If it failed, the variable was not from the command line. Ignore it,
47315      # but warn the user (except for BASH, which is always set by the calling BASH).
47316      if test "xJTREGEXE" != xBASH; then
47317        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
47318$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
47319      fi
47320      # Try to locate tool using the code snippet
47321      for ac_prog in jtreg
47322do
47323  # Extract the first word of "$ac_prog", so it can be a program name with args.
47324set dummy $ac_prog; ac_word=$2
47325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47326$as_echo_n "checking for $ac_word... " >&6; }
47327if ${ac_cv_path_JTREGEXE+:} false; then :
47328  $as_echo_n "(cached) " >&6
47329else
47330  case $JTREGEXE in
47331  [\\/]* | ?:[\\/]*)
47332  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
47333  ;;
47334  *)
47335  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47336for as_dir in $PATH
47337do
47338  IFS=$as_save_IFS
47339  test -z "$as_dir" && as_dir=.
47340    for ac_exec_ext in '' $ac_executable_extensions; do
47341  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47342    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
47343    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47344    break 2
47345  fi
47346done
47347  done
47348IFS=$as_save_IFS
47349
47350  ;;
47351esac
47352fi
47353JTREGEXE=$ac_cv_path_JTREGEXE
47354if test -n "$JTREGEXE"; then
47355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
47356$as_echo "$JTREGEXE" >&6; }
47357else
47358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47359$as_echo "no" >&6; }
47360fi
47361
47362
47363  test -n "$JTREGEXE" && break
47364done
47365
47366    else
47367      # If it succeeded, then it was overridden by the user. We will use it
47368      # for the tool.
47369
47370      # First remove it from the list of overridden variables, so we can test
47371      # for unknown variables in the end.
47372      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
47373
47374      # Check if we try to supply an empty value
47375      if test "x$JTREGEXE" = x; then
47376        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
47377$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
47378        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
47379$as_echo_n "checking for JTREGEXE... " >&6; }
47380        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
47381$as_echo "disabled" >&6; }
47382      else
47383        # Check if the provided tool contains a complete path.
47384        tool_specified="$JTREGEXE"
47385        tool_basename="${tool_specified##*/}"
47386        if test "x$tool_basename" = "x$tool_specified"; then
47387          # A command without a complete path is provided, search $PATH.
47388          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
47389$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
47390          # Extract the first word of "$tool_basename", so it can be a program name with args.
47391set dummy $tool_basename; ac_word=$2
47392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47393$as_echo_n "checking for $ac_word... " >&6; }
47394if ${ac_cv_path_JTREGEXE+:} false; then :
47395  $as_echo_n "(cached) " >&6
47396else
47397  case $JTREGEXE in
47398  [\\/]* | ?:[\\/]*)
47399  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
47400  ;;
47401  *)
47402  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47403for as_dir in $PATH
47404do
47405  IFS=$as_save_IFS
47406  test -z "$as_dir" && as_dir=.
47407    for ac_exec_ext in '' $ac_executable_extensions; do
47408  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47409    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
47410    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47411    break 2
47412  fi
47413done
47414  done
47415IFS=$as_save_IFS
47416
47417  ;;
47418esac
47419fi
47420JTREGEXE=$ac_cv_path_JTREGEXE
47421if test -n "$JTREGEXE"; then
47422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
47423$as_echo "$JTREGEXE" >&6; }
47424else
47425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47426$as_echo "no" >&6; }
47427fi
47428
47429
47430          if test "x$JTREGEXE" = x; then
47431            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
47432          fi
47433        else
47434          # Otherwise we believe it is a complete path. Use it as it is.
47435          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
47436$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
47437          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
47438$as_echo_n "checking for JTREGEXE... " >&6; }
47439          if test ! -x "$tool_specified"; then
47440            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
47441$as_echo "not found" >&6; }
47442            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
47443          fi
47444          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
47445$as_echo "$tool_specified" >&6; }
47446        fi
47447      fi
47448    fi
47449
47450  fi
47451
47452
47453
47454  if test "x$JTREGEXE" = x; then
47455    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
47456  fi
47457
47458
47459      JT_HOME="`$DIRNAME $JTREGEXE`"
47460    fi
47461  fi
47462
47463
47464
47465
47466
47467
47468  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
47469  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
47470  # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
47471  #                              commands produced by the link step (currently AIX only)
47472  if test "x$TOOLCHAIN_TYPE" = xxlc; then
47473    COMPILER_TARGET_BITS_FLAG="-q"
47474    COMPILER_COMMAND_FILE_FLAG="-f"
47475    COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
47476  else
47477    COMPILER_TARGET_BITS_FLAG="-m"
47478    COMPILER_COMMAND_FILE_FLAG="@"
47479    COMPILER_BINDCMD_FILE_FLAG=""
47480
47481    # The solstudio linker does not support @-files.
47482    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47483      COMPILER_COMMAND_FILE_FLAG=
47484    fi
47485
47486    # Check if @file is supported by gcc
47487    if test "x$TOOLCHAIN_TYPE" = xgcc; then
47488      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
47489$as_echo_n "checking if @file is supported by gcc... " >&6; }
47490      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
47491      $ECHO "" "--version" > command.file
47492      if $CXX @command.file 2>&5 >&5; then
47493        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47494$as_echo "yes" >&6; }
47495        COMPILER_COMMAND_FILE_FLAG="@"
47496      else
47497        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47498$as_echo "no" >&6; }
47499        COMPILER_COMMAND_FILE_FLAG=
47500      fi
47501      rm -rf command.file
47502    fi
47503  fi
47504
47505
47506
47507
47508  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
47509  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
47510    ARFLAGS="-r"
47511  elif test "x$OPENJDK_TARGET_OS" = xaix; then
47512    ARFLAGS="-X64"
47513  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
47514    # lib.exe is used as AR to create static libraries.
47515    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
47516  else
47517    ARFLAGS=""
47518  fi
47519
47520
47521  ## Setup strip.
47522  # FIXME: should this really be per platform, or should it be per toolchain type?
47523  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
47524  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
47525  if test "x$OPENJDK_TARGET_OS" = xlinux; then
47526    STRIPFLAGS="-g"
47527  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
47528    STRIPFLAGS="-x"
47529  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
47530    STRIPFLAGS="-S"
47531  elif test "x$OPENJDK_TARGET_OS" = xaix; then
47532    STRIPFLAGS="-X32_64"
47533  fi
47534
47535
47536
47537  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47538    CC_OUT_OPTION=-Fo
47539    EXE_OUT_OPTION=-out:
47540    LD_OUT_OPTION=-out:
47541    AR_OUT_OPTION=-out:
47542  else
47543    # The option used to specify the target .o,.a or .so file.
47544    # When compiling, how to specify the to be created object file.
47545    CC_OUT_OPTION='-o$(SPACE)'
47546    # When linking, how to specify the to be created executable.
47547    EXE_OUT_OPTION='-o$(SPACE)'
47548    # When linking, how to specify the to be created dynamically linkable library.
47549    LD_OUT_OPTION='-o$(SPACE)'
47550    # When archiving, how to specify the to be create static archive for object files.
47551    AR_OUT_OPTION='rcs$(SPACE)'
47552  fi
47553
47554
47555
47556
47557
47558  # On Windows, we need to set RC flags.
47559  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47560    RC_FLAGS="-nologo -l0x409"
47561    JVM_RCFLAGS="-nologo"
47562    if test "x$DEBUG_LEVEL" = xrelease; then
47563      RC_FLAGS="$RC_FLAGS -DNDEBUG"
47564      JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
47565    fi
47566
47567    # The version variables used to create RC_FLAGS may be overridden
47568    # in a custom configure script, or possibly the command line.
47569    # Let those variables be expanded at make time in spec.gmk.
47570    # The \$ are escaped to the shell, and the $(...) variables
47571    # are evaluated by make.
47572    RC_FLAGS="$RC_FLAGS \
47573        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
47574        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
47575        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
47576        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
47577        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
47578        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
47579        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
47580
47581    JVM_RCFLAGS="$JVM_RCFLAGS \
47582        -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
47583        -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
47584        -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
47585        -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
47586        -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
47587        -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
47588        -D\"HS_FNAME=jvm.dll\" \
47589        -D\"HS_INTERNAL_NAME=jvm\""
47590  fi
47591
47592
47593
47594  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47595    # silence copyright notice and other headers.
47596    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
47597  fi
47598
47599
47600# Now we can test some aspects on the target using configure macros.
47601
47602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
47603$as_echo_n "checking for ANSI C header files... " >&6; }
47604if ${ac_cv_header_stdc+:} false; then :
47605  $as_echo_n "(cached) " >&6
47606else
47607  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47608/* end confdefs.h.  */
47609#include <stdlib.h>
47610#include <stdarg.h>
47611#include <string.h>
47612#include <float.h>
47613
47614int
47615main ()
47616{
47617
47618  ;
47619  return 0;
47620}
47621_ACEOF
47622if ac_fn_cxx_try_compile "$LINENO"; then :
47623  ac_cv_header_stdc=yes
47624else
47625  ac_cv_header_stdc=no
47626fi
47627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47628
47629if test $ac_cv_header_stdc = yes; then
47630  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
47631  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47632/* end confdefs.h.  */
47633#include <string.h>
47634
47635_ACEOF
47636if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
47637  $EGREP "memchr" >/dev/null 2>&1; then :
47638
47639else
47640  ac_cv_header_stdc=no
47641fi
47642rm -f conftest*
47643
47644fi
47645
47646if test $ac_cv_header_stdc = yes; then
47647  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
47648  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47649/* end confdefs.h.  */
47650#include <stdlib.h>
47651
47652_ACEOF
47653if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
47654  $EGREP "free" >/dev/null 2>&1; then :
47655
47656else
47657  ac_cv_header_stdc=no
47658fi
47659rm -f conftest*
47660
47661fi
47662
47663if test $ac_cv_header_stdc = yes; then
47664  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
47665  if test "$cross_compiling" = yes; then :
47666  :
47667else
47668  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47669/* end confdefs.h.  */
47670#include <ctype.h>
47671#include <stdlib.h>
47672#if ((' ' & 0x0FF) == 0x020)
47673# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
47674# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
47675#else
47676# define ISLOWER(c) \
47677		   (('a' <= (c) && (c) <= 'i') \
47678		     || ('j' <= (c) && (c) <= 'r') \
47679		     || ('s' <= (c) && (c) <= 'z'))
47680# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
47681#endif
47682
47683#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
47684int
47685main ()
47686{
47687  int i;
47688  for (i = 0; i < 256; i++)
47689    if (XOR (islower (i), ISLOWER (i))
47690	|| toupper (i) != TOUPPER (i))
47691      return 2;
47692  return 0;
47693}
47694_ACEOF
47695if ac_fn_cxx_try_run "$LINENO"; then :
47696
47697else
47698  ac_cv_header_stdc=no
47699fi
47700rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
47701  conftest.$ac_objext conftest.beam conftest.$ac_ext
47702fi
47703
47704fi
47705fi
47706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
47707$as_echo "$ac_cv_header_stdc" >&6; }
47708if test $ac_cv_header_stdc = yes; then
47709
47710$as_echo "#define STDC_HEADERS 1" >>confdefs.h
47711
47712fi
47713
47714# On IRIX 5.3, sys/types and inttypes.h are conflicting.
47715for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
47716		  inttypes.h stdint.h unistd.h
47717do :
47718  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
47719ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
47720"
47721if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
47722  cat >>confdefs.h <<_ACEOF
47723#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
47724_ACEOF
47725
47726fi
47727
47728done
47729
47730
47731
47732  ###############################################################################
47733  #
47734  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
47735  # (The JVM can use 32 or 64 bit Java pointers but that decision
47736  # is made at runtime.)
47737  #
47738
47739  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
47740    # Always specify -m flag on Solaris
47741    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
47742
47743  # When we add flags to the "official" CFLAGS etc, we need to
47744  # keep track of these additions in ADDED_CFLAGS etc. These
47745  # will later be checked to make sure only controlled additions
47746  # have been made to CFLAGS etc.
47747  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47748  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47749  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47750
47751  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
47752  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
47753  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
47754
47755  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
47756  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
47757  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
47758
47759  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
47760  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
47761  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
47762
47763  elif test "x$COMPILE_TYPE" = xreduced; then
47764    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
47765      # Specify -m if running reduced on unix platforms
47766
47767  # When we add flags to the "official" CFLAGS etc, we need to
47768  # keep track of these additions in ADDED_CFLAGS etc. These
47769  # will later be checked to make sure only controlled additions
47770  # have been made to CFLAGS etc.
47771  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47772  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47773  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47774
47775  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
47776  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
47777  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
47778
47779  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
47780  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
47781  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
47782
47783  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
47784  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
47785  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
47786
47787    fi
47788  fi
47789  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
47790    JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47791    JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47792    JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47793  fi
47794
47795  # Make compilation sanity check
47796  for ac_header in stdio.h
47797do :
47798  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
47799if test "x$ac_cv_header_stdio_h" = xyes; then :
47800  cat >>confdefs.h <<_ACEOF
47801#define HAVE_STDIO_H 1
47802_ACEOF
47803
47804else
47805
47806    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
47807$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
47808    if test "x$COMPILE_TYPE" = xreduced; then
47809
47810  # Print a helpful message on how to acquire the necessary build dependency.
47811  # reduced is the help tag: freetype, cups, alsa etc
47812  MISSING_DEPENDENCY=reduced
47813
47814  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47815    cygwin_help $MISSING_DEPENDENCY
47816  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47817    msys_help $MISSING_DEPENDENCY
47818  else
47819    PKGHANDLER_COMMAND=
47820
47821    case $PKGHANDLER in
47822      apt-get)
47823        apt_help     $MISSING_DEPENDENCY ;;
47824      yum)
47825        yum_help     $MISSING_DEPENDENCY ;;
47826      port)
47827        port_help    $MISSING_DEPENDENCY ;;
47828      pkgutil)
47829        pkgutil_help $MISSING_DEPENDENCY ;;
47830      pkgadd)
47831        pkgadd_help  $MISSING_DEPENDENCY ;;
47832    esac
47833
47834    if test "x$PKGHANDLER_COMMAND" != x; then
47835      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47836    fi
47837  fi
47838
47839      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
47840$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
47841    elif test "x$COMPILE_TYPE" = xcross; then
47842      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
47843$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
47844    fi
47845    as_fn_error $? "Cannot continue." "$LINENO" 5
47846
47847fi
47848
47849done
47850
47851
47852  # The cast to long int works around a bug in the HP C Compiler
47853# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
47854# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
47855# This bug is HP SR number 8606223364.
47856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
47857$as_echo_n "checking size of int *... " >&6; }
47858if ${ac_cv_sizeof_int_p+:} false; then :
47859  $as_echo_n "(cached) " >&6
47860else
47861  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
47862
47863else
47864  if test "$ac_cv_type_int_p" = yes; then
47865     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
47866$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
47867as_fn_error 77 "cannot compute sizeof (int *)
47868See \`config.log' for more details" "$LINENO" 5; }
47869   else
47870     ac_cv_sizeof_int_p=0
47871   fi
47872fi
47873
47874fi
47875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
47876$as_echo "$ac_cv_sizeof_int_p" >&6; }
47877
47878
47879
47880cat >>confdefs.h <<_ACEOF
47881#define SIZEOF_INT_P $ac_cv_sizeof_int_p
47882_ACEOF
47883
47884
47885
47886  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
47887  if test "x$ac_cv_sizeof_int_p" = x; then
47888    # The test failed, lets stick to the assumed value.
47889    { $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
47890$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
47891  else
47892    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
47893
47894    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
47895      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
47896      # Let's try to implicitely set the compilers target architecture and retry the test
47897      { $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
47898$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;}
47899      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
47900$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
47901
47902  # When we add flags to the "official" CFLAGS etc, we need to
47903  # keep track of these additions in ADDED_CFLAGS etc. These
47904  # will later be checked to make sure only controlled additions
47905  # have been made to CFLAGS etc.
47906  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47907  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47908  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47909
47910  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
47911  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
47912  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
47913
47914  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
47915  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
47916  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
47917
47918  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
47919  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
47920  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
47921
47922
47923      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
47924      unset ac_cv_sizeof_int_p
47925      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
47926      cat >>confdefs.h <<_ACEOF
47927#undef SIZEOF_INT_P
47928_ACEOF
47929
47930      # The cast to long int works around a bug in the HP C Compiler
47931# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
47932# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
47933# This bug is HP SR number 8606223364.
47934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
47935$as_echo_n "checking size of int *... " >&6; }
47936if ${ac_cv_sizeof_int_p+:} false; then :
47937  $as_echo_n "(cached) " >&6
47938else
47939  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
47940
47941else
47942  if test "$ac_cv_type_int_p" = yes; then
47943     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
47944$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
47945as_fn_error 77 "cannot compute sizeof (int *)
47946See \`config.log' for more details" "$LINENO" 5; }
47947   else
47948     ac_cv_sizeof_int_p=0
47949   fi
47950fi
47951
47952fi
47953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
47954$as_echo "$ac_cv_sizeof_int_p" >&6; }
47955
47956
47957
47958cat >>confdefs.h <<_ACEOF
47959#define SIZEOF_INT_P $ac_cv_sizeof_int_p
47960_ACEOF
47961
47962
47963
47964      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
47965
47966      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
47967        { $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
47968$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;}
47969        if test "x$COMPILE_TYPE" = xreduced; then
47970
47971  # Print a helpful message on how to acquire the necessary build dependency.
47972  # reduced is the help tag: freetype, cups, alsa etc
47973  MISSING_DEPENDENCY=reduced
47974
47975  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47976    cygwin_help $MISSING_DEPENDENCY
47977  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47978    msys_help $MISSING_DEPENDENCY
47979  else
47980    PKGHANDLER_COMMAND=
47981
47982    case $PKGHANDLER in
47983      apt-get)
47984        apt_help     $MISSING_DEPENDENCY ;;
47985      yum)
47986        yum_help     $MISSING_DEPENDENCY ;;
47987      port)
47988        port_help    $MISSING_DEPENDENCY ;;
47989      pkgutil)
47990        pkgutil_help $MISSING_DEPENDENCY ;;
47991      pkgadd)
47992        pkgadd_help  $MISSING_DEPENDENCY ;;
47993    esac
47994
47995    if test "x$PKGHANDLER_COMMAND" != x; then
47996      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47997    fi
47998  fi
47999
48000          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48001$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48002        elif test "x$COMPILE_TYPE" = xcross; then
48003          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48004$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48005        fi
48006        as_fn_error $? "Cannot continue." "$LINENO" 5
48007      fi
48008    fi
48009  fi
48010
48011  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
48012$as_echo_n "checking for target address size... " >&6; }
48013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
48014$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
48015
48016
48017  ###############################################################################
48018  #
48019  # Is the target little of big endian?
48020  #
48021   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
48022$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
48023if ${ac_cv_c_bigendian+:} false; then :
48024  $as_echo_n "(cached) " >&6
48025else
48026  ac_cv_c_bigendian=unknown
48027    # See if we're dealing with a universal compiler.
48028    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48029/* end confdefs.h.  */
48030#ifndef __APPLE_CC__
48031	       not a universal capable compiler
48032	     #endif
48033	     typedef int dummy;
48034
48035_ACEOF
48036if ac_fn_cxx_try_compile "$LINENO"; then :
48037
48038	# Check for potential -arch flags.  It is not universal unless
48039	# there are at least two -arch flags with different values.
48040	ac_arch=
48041	ac_prev=
48042	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
48043	 if test -n "$ac_prev"; then
48044	   case $ac_word in
48045	     i?86 | x86_64 | ppc | ppc64)
48046	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
48047		 ac_arch=$ac_word
48048	       else
48049		 ac_cv_c_bigendian=universal
48050		 break
48051	       fi
48052	       ;;
48053	   esac
48054	   ac_prev=
48055	 elif test "x$ac_word" = "x-arch"; then
48056	   ac_prev=arch
48057	 fi
48058       done
48059fi
48060rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48061    if test $ac_cv_c_bigendian = unknown; then
48062      # See if sys/param.h defines the BYTE_ORDER macro.
48063      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48064/* end confdefs.h.  */
48065#include <sys/types.h>
48066	     #include <sys/param.h>
48067
48068int
48069main ()
48070{
48071#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
48072		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
48073		     && LITTLE_ENDIAN)
48074	      bogus endian macros
48075	     #endif
48076
48077  ;
48078  return 0;
48079}
48080_ACEOF
48081if ac_fn_cxx_try_compile "$LINENO"; then :
48082  # It does; now see whether it defined to BIG_ENDIAN or not.
48083	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48084/* end confdefs.h.  */
48085#include <sys/types.h>
48086		#include <sys/param.h>
48087
48088int
48089main ()
48090{
48091#if BYTE_ORDER != BIG_ENDIAN
48092		 not big endian
48093		#endif
48094
48095  ;
48096  return 0;
48097}
48098_ACEOF
48099if ac_fn_cxx_try_compile "$LINENO"; then :
48100  ac_cv_c_bigendian=yes
48101else
48102  ac_cv_c_bigendian=no
48103fi
48104rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48105fi
48106rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48107    fi
48108    if test $ac_cv_c_bigendian = unknown; then
48109      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
48110      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48111/* end confdefs.h.  */
48112#include <limits.h>
48113
48114int
48115main ()
48116{
48117#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
48118	      bogus endian macros
48119	     #endif
48120
48121  ;
48122  return 0;
48123}
48124_ACEOF
48125if ac_fn_cxx_try_compile "$LINENO"; then :
48126  # It does; now see whether it defined to _BIG_ENDIAN or not.
48127	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48128/* end confdefs.h.  */
48129#include <limits.h>
48130
48131int
48132main ()
48133{
48134#ifndef _BIG_ENDIAN
48135		 not big endian
48136		#endif
48137
48138  ;
48139  return 0;
48140}
48141_ACEOF
48142if ac_fn_cxx_try_compile "$LINENO"; then :
48143  ac_cv_c_bigendian=yes
48144else
48145  ac_cv_c_bigendian=no
48146fi
48147rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48148fi
48149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48150    fi
48151    if test $ac_cv_c_bigendian = unknown; then
48152      # Compile a test program.
48153      if test "$cross_compiling" = yes; then :
48154  # Try to guess by grepping values from an object file.
48155	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48156/* end confdefs.h.  */
48157short int ascii_mm[] =
48158		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
48159		short int ascii_ii[] =
48160		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
48161		int use_ascii (int i) {
48162		  return ascii_mm[i] + ascii_ii[i];
48163		}
48164		short int ebcdic_ii[] =
48165		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
48166		short int ebcdic_mm[] =
48167		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
48168		int use_ebcdic (int i) {
48169		  return ebcdic_mm[i] + ebcdic_ii[i];
48170		}
48171		extern int foo;
48172
48173int
48174main ()
48175{
48176return use_ascii (foo) == use_ebcdic (foo);
48177  ;
48178  return 0;
48179}
48180_ACEOF
48181if ac_fn_cxx_try_compile "$LINENO"; then :
48182  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
48183	      ac_cv_c_bigendian=yes
48184	    fi
48185	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
48186	      if test "$ac_cv_c_bigendian" = unknown; then
48187		ac_cv_c_bigendian=no
48188	      else
48189		# finding both strings is unlikely to happen, but who knows?
48190		ac_cv_c_bigendian=unknown
48191	      fi
48192	    fi
48193fi
48194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48195else
48196  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48197/* end confdefs.h.  */
48198$ac_includes_default
48199int
48200main ()
48201{
48202
48203	     /* Are we little or big endian?  From Harbison&Steele.  */
48204	     union
48205	     {
48206	       long int l;
48207	       char c[sizeof (long int)];
48208	     } u;
48209	     u.l = 1;
48210	     return u.c[sizeof (long int) - 1] == 1;
48211
48212  ;
48213  return 0;
48214}
48215_ACEOF
48216if ac_fn_cxx_try_run "$LINENO"; then :
48217  ac_cv_c_bigendian=no
48218else
48219  ac_cv_c_bigendian=yes
48220fi
48221rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48222  conftest.$ac_objext conftest.beam conftest.$ac_ext
48223fi
48224
48225    fi
48226fi
48227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
48228$as_echo "$ac_cv_c_bigendian" >&6; }
48229 case $ac_cv_c_bigendian in #(
48230   yes)
48231     ENDIAN="big";; #(
48232   no)
48233     ENDIAN="little" ;; #(
48234   universal)
48235     ENDIAN="universal_endianness"
48236     ;; #(
48237   *)
48238     ENDIAN="unknown" ;;
48239 esac
48240
48241
48242  if test "x$ENDIAN" = xuniversal_endianness; then
48243    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
48244  fi
48245  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
48246    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
48247  fi
48248
48249
48250# Configure flags for the tools
48251
48252  ###############################################################################
48253  #
48254  # How to compile shared libraries.
48255  #
48256
48257  if test "x$TOOLCHAIN_TYPE" = xgcc; then
48258    PICFLAG="-fPIC"
48259    C_FLAG_REORDER=''
48260    CXX_FLAG_REORDER=''
48261
48262    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48263      # Linking is different on MacOSX
48264      if test "x$STATIC_BUILD" = xtrue; then
48265        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
48266      else
48267        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
48268        JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
48269      fi
48270      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
48271      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
48272      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
48273      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
48274    else
48275      # Default works for linux, might work on other platforms as well.
48276      SHARED_LIBRARY_FLAGS='-shared'
48277      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
48278      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
48279      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
48280      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
48281    fi
48282  elif test "x$TOOLCHAIN_TYPE" = xclang; then
48283    C_FLAG_REORDER=''
48284    CXX_FLAG_REORDER=''
48285
48286    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48287      # Linking is different on MacOSX
48288      PICFLAG=''
48289      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
48290      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
48291      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
48292      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
48293      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
48294
48295      if test "x$STATIC_BUILD" = xfalse; then
48296        JVM_CFLAGS="$JVM_CFLAGS -fPIC"
48297      fi
48298    else
48299      # Default works for linux, might work on other platforms as well.
48300      PICFLAG='-fPIC'
48301      SHARED_LIBRARY_FLAGS='-shared'
48302      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
48303      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
48304      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
48305      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
48306    fi
48307  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48308    PICFLAG="-KPIC"
48309    C_FLAG_REORDER='-xF'
48310    CXX_FLAG_REORDER='-xF'
48311    SHARED_LIBRARY_FLAGS="-G"
48312    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
48313    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
48314    SET_SHARED_LIBRARY_NAME='-h $1'
48315    SET_SHARED_LIBRARY_MAPFILE='-M$1'
48316  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
48317    # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
48318    # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
48319    # will have to patch this single instruction with a call to some out-of-order code which
48320    # does the load from the TOC. This is of course slow. But in that case we also would have
48321    # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
48322    # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
48323    # can be patched directly by the linker and does not require a jump to out-of-order code.
48324    # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
48325    # instead. This creates a distinct TOC for every compilation unit (and thus requires two
48326    # loads for accessing a global variable). But there are rumors that this may be seen as a
48327    # 'performance feature' because of improved code locality of the symbols used in a
48328    # compilation unit.
48329    PICFLAG="-qpic"
48330    JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
48331    C_FLAG_REORDER=''
48332    CXX_FLAG_REORDER=''
48333    SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
48334    SET_EXECUTABLE_ORIGIN=""
48335    SET_SHARED_LIBRARY_ORIGIN=''
48336    SET_SHARED_LIBRARY_NAME=''
48337    SET_SHARED_LIBRARY_MAPFILE=''
48338  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48339    PICFLAG=""
48340    C_FLAG_REORDER=''
48341    CXX_FLAG_REORDER=''
48342    SHARED_LIBRARY_FLAGS="-dll"
48343    SET_EXECUTABLE_ORIGIN=''
48344    SET_SHARED_LIBRARY_ORIGIN=''
48345    SET_SHARED_LIBRARY_NAME=''
48346    SET_SHARED_LIBRARY_MAPFILE='-def:$1'
48347  fi
48348
48349
48350
48351
48352
48353
48354
48355
48356
48357  # The (cross) compiler is now configured, we can now test capabilities
48358  # of the target platform.
48359
48360
48361
48362  ###############################################################################
48363  #
48364  # Setup the opt flags for different compilers
48365  # and different operating systems.
48366  #
48367
48368  # FIXME: this was indirectly the old default, but just inherited.
48369  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48370  #   C_FLAG_DEPS="-MMD -MF"
48371  # fi
48372
48373  # Generate make dependency files
48374  if test "x$TOOLCHAIN_TYPE" = xgcc; then
48375    C_FLAG_DEPS="-MMD -MF"
48376  elif test "x$TOOLCHAIN_TYPE" = xclang; then
48377    C_FLAG_DEPS="-MMD -MF"
48378  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48379    C_FLAG_DEPS="-xMMD -xMF"
48380  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
48381    C_FLAG_DEPS="-qmakedep=gcc -MF"
48382  fi
48383  CXX_FLAG_DEPS="$C_FLAG_DEPS"
48384
48385
48386
48387  # Debug symbols
48388  if test "x$TOOLCHAIN_TYPE" = xgcc; then
48389    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
48390      # reduce from default "-g2" option to save space
48391      CFLAGS_DEBUG_SYMBOLS="-g1"
48392      CXXFLAGS_DEBUG_SYMBOLS="-g1"
48393    else
48394      CFLAGS_DEBUG_SYMBOLS="-g"
48395      CXXFLAGS_DEBUG_SYMBOLS="-g"
48396    fi
48397  elif test "x$TOOLCHAIN_TYPE" = xclang; then
48398    CFLAGS_DEBUG_SYMBOLS="-g"
48399    CXXFLAGS_DEBUG_SYMBOLS="-g"
48400  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48401    CFLAGS_DEBUG_SYMBOLS="-g -xs"
48402    # -g0 enables debug symbols without disabling inlining.
48403    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
48404  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
48405    CFLAGS_DEBUG_SYMBOLS="-g"
48406    CXXFLAGS_DEBUG_SYMBOLS="-g"
48407  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48408    CFLAGS_DEBUG_SYMBOLS="-Zi"
48409    CXXFLAGS_DEBUG_SYMBOLS="-Zi"
48410  fi
48411
48412
48413
48414  # Debug symbols for JVM_CFLAGS
48415  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48416    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
48417    if test "x$DEBUG_LEVEL" = xslowdebug; then
48418      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
48419    else
48420      # -g0 does not disable inlining, which -g does.
48421      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
48422    fi
48423  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48424    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
48425  else
48426    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
48427  fi
48428
48429
48430  # bounds, memory and behavior checking options
48431  if test "x$TOOLCHAIN_TYPE" = xgcc; then
48432    case $DEBUG_LEVEL in
48433    release )
48434      # no adjustment
48435      ;;
48436    fastdebug )
48437      # no adjustment
48438      ;;
48439    slowdebug )
48440      # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
48441      # get's added conditionally on whether we produce debug symbols or not.
48442      # This is most likely not really correct.
48443
48444      # Add runtime stack smashing and undefined behavior checks.
48445      # Not all versions of gcc support -fstack-protector
48446      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
48447
48448
48449
48450
48451
48452
48453
48454
48455
48456
48457
48458
48459
48460
48461
48462
48463
48464
48465
48466
48467
48468
48469
48470
48471
48472
48473
48474
48475
48476
48477
48478
48479
48480
48481
48482
48483
48484
48485
48486
48487
48488
48489    # Execute function body
48490
48491
48492
48493
48494
48495
48496
48497
48498
48499
48500
48501
48502
48503
48504
48505
48506
48507
48508
48509
48510
48511
48512
48513
48514
48515
48516
48517
48518
48519
48520
48521
48522
48523
48524
48525
48526
48527
48528
48529
48530
48531
48532
48533
48534
48535
48536
48537
48538    # Execute function body
48539
48540  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
48541$as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
48542  supports=yes
48543
48544  saved_cflags="$CFLAGS"
48545  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
48546  ac_ext=c
48547ac_cpp='$CPP $CPPFLAGS'
48548ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48549ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48550ac_compiler_gnu=$ac_cv_c_compiler_gnu
48551
48552  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48553/* end confdefs.h.  */
48554int i;
48555_ACEOF
48556if ac_fn_c_try_compile "$LINENO"; then :
48557
48558else
48559  supports=no
48560fi
48561rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48562  ac_ext=cpp
48563ac_cpp='$CXXCPP $CPPFLAGS'
48564ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48565ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48566ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48567
48568  CFLAGS="$saved_cflags"
48569
48570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48571$as_echo "$supports" >&6; }
48572  if test "x$supports" = "xyes" ; then
48573    :
48574    C_COMP_SUPPORTS="yes"
48575  else
48576    :
48577    C_COMP_SUPPORTS="no"
48578  fi
48579
48580
48581
48582
48583
48584
48585
48586
48587
48588
48589
48590
48591
48592
48593
48594
48595
48596
48597
48598
48599
48600
48601
48602
48603
48604
48605
48606
48607
48608
48609
48610
48611
48612
48613
48614
48615
48616
48617
48618
48619
48620
48621
48622
48623
48624
48625
48626
48627
48628
48629
48630
48631
48632
48633
48634
48635
48636
48637
48638    # Execute function body
48639
48640  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
48641$as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
48642  supports=yes
48643
48644  saved_cxxflags="$CXXFLAGS"
48645  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
48646  ac_ext=cpp
48647ac_cpp='$CXXCPP $CPPFLAGS'
48648ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48649ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48650ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48651
48652  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48653/* end confdefs.h.  */
48654int i;
48655_ACEOF
48656if ac_fn_cxx_try_compile "$LINENO"; then :
48657
48658else
48659  supports=no
48660fi
48661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48662  ac_ext=cpp
48663ac_cpp='$CXXCPP $CPPFLAGS'
48664ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48665ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48666ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48667
48668  CXXFLAGS="$saved_cxxflags"
48669
48670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48671$as_echo "$supports" >&6; }
48672  if test "x$supports" = "xyes" ; then
48673    :
48674    CXX_COMP_SUPPORTS="yes"
48675  else
48676    :
48677    CXX_COMP_SUPPORTS="no"
48678  fi
48679
48680
48681
48682
48683
48684
48685
48686
48687
48688
48689
48690
48691
48692  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
48693$as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
48694  supports=no
48695  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
48696
48697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48698$as_echo "$supports" >&6; }
48699  if test "x$supports" = "xyes" ; then
48700    :
48701
48702  else
48703    :
48704    STACK_PROTECTOR_CFLAG=""
48705  fi
48706
48707
48708
48709
48710
48711
48712
48713      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
48714      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
48715      if test "x$STACK_PROTECTOR_CFLAG" != x; then
48716        JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
48717      fi
48718      ;;
48719    esac
48720  fi
48721
48722  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48723    if test "x$DEBUG_LEVEL" != xrelease; then
48724      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
48725        JVM_CFLAGS="$JVM_CFLAGS -homeparams"
48726      fi
48727    fi
48728  fi
48729
48730  # Optimization levels
48731  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48732    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
48733
48734    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
48735      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
48736      C_O_FLAG_HIGHEST_JVM="-xO4"
48737      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
48738      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
48739      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
48740      C_O_FLAG_DEBUG="-xregs=no%frameptr"
48741      C_O_FLAG_DEBUG_JVM=""
48742      C_O_FLAG_NONE="-xregs=no%frameptr"
48743      CXX_O_FLAG_HIGHEST_JVM="-xO4"
48744      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
48745      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
48746      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
48747      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
48748      CXX_O_FLAG_DEBUG_JVM=""
48749      CXX_O_FLAG_NONE="-xregs=no%frameptr"
48750      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
48751        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
48752        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
48753      fi
48754    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
48755      C_O_FLAG_HIGHEST_JVM="-xO4"
48756      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
48757      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
48758      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
48759      C_O_FLAG_DEBUG=""
48760      C_O_FLAG_DEBUG_JVM=""
48761      C_O_FLAG_NONE=""
48762      CXX_O_FLAG_HIGHEST_JVM="-xO4"
48763      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
48764      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
48765      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
48766      CXX_O_FLAG_DEBUG=""
48767      CXX_O_FLAG_DEBUG_JVM=""
48768      CXX_O_FLAG_NONE=""
48769    fi
48770  else
48771    # The remaining toolchains share opt flags between CC and CXX;
48772    # setup for C and duplicate afterwards.
48773    if test "x$TOOLCHAIN_TYPE" = xgcc; then
48774      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48775        # On MacOSX we optimize for size, something
48776        # we should do for all platforms?
48777        C_O_FLAG_HIGHEST_JVM="-Os"
48778        C_O_FLAG_HIGHEST="-Os"
48779        C_O_FLAG_HI="-Os"
48780        C_O_FLAG_NORM="-Os"
48781        C_O_FLAG_SIZE="-Os"
48782      else
48783        C_O_FLAG_HIGHEST_JVM="-O3"
48784        C_O_FLAG_HIGHEST="-O3"
48785        C_O_FLAG_HI="-O3"
48786        C_O_FLAG_NORM="-O2"
48787        C_O_FLAG_SIZE="-Os"
48788      fi
48789      C_O_FLAG_DEBUG="-O0"
48790      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48791        C_O_FLAG_DEBUG_JVM=""
48792      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
48793        C_O_FLAG_DEBUG_JVM="-O0"
48794      fi
48795      C_O_FLAG_NONE="-O0"
48796    elif test "x$TOOLCHAIN_TYPE" = xclang; then
48797      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48798        # On MacOSX we optimize for size, something
48799        # we should do for all platforms?
48800        C_O_FLAG_HIGHEST_JVM="-Os"
48801        C_O_FLAG_HIGHEST="-Os"
48802        C_O_FLAG_HI="-Os"
48803        C_O_FLAG_NORM="-Os"
48804        C_O_FLAG_SIZE="-Os"
48805      else
48806        C_O_FLAG_HIGHEST_JVM="-O3"
48807        C_O_FLAG_HIGHEST="-O3"
48808        C_O_FLAG_HI="-O3"
48809        C_O_FLAG_NORM="-O2"
48810        C_O_FLAG_SIZE="-Os"
48811      fi
48812      C_O_FLAG_DEBUG="-O0"
48813      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48814        C_O_FLAG_DEBUG_JVM=""
48815      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
48816        C_O_FLAG_DEBUG_JVM="-O0"
48817      fi
48818      C_O_FLAG_NONE="-O0"
48819    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
48820      C_O_FLAG_HIGHEST_JVM="-O3"
48821      C_O_FLAG_HIGHEST="-O3"
48822      C_O_FLAG_HI="-O3 -qstrict"
48823      C_O_FLAG_NORM="-O2"
48824      C_O_FLAG_DEBUG="-qnoopt"
48825      # FIXME: Value below not verified.
48826      C_O_FLAG_DEBUG_JVM=""
48827      C_O_FLAG_NONE="-qnoopt"
48828    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48829      C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
48830      C_O_FLAG_HIGHEST="-O2"
48831      C_O_FLAG_HI="-O1"
48832      C_O_FLAG_NORM="-O1"
48833      C_O_FLAG_DEBUG="-Od"
48834      C_O_FLAG_DEBUG_JVM=""
48835      C_O_FLAG_NONE="-Od"
48836      C_O_FLAG_SIZE="-Os"
48837    fi
48838    CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
48839    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
48840    CXX_O_FLAG_HI="$C_O_FLAG_HI"
48841    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
48842    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
48843    CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
48844    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
48845    CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
48846  fi
48847
48848  # Adjust optimization flags according to debug level.
48849  case $DEBUG_LEVEL in
48850    release )
48851      # no adjustment
48852      ;;
48853    fastdebug )
48854      # Not quite so much optimization
48855      C_O_FLAG_HI="$C_O_FLAG_NORM"
48856      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
48857      ;;
48858    slowdebug )
48859      # Disable optimization
48860      C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
48861      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
48862      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
48863      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
48864      C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
48865      CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
48866      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
48867      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
48868      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
48869      CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
48870      ;;
48871  esac
48872
48873
48874
48875
48876
48877
48878
48879
48880
48881
48882
48883
48884
48885
48886
48887
48888
48889
48890
48891  # Special extras...
48892  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48893    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
48894      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
48895      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
48896    fi
48897    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
48898    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
48899  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
48900    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
48901    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
48902  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
48903    CXXSTD_CXXFLAG="-std=gnu++98"
48904
48905
48906
48907
48908
48909
48910
48911
48912
48913
48914
48915
48916
48917
48918
48919
48920
48921
48922
48923
48924
48925
48926
48927
48928
48929
48930
48931
48932
48933
48934
48935
48936
48937
48938
48939
48940
48941
48942
48943
48944
48945
48946    # Execute function body
48947
48948  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
48949$as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
48950  supports=yes
48951
48952  saved_cxxflags="$CXXFLAGS"
48953  CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
48954  ac_ext=cpp
48955ac_cpp='$CXXCPP $CPPFLAGS'
48956ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48957ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48958ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48959
48960  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48961/* end confdefs.h.  */
48962int i;
48963_ACEOF
48964if ac_fn_cxx_try_compile "$LINENO"; then :
48965
48966else
48967  supports=no
48968fi
48969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48970  ac_ext=cpp
48971ac_cpp='$CXXCPP $CPPFLAGS'
48972ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48973ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48974ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48975
48976  CXXFLAGS="$saved_cxxflags"
48977
48978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48979$as_echo "$supports" >&6; }
48980  if test "x$supports" = "xyes" ; then
48981    :
48982
48983  else
48984    :
48985    CXXSTD_CXXFLAG=""
48986  fi
48987
48988
48989
48990
48991
48992
48993
48994
48995
48996
48997
48998
48999    CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
49000
49001  fi
49002  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49003    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49004    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49005    CFLAGS_JDKLIB_EXTRA='-xstrconst'
49006    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49007    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49008  fi
49009
49010  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49011    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49012    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49013    CFLAGS_JDKLIB_EXTRA='-xstrconst'
49014  fi
49015
49016  CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
49017  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
49018  LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
49019
49020  ###############################################################################
49021  #
49022  # Now setup the CFLAGS and LDFLAGS for the JDK build.
49023  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
49024  #
49025
49026  # Setup compiler/platform specific flags into
49027  #    CFLAGS_JDK    - C Compiler flags
49028  #    CXXFLAGS_JDK  - C++ Compiler flags
49029  #    COMMON_CCXXFLAGS_JDK - common to C and C++
49030  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49031    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49032    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
49033    JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
49034    if test "x$OPENJDK_TARGET_CPU" = xx86; then
49035      # Force compatibility with i586 on 32 bit intel platforms.
49036      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49037      JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49038    fi
49039    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49040        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49041    case $OPENJDK_TARGET_CPU_ARCH in
49042      arm )
49043        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49044        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49045        ;;
49046      ppc )
49047        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49048        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49049        ;;
49050      * )
49051        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49052        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49053        ;;
49054    esac
49055
49056
49057
49058
49059
49060
49061
49062
49063
49064
49065
49066
49067
49068
49069
49070
49071
49072
49073
49074
49075
49076
49077
49078
49079
49080
49081
49082
49083
49084
49085
49086
49087
49088
49089
49090
49091
49092
49093
49094
49095
49096
49097    # Execute function body
49098
49099  # Need to assign to a variable since m4 is blocked from modifying parts in [].
49100  REFERENCE_VERSION=6
49101
49102  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
49103    as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
49104  fi
49105
49106  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
49107    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
49108  fi
49109
49110  # Version comparison method inspired by http://stackoverflow.com/a/24067243
49111  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
49112
49113  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
49114    :
49115
49116  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
49117  # runs afoul of the more aggressive versions of these optimisations.
49118  # Notably, value range propagation now assumes that the this pointer of C++
49119  # member functions is non-null.
49120  NO_NULL_POINTER_CHECK_CFLAG="-fno-delete-null-pointer-checks"
49121
49122
49123
49124
49125
49126
49127
49128
49129
49130
49131
49132
49133
49134
49135
49136
49137
49138
49139
49140
49141
49142
49143
49144
49145
49146
49147
49148
49149
49150
49151
49152
49153
49154
49155
49156
49157
49158
49159
49160
49161
49162
49163    # Execute function body
49164
49165
49166
49167
49168
49169
49170
49171
49172
49173
49174
49175
49176
49177
49178
49179
49180
49181
49182
49183
49184
49185
49186
49187
49188
49189
49190
49191
49192
49193
49194
49195
49196
49197
49198
49199
49200
49201
49202
49203
49204
49205
49206
49207
49208
49209
49210
49211
49212    # Execute function body
49213
49214  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"" >&5
49215$as_echo_n "checking if the C compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"... " >&6; }
49216  supports=yes
49217
49218  saved_cflags="$CFLAGS"
49219  CFLAGS="$CFLAGS $NO_NULL_POINTER_CHECK_CFLAG -Werror"
49220  ac_ext=c
49221ac_cpp='$CPP $CPPFLAGS'
49222ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49223ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49224ac_compiler_gnu=$ac_cv_c_compiler_gnu
49225
49226  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49227/* end confdefs.h.  */
49228int i;
49229_ACEOF
49230if ac_fn_c_try_compile "$LINENO"; then :
49231
49232else
49233  supports=no
49234fi
49235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49236  ac_ext=cpp
49237ac_cpp='$CXXCPP $CPPFLAGS'
49238ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49239ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49240ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49241
49242  CFLAGS="$saved_cflags"
49243
49244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49245$as_echo "$supports" >&6; }
49246  if test "x$supports" = "xyes" ; then
49247    :
49248    C_COMP_SUPPORTS="yes"
49249  else
49250    :
49251    C_COMP_SUPPORTS="no"
49252  fi
49253
49254
49255
49256
49257
49258
49259
49260
49261
49262
49263
49264
49265
49266
49267
49268
49269
49270
49271
49272
49273
49274
49275
49276
49277
49278
49279
49280
49281
49282
49283
49284
49285
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    # Execute function body
49313
49314  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"" >&5
49315$as_echo_n "checking if the C++ compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"... " >&6; }
49316  supports=yes
49317
49318  saved_cxxflags="$CXXFLAGS"
49319  CXXFLAGS="$CXXFLAG $NO_NULL_POINTER_CHECK_CFLAG -Werror"
49320  ac_ext=cpp
49321ac_cpp='$CXXCPP $CPPFLAGS'
49322ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49323ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49324ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49325
49326  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49327/* end confdefs.h.  */
49328int i;
49329_ACEOF
49330if ac_fn_cxx_try_compile "$LINENO"; then :
49331
49332else
49333  supports=no
49334fi
49335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49336  ac_ext=cpp
49337ac_cpp='$CXXCPP $CPPFLAGS'
49338ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49339ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49340ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49341
49342  CXXFLAGS="$saved_cxxflags"
49343
49344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49345$as_echo "$supports" >&6; }
49346  if test "x$supports" = "xyes" ; then
49347    :
49348    CXX_COMP_SUPPORTS="yes"
49349  else
49350    :
49351    CXX_COMP_SUPPORTS="no"
49352  fi
49353
49354
49355
49356
49357
49358
49359
49360
49361
49362
49363
49364
49365
49366  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"" >&5
49367$as_echo_n "checking if both compilers support \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"... " >&6; }
49368  supports=no
49369  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49370
49371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49372$as_echo "$supports" >&6; }
49373  if test "x$supports" = "xyes" ; then
49374    :
49375
49376  else
49377    :
49378    NO_NULL_POINTER_CHECK_CFLAG=""
49379  fi
49380
49381
49382
49383
49384
49385
49386
49387  NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
49388
49389
49390
49391
49392
49393
49394
49395
49396
49397
49398
49399
49400
49401
49402
49403
49404
49405
49406
49407
49408
49409
49410
49411
49412
49413
49414
49415
49416
49417
49418
49419
49420
49421
49422
49423
49424
49425
49426
49427
49428
49429
49430    # Execute function body
49431
49432
49433
49434
49435
49436
49437
49438
49439
49440
49441
49442
49443
49444
49445
49446
49447
49448
49449
49450
49451
49452
49453
49454
49455
49456
49457
49458
49459
49460
49461
49462
49463
49464
49465
49466
49467
49468
49469
49470
49471
49472
49473
49474
49475
49476
49477
49478
49479    # Execute function body
49480
49481  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
49482$as_echo_n "checking if the C compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
49483  supports=yes
49484
49485  saved_cflags="$CFLAGS"
49486  CFLAGS="$CFLAGS $NO_LIFETIME_DSE_CFLAG -Werror"
49487  ac_ext=c
49488ac_cpp='$CPP $CPPFLAGS'
49489ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49490ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49491ac_compiler_gnu=$ac_cv_c_compiler_gnu
49492
49493  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49494/* end confdefs.h.  */
49495int i;
49496_ACEOF
49497if ac_fn_c_try_compile "$LINENO"; then :
49498
49499else
49500  supports=no
49501fi
49502rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49503  ac_ext=cpp
49504ac_cpp='$CXXCPP $CPPFLAGS'
49505ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49506ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49507ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49508
49509  CFLAGS="$saved_cflags"
49510
49511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49512$as_echo "$supports" >&6; }
49513  if test "x$supports" = "xyes" ; then
49514    :
49515    C_COMP_SUPPORTS="yes"
49516  else
49517    :
49518    C_COMP_SUPPORTS="no"
49519  fi
49520
49521
49522
49523
49524
49525
49526
49527
49528
49529
49530
49531
49532
49533
49534
49535
49536
49537
49538
49539
49540
49541
49542
49543
49544
49545
49546
49547
49548
49549
49550
49551
49552
49553
49554
49555
49556
49557
49558
49559
49560
49561
49562
49563
49564
49565
49566
49567
49568
49569
49570
49571
49572
49573
49574
49575
49576
49577
49578
49579    # Execute function body
49580
49581  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
49582$as_echo_n "checking if the C++ compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
49583  supports=yes
49584
49585  saved_cxxflags="$CXXFLAGS"
49586  CXXFLAGS="$CXXFLAG $NO_LIFETIME_DSE_CFLAG -Werror"
49587  ac_ext=cpp
49588ac_cpp='$CXXCPP $CPPFLAGS'
49589ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49590ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49591ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49592
49593  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49594/* end confdefs.h.  */
49595int i;
49596_ACEOF
49597if ac_fn_cxx_try_compile "$LINENO"; then :
49598
49599else
49600  supports=no
49601fi
49602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49603  ac_ext=cpp
49604ac_cpp='$CXXCPP $CPPFLAGS'
49605ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49606ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49607ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49608
49609  CXXFLAGS="$saved_cxxflags"
49610
49611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49612$as_echo "$supports" >&6; }
49613  if test "x$supports" = "xyes" ; then
49614    :
49615    CXX_COMP_SUPPORTS="yes"
49616  else
49617    :
49618    CXX_COMP_SUPPORTS="no"
49619  fi
49620
49621
49622
49623
49624
49625
49626
49627
49628
49629
49630
49631
49632
49633  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
49634$as_echo_n "checking if both compilers support \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
49635  supports=no
49636  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49637
49638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49639$as_echo "$supports" >&6; }
49640  if test "x$supports" = "xyes" ; then
49641    :
49642
49643  else
49644    :
49645    NO_LIFETIME_DSE_CFLAG=""
49646  fi
49647
49648
49649
49650
49651
49652
49653  CFLAGS_JDK="${CFLAGS_JDK} ${NO_NULL_POINTER_CHECK_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
49654
49655
49656
49657  else
49658    :
49659
49660  fi
49661
49662
49663
49664
49665
49666
49667
49668
49669
49670
49671
49672
49673  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49674    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49675
49676    # Restrict the debug information created by Clang to avoid
49677    # too big object files and speed the build up a little bit
49678    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
49679    JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
49680    if test "x$OPENJDK_TARGET_OS" = xlinux; then
49681      if test "x$OPENJDK_TARGET_CPU" = xx86; then
49682        # Force compatibility with i586 on 32 bit intel platforms.
49683        COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49684        JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49685      fi
49686      JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
49687      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49688          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49689      case $OPENJDK_TARGET_CPU_ARCH in
49690        ppc )
49691          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49692          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49693          ;;
49694        * )
49695          COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49696          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49697          ;;
49698      esac
49699    fi
49700  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49701    JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
49702    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
49703    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
49704      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
49705    fi
49706
49707    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
49708    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
49709  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49710    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
49711    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
49712    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
49713  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49714    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
49715        -MD -Zc:wchar_t- -W3 -wd4800 \
49716        -DWIN32_LEAN_AND_MEAN \
49717        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
49718        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
49719        -DWIN32 -DIAL"
49720    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
49721      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
49722    else
49723      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
49724    fi
49725    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
49726    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
49727    # studio.
49728    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
49729      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
49730      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
49731      JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
49732    fi
49733  fi
49734
49735  ###############################################################################
49736
49737  # Adjust flags according to debug level.
49738  case $DEBUG_LEVEL in
49739    fastdebug | slowdebug )
49740      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
49741      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
49742      JAVAC_FLAGS="$JAVAC_FLAGS -g"
49743      ;;
49744    release )
49745      ;;
49746    * )
49747      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
49748      ;;
49749  esac
49750
49751  # Set some common defines. These works for all compilers, but assume
49752  # -D is universally accepted.
49753
49754  # Setup endianness
49755  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
49756    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
49757    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
49758    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
49759    #   Note: -Dmacro         is the same as    #define macro 1
49760    #         -Dmacro=        is the same as    #define macro
49761    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49762      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
49763    else
49764      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
49765    fi
49766  else
49767    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
49768    # are defined in the system?
49769    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49770      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
49771    else
49772      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
49773    fi
49774  fi
49775
49776  # Setup target OS define. Use OS target name but in upper case.
49777  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
49778  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
49779
49780  # Setup target CPU
49781  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
49782      $OPENJDK_TARGET_ADD_LP64 \
49783      -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
49784
49785  # Setup debug/release defines
49786  if test "x$DEBUG_LEVEL" = xrelease; then
49787    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
49788    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49789      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
49790    fi
49791  else
49792    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
49793  fi
49794
49795  # Set some additional per-OS defines.
49796  if test "x$OPENJDK_TARGET_OS" = xlinux; then
49797    JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
49798    JVM_CFLAGS="$JVM_CFLAGS -pipe -fPIC -fno-rtti -fno-exceptions \
49799        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
49800  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
49801    JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
49802    JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
49803        -D_Crun_inline_placement -library=%none -KPIC -mt -xwe -features=no%except"
49804  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
49805    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
49806    JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
49807    JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
49808    JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
49809        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
49810        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
49811        -fno-omit-frame-pointer"
49812  elif test "x$OPENJDK_TARGET_OS" = xaix; then
49813    JVM_CFLAGS="$JVM_CFLAGS -DAIX"
49814    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
49815    JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced -qhot=level=1 -qinline \
49816        -qinlglue -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
49817        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
49818  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
49819    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
49820  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
49821    JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
49822    JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
49823  fi
49824
49825  # Set some additional per-CPU defines.
49826  if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
49827    JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
49828  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
49829    JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
49830  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
49831    if test "x$OPENJDK_TARGET_OS" = xlinux; then
49832      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
49833      # fixes `relocation truncated to fit' error for gcc 4.1.
49834      JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
49835      # Use ppc64 instructions, but schedule for power5
49836      JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
49837    elif test "x$OPENJDK_TARGET_OS" = xaix; then
49838      JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
49839    fi
49840  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
49841    if test "x$OPENJDK_TARGET_OS" = xlinux; then
49842      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
49843      # Little endian machine uses ELFv2 ABI.
49844      JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
49845      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
49846      JVM_CFLAGS="$JVM_CFLAGS -mcpu=power7 -mtune=power8"
49847    fi
49848  fi
49849
49850  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
49851    JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
49852  fi
49853
49854  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49855    if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
49856      # Solaris does not have _LP64=1 in the old build.
49857      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
49858      JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
49859    fi
49860  fi
49861
49862  # Set JVM_CFLAGS warning handling
49863  if test "x$OPENJDK_TARGET_OS" = xlinux; then
49864    JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
49865        -Wunused-value -Woverloaded-virtual"
49866
49867    if test "x$TOOLCHAIN_TYPE" = xgcc; then
49868
49869
49870
49871
49872
49873
49874
49875
49876
49877
49878
49879
49880
49881
49882
49883
49884
49885
49886
49887
49888
49889
49890
49891
49892
49893
49894
49895
49896
49897
49898
49899
49900
49901
49902
49903
49904
49905
49906
49907
49908
49909
49910    # Execute function body
49911
49912  # Need to assign to a variable since m4 is blocked from modifying parts in [].
49913  REFERENCE_VERSION=4.8
49914
49915  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
49916    as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
49917  fi
49918
49919  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
49920    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
49921  fi
49922
49923  # Version comparison method inspired by http://stackoverflow.com/a/24067243
49924  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
49925
49926  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
49927    :
49928
49929            # These flags either do not work or give spurious warnings prior to gcc 4.8.
49930            JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
49931
49932
49933  else
49934    :
49935
49936  fi
49937
49938
49939
49940
49941
49942
49943
49944
49945
49946
49947
49948
49949    fi
49950    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
49951      # Non-zero builds have stricter warnings
49952      JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
49953    else
49954      if test "x$TOOLCHAIN_TYPE" = xclang; then
49955        # Some versions of llvm do not like -Wundef
49956        JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
49957      fi
49958    fi
49959  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
49960    JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
49961        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
49962  fi
49963
49964  # Additional macosx handling
49965  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49966    # Setting these parameters makes it an error to link to macosx APIs that are
49967    # newer than the given OS version and makes the linked binaries compatible
49968    # even if built on a newer version of the OS.
49969    # The expected format is X.Y.Z
49970    MACOSX_VERSION_MIN=10.7.0
49971
49972
49973    # The macro takes the version with no dots, ex: 1070
49974    # Let the flags variables get resolved in make for easier override on make
49975    # command line.
49976    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
49977    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
49978  fi
49979
49980  # Setup some hard coded includes
49981  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
49982      -I${JDK_TOPDIR}/src/java.base/share/native/include \
49983      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
49984      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
49985      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
49986      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
49987
49988  # The shared libraries are compiled using the picflag.
49989  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
49990      $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
49991  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
49992      $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
49993
49994  # Executable flags
49995  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
49996  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
49997
49998
49999
50000
50001
50002
50003  # Setup LDFLAGS et al.
50004  #
50005
50006  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50007    LDFLAGS_MICROSOFT="-nologo -opt:ref"
50008    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
50009    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
50010    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50011      LDFLAGS_SAFESH="-safeseh"
50012      LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
50013      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
50014      # NOTE: Old build added -machine. Probably not needed.
50015      JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
50016    else
50017      JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
50018    fi
50019  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50020      JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
50021      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50022        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
50023        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50024    fi
50025  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50026    # If this is a --hash-style=gnu system, use --hash-style=both, why?
50027    # We have previously set HAS_GNU_HASH if this is the case
50028    if test -n "$HAS_GNU_HASH"; then
50029      LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
50030      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
50031      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
50032    fi
50033      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50034        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50035    fi
50036    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50037      # And since we now know that the linker is gnu, then add -z defs, to forbid
50038      # undefined symbols in object files.
50039      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
50040      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
50041      JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
50042      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
50043      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
50044      if test "x$OPENJDK_TARGET_CPU" = xx86; then
50045        JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
50046      fi
50047      case $DEBUG_LEVEL in
50048        release )
50049          # tell linker to optimize libraries.
50050          # Should this be supplied to the OSS linker as well?
50051          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
50052          LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
50053          JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
50054          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50055            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50056          fi
50057          ;;
50058        slowdebug )
50059          # Hotspot always let the linker optimize
50060          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50061          if test "x$HAS_LINKER_NOW" = "xtrue"; then
50062            # do relocations at load
50063            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
50064            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
50065            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
50066          fi
50067          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50068            # mark relocations read only
50069            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50070            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50071            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50072          fi
50073          ;;
50074        fastdebug )
50075          # Hotspot always let the linker optimize
50076          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50077          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50078            # mark relocations read only
50079            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50080            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50081            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50082          fi
50083          ;;
50084        * )
50085          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50086          ;;
50087        esac
50088    fi
50089  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50090    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
50091    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -xildoff -ztext"
50092    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
50093    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
50094    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
50095    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50096      JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
50097    fi
50098  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50099    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
50100    LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
50101    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
50102  fi
50103
50104  # Customize LDFLAGS for executables
50105
50106  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
50107
50108  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50109    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
50110      LDFLAGS_STACK_SIZE=1048576
50111    else
50112      LDFLAGS_STACK_SIZE=327680
50113    fi
50114    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
50115  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50116    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
50117  fi
50118
50119  LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
50120
50121  # Customize LDFLAGS for libs
50122  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
50123
50124  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
50125  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50126    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
50127        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
50128    JDKLIB_LIBS=""
50129  else
50130    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
50131        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)"
50132
50133    if test "xTARGET" = "xTARGET"; then
50134    # On some platforms (mac) the linker warns about non existing -L dirs.
50135    # Add server first if available. Linking aginst client does not always produce the same results.
50136      # Only add client/minimal dir if client/minimal is being built.
50137    # Default to server for other variants.
50138      if   [[ " $JVM_VARIANTS " =~ " server " ]]  ; then
50139        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50140      elif   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
50141        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/client"
50142      elif   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
50143        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/minimal"
50144    else
50145        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50146    fi
50147    elif test "xTARGET" = "xBUILD"; then
50148      # When building a buildjdk, it's always only the server variant
50149      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
50150          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50151    fi
50152
50153    JDKLIB_LIBS="-ljava -ljvm"
50154    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50155      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
50156    fi
50157
50158  fi
50159
50160  # Set JVM_LIBS (per os)
50161  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50162    JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
50163  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50164    # FIXME: This hard-coded path is not really proper.
50165    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50166      SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
50167    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50168      SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
50169    fi
50170    JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
50171        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
50172  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50173    JVM_LIBS="$JVM_LIBS -lm"
50174  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50175    JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
50176  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50177    JVM_LIBS="$JVM_LIBS -lm"
50178  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50179    JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
50180        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
50181        wsock32.lib winmm.lib version.lib psapi.lib"
50182    fi
50183
50184  # Set JVM_ASFLAGS
50185  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50186    if test "x$OPENJDK_TARGET_CPU" = xx86; then
50187      JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
50188    fi
50189  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50190    JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
50191  fi
50192
50193  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
50194
50195
50196
50197
50198
50199
50200
50201
50202
50203
50204
50205
50206
50207
50208
50209  # Special extras...
50210  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50211    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
50212      OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50213      OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50214    fi
50215    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50216    OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50217  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50218    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50219    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50220  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50221    OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
50222
50223
50224
50225
50226
50227
50228
50229
50230
50231
50232
50233
50234
50235
50236
50237
50238
50239
50240
50241
50242
50243
50244
50245
50246
50247
50248
50249
50250
50251
50252
50253
50254
50255
50256
50257
50258
50259
50260
50261
50262
50263
50264    # Execute function body
50265
50266  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
50267$as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
50268  supports=yes
50269
50270  saved_cxxflags="$CXXFLAGS"
50271  CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
50272  ac_ext=cpp
50273ac_cpp='$CXXCPP $CPPFLAGS'
50274ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50275ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50276ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50277
50278  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50279/* end confdefs.h.  */
50280int i;
50281_ACEOF
50282if ac_fn_cxx_try_compile "$LINENO"; then :
50283
50284else
50285  supports=no
50286fi
50287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50288  ac_ext=cpp
50289ac_cpp='$CXXCPP $CPPFLAGS'
50290ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50291ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50292ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50293
50294  CXXFLAGS="$saved_cxxflags"
50295
50296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50297$as_echo "$supports" >&6; }
50298  if test "x$supports" = "xyes" ; then
50299    :
50300
50301  else
50302    :
50303    OPENJDK_BUILD_CXXSTD_CXXFLAG=""
50304  fi
50305
50306
50307
50308
50309
50310
50311
50312
50313
50314
50315
50316
50317    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50318
50319  fi
50320  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50321    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50322    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50323    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA='-xstrconst'
50324    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50325    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50326  fi
50327
50328  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50329    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50330    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50331    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA='-xstrconst'
50332  fi
50333
50334  OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
50335  OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
50336  OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
50337
50338  ###############################################################################
50339  #
50340  # Now setup the CFLAGS and LDFLAGS for the JDK build.
50341  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
50342  #
50343
50344  # Setup compiler/platform specific flags into
50345  #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
50346  #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
50347  #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
50348  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50349    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50350    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
50351    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
50352    if test "x$OPENJDK_BUILD_CPU" = xx86; then
50353      # Force compatibility with i586 on 32 bit intel platforms.
50354      OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50355      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50356    fi
50357    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50358        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50359    case $OPENJDK_BUILD_CPU_ARCH in
50360      arm )
50361        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50362        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50363        ;;
50364      ppc )
50365        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50366        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50367        ;;
50368      * )
50369        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50370        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50371        ;;
50372    esac
50373
50374
50375
50376
50377
50378
50379
50380
50381
50382
50383
50384
50385
50386
50387
50388
50389
50390
50391
50392
50393
50394
50395
50396
50397
50398
50399
50400
50401
50402
50403
50404
50405
50406
50407
50408
50409
50410
50411
50412
50413
50414
50415    # Execute function body
50416
50417  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50418  REFERENCE_VERSION=6
50419
50420  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
50421    as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
50422  fi
50423
50424  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50425    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50426  fi
50427
50428  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50429  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
50430
50431  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50432    :
50433
50434  else
50435    :
50436
50437  fi
50438
50439
50440
50441
50442
50443
50444
50445
50446
50447
50448
50449
50450  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50451    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50452
50453    # Restrict the debug information created by Clang to avoid
50454    # too big object files and speed the build up a little bit
50455    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50456    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
50457    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50458      if test "x$OPENJDK_BUILD_CPU" = xx86; then
50459        # Force compatibility with i586 on 32 bit intel platforms.
50460        OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50461        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50462      fi
50463      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
50464      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50465          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50466      case $OPENJDK_BUILD_CPU_ARCH in
50467        ppc )
50468          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50469          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50470          ;;
50471        * )
50472          OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50473          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50474          ;;
50475      esac
50476    fi
50477  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50478    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
50479    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50480    if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
50481      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
50482    fi
50483
50484    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50485    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50486  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50487    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50488    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50489    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50490  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50491    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50492        -MD -Zc:wchar_t- -W3 -wd4800 \
50493        -DWIN32_LEAN_AND_MEAN \
50494        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50495        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50496        -DWIN32 -DIAL"
50497    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
50498      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50499    else
50500      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50501    fi
50502    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50503    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50504    # studio.
50505    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50506      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50507      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50508      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50509    fi
50510  fi
50511
50512  ###############################################################################
50513
50514  # Adjust flags according to debug level.
50515  case $DEBUG_LEVEL in
50516    fastdebug | slowdebug )
50517      OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50518      OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50519      JAVAC_FLAGS="$JAVAC_FLAGS -g"
50520      ;;
50521    release )
50522      ;;
50523    * )
50524      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50525      ;;
50526  esac
50527
50528  # Set some common defines. These works for all compilers, but assume
50529  # -D is universally accepted.
50530
50531  # Setup endianness
50532  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50533    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50534    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50535    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50536    #   Note: -Dmacro         is the same as    #define macro 1
50537    #         -Dmacro=        is the same as    #define macro
50538    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50539      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50540    else
50541      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50542    fi
50543  else
50544    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50545    # are defined in the system?
50546    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50547      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50548    else
50549      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50550    fi
50551  fi
50552
50553  # Setup target OS define. Use OS target name but in upper case.
50554  OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50555  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
50556
50557  # Setup target CPU
50558  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50559      $OPENJDK_BUILD_ADD_LP64 \
50560      -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
50561
50562  # Setup debug/release defines
50563  if test "x$DEBUG_LEVEL" = xrelease; then
50564    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
50565    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50566      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
50567    fi
50568  else
50569    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
50570  fi
50571
50572  # Set some additional per-OS defines.
50573  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50574    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
50575    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe -fPIC -fno-rtti -fno-exceptions \
50576        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50577  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
50578    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
50579    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
50580        -D_Crun_inline_placement -library=%none -KPIC -mt -xwe -features=no%except"
50581  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
50582    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50583    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
50584    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50585    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50586        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50587        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50588        -fno-omit-frame-pointer"
50589  elif test "x$OPENJDK_BUILD_OS" = xaix; then
50590    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
50591    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50592    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced -qhot=level=1 -qinline \
50593        -qinlglue -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50594        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50595  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
50596    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50597  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
50598    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50599    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
50600  fi
50601
50602  # Set some additional per-CPU defines.
50603  if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
50604    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
50605  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
50606    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
50607  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
50608    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50609      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50610      # fixes `relocation truncated to fit' error for gcc 4.1.
50611      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
50612      # Use ppc64 instructions, but schedule for power5
50613      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50614    elif test "x$OPENJDK_BUILD_OS" = xaix; then
50615      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
50616    fi
50617  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
50618    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50619      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50620      # Little endian machine uses ELFv2 ABI.
50621      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
50622      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50623      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power7 -mtune=power8"
50624    fi
50625  fi
50626
50627  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50628    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50629  fi
50630
50631  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
50632    if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
50633      # Solaris does not have _LP64=1 in the old build.
50634      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50635      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
50636    fi
50637  fi
50638
50639  # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
50640  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50641    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50642        -Wunused-value -Woverloaded-virtual"
50643
50644    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50645
50646
50647
50648
50649
50650
50651
50652
50653
50654
50655
50656
50657
50658
50659
50660
50661
50662
50663
50664
50665
50666
50667
50668
50669
50670
50671
50672
50673
50674
50675
50676
50677
50678
50679
50680
50681
50682
50683
50684
50685
50686
50687    # Execute function body
50688
50689  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50690  REFERENCE_VERSION=4.8
50691
50692  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
50693    as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
50694  fi
50695
50696  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50697    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
50698  fi
50699
50700  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50701  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
50702
50703  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50704    :
50705
50706            # These flags either do not work or give spurious warnings prior to gcc 4.8.
50707            OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
50708
50709
50710  else
50711    :
50712
50713  fi
50714
50715
50716
50717
50718
50719
50720
50721
50722
50723
50724
50725
50726    fi
50727    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
50728      # Non-zero builds have stricter warnings
50729      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
50730    else
50731      if test "x$TOOLCHAIN_TYPE" = xclang; then
50732        # Some versions of llvm do not like -Wundef
50733        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
50734      fi
50735    fi
50736  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
50737    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
50738        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
50739  fi
50740
50741  # Additional macosx handling
50742  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
50743    # Setting these parameters makes it an error to link to macosx APIs that are
50744    # newer than the given OS version and makes the linked binaries compatible
50745    # even if built on a newer version of the OS.
50746    # The expected format is X.Y.Z
50747    MACOSX_VERSION_MIN=10.7.0
50748
50749
50750    # The macro takes the version with no dots, ex: 1070
50751    # Let the flags variables get resolved in make for easier override on make
50752    # command line.
50753    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)"
50754    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50755  fi
50756
50757  # Setup some hard coded includes
50758  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50759      -I${JDK_TOPDIR}/src/java.base/share/native/include \
50760      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
50761      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
50762      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
50763      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
50764
50765  # The shared libraries are compiled using the picflag.
50766  OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50767      $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
50768  OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50769      $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
50770
50771  # Executable flags
50772  OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
50773  OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
50774
50775
50776
50777
50778
50779
50780  # Setup LDFLAGS et al.
50781  #
50782
50783  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50784    LDFLAGS_MICROSOFT="-nologo -opt:ref"
50785    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
50786    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
50787    if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
50788      LDFLAGS_SAFESH="-safeseh"
50789      OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
50790      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
50791      # NOTE: Old build added -machine. Probably not needed.
50792      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
50793    else
50794      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
50795    fi
50796  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50797      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
50798      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
50799        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
50800        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50801    fi
50802  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50803    # If this is a --hash-style=gnu system, use --hash-style=both, why?
50804    # We have previously set HAS_GNU_HASH if this is the case
50805    if test -n "$HAS_GNU_HASH"; then
50806      OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
50807      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
50808      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
50809    fi
50810      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
50811        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50812    fi
50813    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50814      # And since we now know that the linker is gnu, then add -z defs, to forbid
50815      # undefined symbols in object files.
50816      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
50817      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
50818      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
50819      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
50820      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
50821      if test "x$OPENJDK_BUILD_CPU" = xx86; then
50822        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
50823      fi
50824      case $DEBUG_LEVEL in
50825        release )
50826          # tell linker to optimize libraries.
50827          # Should this be supplied to the OSS linker as well?
50828          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
50829          OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
50830          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
50831          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50832            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
50833          fi
50834          ;;
50835        slowdebug )
50836          # Hotspot always let the linker optimize
50837          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
50838          if test "x$HAS_LINKER_NOW" = "xtrue"; then
50839            # do relocations at load
50840            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
50841            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
50842            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
50843          fi
50844          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50845            # mark relocations read only
50846            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
50847            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50848            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
50849          fi
50850          ;;
50851        fastdebug )
50852          # Hotspot always let the linker optimize
50853          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
50854          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50855            # mark relocations read only
50856            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
50857            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50858            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
50859          fi
50860          ;;
50861        * )
50862          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50863          ;;
50864        esac
50865    fi
50866  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50867    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
50868    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -xildoff -ztext"
50869    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
50870    OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
50871    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
50872    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
50873      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
50874    fi
50875  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50876    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
50877    OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
50878    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
50879  fi
50880
50881  # Customize LDFLAGS for executables
50882
50883  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
50884
50885  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50886    if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
50887      LDFLAGS_STACK_SIZE=1048576
50888    else
50889      LDFLAGS_STACK_SIZE=327680
50890    fi
50891    OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
50892  elif test "x$OPENJDK_BUILD_OS" = xlinux; then
50893    OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
50894  fi
50895
50896  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
50897
50898  # Customize LDFLAGS for libs
50899  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
50900
50901  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
50902  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50903    OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} \
50904        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
50905    OPENJDK_BUILD_JDKLIB_LIBS=""
50906  else
50907    OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} \
50908        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)"
50909
50910    if test "xBUILD" = "xTARGET"; then
50911    # On some platforms (mac) the linker warns about non existing -L dirs.
50912    # Add server first if available. Linking aginst client does not always produce the same results.
50913      # Only add client/minimal dir if client/minimal is being built.
50914    # Default to server for other variants.
50915      if   [[ " $JVM_VARIANTS " =~ " server " ]]  ; then
50916        OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
50917      elif   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
50918        OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/client"
50919      elif   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
50920        OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/minimal"
50921    else
50922        OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
50923    fi
50924    elif test "xBUILD" = "xBUILD"; then
50925      # When building a buildjdk, it's always only the server variant
50926      OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} \
50927          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
50928    fi
50929
50930    OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
50931    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50932      OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
50933    fi
50934
50935  fi
50936
50937  # Set OPENJDK_BUILD_JVM_LIBS (per os)
50938  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50939    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
50940  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
50941    # FIXME: This hard-coded path is not really proper.
50942    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
50943      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
50944    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
50945      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
50946    fi
50947    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
50948        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
50949  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
50950    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
50951  elif test "x$OPENJDK_BUILD_OS" = xaix; then
50952    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
50953  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
50954    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
50955  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
50956    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
50957        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
50958        wsock32.lib winmm.lib version.lib psapi.lib"
50959    fi
50960
50961  # Set OPENJDK_BUILD_JVM_ASFLAGS
50962  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50963    if test "x$OPENJDK_BUILD_CPU" = xx86; then
50964      OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
50965    fi
50966  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
50967    OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
50968  fi
50969
50970  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
50971
50972
50973
50974
50975
50976
50977
50978
50979
50980
50981
50982
50983
50984
50985
50986  # Tests are only ever compiled for TARGET
50987  # Flags for compiling test libraries
50988  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
50989  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
50990
50991  # Flags for compiling test executables
50992  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
50993  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
50994
50995
50996
50997
50998
50999
51000  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
51001  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
51002
51003
51004
51005
51006
51007
51008  # Some Zero and Shark settings.
51009  # ZERO_ARCHFLAG tells the compiler which mode to build for
51010  case "${OPENJDK_TARGET_CPU}" in
51011    s390)
51012      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
51013      ;;
51014    *)
51015      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51016  esac
51017
51018
51019
51020
51021
51022
51023
51024
51025
51026
51027
51028
51029
51030
51031
51032
51033
51034
51035
51036
51037
51038
51039
51040
51041
51042
51043
51044
51045
51046
51047
51048
51049
51050
51051
51052
51053
51054
51055
51056
51057
51058
51059    # Execute function body
51060
51061
51062
51063
51064
51065
51066
51067
51068
51069
51070
51071
51072
51073
51074
51075
51076
51077
51078
51079
51080
51081
51082
51083
51084
51085
51086
51087
51088
51089
51090
51091
51092
51093
51094
51095
51096
51097
51098
51099
51100
51101
51102
51103
51104
51105
51106
51107
51108    # Execute function body
51109
51110  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$ZERO_ARCHFLAG\"" >&5
51111$as_echo_n "checking if the C compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51112  supports=yes
51113
51114  saved_cflags="$CFLAGS"
51115  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
51116  ac_ext=c
51117ac_cpp='$CPP $CPPFLAGS'
51118ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51119ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51120ac_compiler_gnu=$ac_cv_c_compiler_gnu
51121
51122  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51123/* end confdefs.h.  */
51124int i;
51125_ACEOF
51126if ac_fn_c_try_compile "$LINENO"; then :
51127
51128else
51129  supports=no
51130fi
51131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51132  ac_ext=cpp
51133ac_cpp='$CXXCPP $CPPFLAGS'
51134ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51135ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51136ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51137
51138  CFLAGS="$saved_cflags"
51139
51140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51141$as_echo "$supports" >&6; }
51142  if test "x$supports" = "xyes" ; then
51143    :
51144    C_COMP_SUPPORTS="yes"
51145  else
51146    :
51147    C_COMP_SUPPORTS="no"
51148  fi
51149
51150
51151
51152
51153
51154
51155
51156
51157
51158
51159
51160
51161
51162
51163
51164
51165
51166
51167
51168
51169
51170
51171
51172
51173
51174
51175
51176
51177
51178
51179
51180
51181
51182
51183
51184
51185
51186
51187
51188
51189
51190
51191
51192
51193
51194
51195
51196
51197
51198
51199
51200
51201
51202
51203
51204
51205
51206
51207
51208    # Execute function body
51209
51210  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"" >&5
51211$as_echo_n "checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51212  supports=yes
51213
51214  saved_cxxflags="$CXXFLAGS"
51215  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
51216  ac_ext=cpp
51217ac_cpp='$CXXCPP $CPPFLAGS'
51218ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51219ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51220ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51221
51222  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51223/* end confdefs.h.  */
51224int i;
51225_ACEOF
51226if ac_fn_cxx_try_compile "$LINENO"; then :
51227
51228else
51229  supports=no
51230fi
51231rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51232  ac_ext=cpp
51233ac_cpp='$CXXCPP $CPPFLAGS'
51234ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51235ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51236ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51237
51238  CXXFLAGS="$saved_cxxflags"
51239
51240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51241$as_echo "$supports" >&6; }
51242  if test "x$supports" = "xyes" ; then
51243    :
51244    CXX_COMP_SUPPORTS="yes"
51245  else
51246    :
51247    CXX_COMP_SUPPORTS="no"
51248  fi
51249
51250
51251
51252
51253
51254
51255
51256
51257
51258
51259
51260
51261
51262  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$ZERO_ARCHFLAG\"" >&5
51263$as_echo_n "checking if both compilers support \"$ZERO_ARCHFLAG\"... " >&6; }
51264  supports=no
51265  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51266
51267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51268$as_echo "$supports" >&6; }
51269  if test "x$supports" = "xyes" ; then
51270    :
51271
51272  else
51273    :
51274    ZERO_ARCHFLAG=""
51275  fi
51276
51277
51278
51279
51280
51281
51282
51283
51284  # Check that the compiler supports -mX (or -qX on AIX) flags
51285  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
51286
51287
51288
51289
51290
51291
51292
51293
51294
51295
51296
51297
51298
51299
51300
51301
51302
51303
51304
51305
51306
51307
51308
51309
51310
51311
51312
51313
51314
51315
51316
51317
51318
51319
51320
51321
51322
51323
51324
51325
51326
51327
51328
51329
51330
51331
51332
51333    # Execute function body
51334
51335
51336
51337
51338
51339
51340
51341
51342
51343
51344
51345
51346
51347
51348
51349
51350
51351
51352
51353
51354
51355
51356
51357
51358
51359
51360
51361
51362
51363
51364
51365
51366
51367
51368
51369
51370
51371
51372
51373
51374
51375
51376
51377
51378
51379
51380
51381
51382    # Execute function body
51383
51384  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51385$as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51386  supports=yes
51387
51388  saved_cflags="$CFLAGS"
51389  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51390  ac_ext=c
51391ac_cpp='$CPP $CPPFLAGS'
51392ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51393ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51394ac_compiler_gnu=$ac_cv_c_compiler_gnu
51395
51396  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51397/* end confdefs.h.  */
51398int i;
51399_ACEOF
51400if ac_fn_c_try_compile "$LINENO"; then :
51401
51402else
51403  supports=no
51404fi
51405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51406  ac_ext=cpp
51407ac_cpp='$CXXCPP $CPPFLAGS'
51408ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51409ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51410ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51411
51412  CFLAGS="$saved_cflags"
51413
51414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51415$as_echo "$supports" >&6; }
51416  if test "x$supports" = "xyes" ; then
51417    :
51418    C_COMP_SUPPORTS="yes"
51419  else
51420    :
51421    C_COMP_SUPPORTS="no"
51422  fi
51423
51424
51425
51426
51427
51428
51429
51430
51431
51432
51433
51434
51435
51436
51437
51438
51439
51440
51441
51442
51443
51444
51445
51446
51447
51448
51449
51450
51451
51452
51453
51454
51455
51456
51457
51458
51459
51460
51461
51462
51463
51464
51465
51466
51467
51468
51469
51470
51471
51472
51473
51474
51475
51476
51477
51478
51479
51480
51481
51482    # Execute function body
51483
51484  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51485$as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51486  supports=yes
51487
51488  saved_cxxflags="$CXXFLAGS"
51489  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51490  ac_ext=cpp
51491ac_cpp='$CXXCPP $CPPFLAGS'
51492ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51493ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51494ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51495
51496  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51497/* end confdefs.h.  */
51498int i;
51499_ACEOF
51500if ac_fn_cxx_try_compile "$LINENO"; then :
51501
51502else
51503  supports=no
51504fi
51505rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51506  ac_ext=cpp
51507ac_cpp='$CXXCPP $CPPFLAGS'
51508ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51509ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51510ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51511
51512  CXXFLAGS="$saved_cxxflags"
51513
51514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51515$as_echo "$supports" >&6; }
51516  if test "x$supports" = "xyes" ; then
51517    :
51518    CXX_COMP_SUPPORTS="yes"
51519  else
51520    :
51521    CXX_COMP_SUPPORTS="no"
51522  fi
51523
51524
51525
51526
51527
51528
51529
51530
51531
51532
51533
51534
51535
51536  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51537$as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51538  supports=no
51539  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51540
51541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51542$as_echo "$supports" >&6; }
51543  if test "x$supports" = "xyes" ; then
51544    :
51545    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
51546  else
51547    :
51548    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
51549  fi
51550
51551
51552
51553
51554
51555
51556
51557
51558  # Check whether --enable-warnings-as-errors was given.
51559if test "${enable_warnings_as_errors+set}" = set; then :
51560  enableval=$enable_warnings_as_errors;
51561fi
51562
51563
51564  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
51565$as_echo_n "checking if native warnings are errors... " >&6; }
51566  if test "x$enable_warnings_as_errors" = "xyes"; then
51567    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
51568$as_echo "yes (explicitely set)" >&6; }
51569    WARNINGS_AS_ERRORS=true
51570  elif test "x$enable_warnings_as_errors" = "xno"; then
51571    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51572$as_echo "no" >&6; }
51573    WARNINGS_AS_ERRORS=false
51574  elif test "x$enable_warnings_as_errors" = "x"; then
51575    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
51576$as_echo "yes (default)" >&6; }
51577    WARNINGS_AS_ERRORS=true
51578  else
51579    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
51580  fi
51581
51582  if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
51583    # Set legacy hotspot variable
51584    HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
51585  else
51586    HOTSPOT_SET_WARNINGS_AS_ERRORS=""
51587  fi
51588
51589
51590
51591
51592  case "${TOOLCHAIN_TYPE}" in
51593    microsoft)
51594      DISABLE_WARNING_PREFIX="-wd"
51595      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
51596      ;;
51597    solstudio)
51598      DISABLE_WARNING_PREFIX="-erroff="
51599      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
51600      ;;
51601    gcc)
51602      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
51603
51604
51605
51606
51607
51608
51609
51610
51611
51612
51613
51614
51615
51616
51617
51618
51619
51620
51621
51622
51623
51624
51625
51626
51627
51628
51629
51630
51631
51632
51633
51634
51635
51636
51637
51638
51639
51640
51641
51642
51643
51644
51645
51646
51647
51648
51649
51650    # Execute function body
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
51676
51677
51678
51679
51680
51681
51682
51683
51684
51685
51686
51687
51688
51689
51690
51691
51692
51693
51694
51695
51696
51697
51698
51699    # Execute function body
51700
51701  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
51702$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
51703  supports=yes
51704
51705  saved_cflags="$CFLAGS"
51706  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
51707  ac_ext=c
51708ac_cpp='$CPP $CPPFLAGS'
51709ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51710ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51711ac_compiler_gnu=$ac_cv_c_compiler_gnu
51712
51713  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51714/* end confdefs.h.  */
51715int i;
51716_ACEOF
51717if ac_fn_c_try_compile "$LINENO"; then :
51718
51719else
51720  supports=no
51721fi
51722rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51723  ac_ext=cpp
51724ac_cpp='$CXXCPP $CPPFLAGS'
51725ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51726ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51727ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51728
51729  CFLAGS="$saved_cflags"
51730
51731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51732$as_echo "$supports" >&6; }
51733  if test "x$supports" = "xyes" ; then
51734    :
51735    C_COMP_SUPPORTS="yes"
51736  else
51737    :
51738    C_COMP_SUPPORTS="no"
51739  fi
51740
51741
51742
51743
51744
51745
51746
51747
51748
51749
51750
51751
51752
51753
51754
51755
51756
51757
51758
51759
51760
51761
51762
51763
51764
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    # Execute function body
51800
51801  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
51802$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
51803  supports=yes
51804
51805  saved_cxxflags="$CXXFLAGS"
51806  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
51807  ac_ext=cpp
51808ac_cpp='$CXXCPP $CPPFLAGS'
51809ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51810ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51811ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51812
51813  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51814/* end confdefs.h.  */
51815int i;
51816_ACEOF
51817if ac_fn_cxx_try_compile "$LINENO"; then :
51818
51819else
51820  supports=no
51821fi
51822rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51823  ac_ext=cpp
51824ac_cpp='$CXXCPP $CPPFLAGS'
51825ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51826ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51827ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51828
51829  CXXFLAGS="$saved_cxxflags"
51830
51831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51832$as_echo "$supports" >&6; }
51833  if test "x$supports" = "xyes" ; then
51834    :
51835    CXX_COMP_SUPPORTS="yes"
51836  else
51837    :
51838    CXX_COMP_SUPPORTS="no"
51839  fi
51840
51841
51842
51843
51844
51845
51846
51847
51848
51849
51850
51851
51852
51853  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
51854$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
51855  supports=no
51856  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51857
51858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51859$as_echo "$supports" >&6; }
51860  if test "x$supports" = "xyes" ; then
51861    :
51862    GCC_CAN_DISABLE_WARNINGS=true
51863  else
51864    :
51865    GCC_CAN_DISABLE_WARNINGS=false
51866
51867  fi
51868
51869
51870
51871
51872
51873
51874      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
51875        DISABLE_WARNING_PREFIX="-Wno-"
51876      else
51877        DISABLE_WARNING_PREFIX=
51878      fi
51879      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
51880      # Repeate the check for the BUILD_CC
51881      CC_OLD="$CC"
51882      CC="$BUILD_CC"
51883
51884
51885
51886
51887
51888
51889
51890
51891
51892
51893
51894
51895
51896
51897
51898
51899
51900
51901
51902
51903
51904
51905
51906
51907
51908
51909
51910
51911
51912
51913
51914
51915
51916
51917
51918
51919
51920
51921
51922
51923
51924
51925
51926
51927
51928
51929
51930    # Execute function body
51931
51932
51933
51934
51935
51936
51937
51938
51939
51940
51941
51942
51943
51944
51945
51946
51947
51948
51949
51950
51951
51952
51953
51954
51955
51956
51957
51958
51959
51960
51961
51962
51963
51964
51965
51966
51967
51968
51969
51970
51971
51972
51973
51974
51975
51976
51977
51978
51979    # Execute function body
51980
51981  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
51982$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
51983  supports=yes
51984
51985  saved_cflags="$CFLAGS"
51986  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
51987  ac_ext=c
51988ac_cpp='$CPP $CPPFLAGS'
51989ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51990ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51991ac_compiler_gnu=$ac_cv_c_compiler_gnu
51992
51993  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51994/* end confdefs.h.  */
51995int i;
51996_ACEOF
51997if ac_fn_c_try_compile "$LINENO"; then :
51998
51999else
52000  supports=no
52001fi
52002rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52003  ac_ext=cpp
52004ac_cpp='$CXXCPP $CPPFLAGS'
52005ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52006ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52007ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52008
52009  CFLAGS="$saved_cflags"
52010
52011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52012$as_echo "$supports" >&6; }
52013  if test "x$supports" = "xyes" ; then
52014    :
52015    C_COMP_SUPPORTS="yes"
52016  else
52017    :
52018    C_COMP_SUPPORTS="no"
52019  fi
52020
52021
52022
52023
52024
52025
52026
52027
52028
52029
52030
52031
52032
52033
52034
52035
52036
52037
52038
52039
52040
52041
52042
52043
52044
52045
52046
52047
52048
52049
52050
52051
52052
52053
52054
52055
52056
52057
52058
52059
52060
52061
52062
52063
52064
52065
52066
52067
52068
52069
52070
52071
52072
52073
52074
52075
52076
52077
52078
52079    # Execute function body
52080
52081  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52082$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52083  supports=yes
52084
52085  saved_cxxflags="$CXXFLAGS"
52086  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52087  ac_ext=cpp
52088ac_cpp='$CXXCPP $CPPFLAGS'
52089ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52090ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52091ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52092
52093  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52094/* end confdefs.h.  */
52095int i;
52096_ACEOF
52097if ac_fn_cxx_try_compile "$LINENO"; then :
52098
52099else
52100  supports=no
52101fi
52102rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52103  ac_ext=cpp
52104ac_cpp='$CXXCPP $CPPFLAGS'
52105ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52106ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52107ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52108
52109  CXXFLAGS="$saved_cxxflags"
52110
52111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52112$as_echo "$supports" >&6; }
52113  if test "x$supports" = "xyes" ; then
52114    :
52115    CXX_COMP_SUPPORTS="yes"
52116  else
52117    :
52118    CXX_COMP_SUPPORTS="no"
52119  fi
52120
52121
52122
52123
52124
52125
52126
52127
52128
52129
52130
52131
52132
52133  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52134$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52135  supports=no
52136  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52137
52138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52139$as_echo "$supports" >&6; }
52140  if test "x$supports" = "xyes" ; then
52141    :
52142    BUILD_CC_CAN_DISABLE_WARNINGS=true
52143  else
52144    :
52145    BUILD_CC_CAN_DISABLE_WARNINGS=false
52146
52147  fi
52148
52149
52150
52151
52152
52153
52154      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52155        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
52156      else
52157        BUILD_CC_DISABLE_WARNING_PREFIX=
52158      fi
52159      CC="$CC_OLD"
52160      ;;
52161    clang)
52162      DISABLE_WARNING_PREFIX="-Wno-"
52163      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52164      ;;
52165    xlc)
52166      DISABLE_WARNING_PREFIX="-qsuppress="
52167      CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
52168      ;;
52169  esac
52170
52171
52172
52173
52174
52175# Setup debug symbols (need objcopy from the toolchain for that)
52176
52177  #
52178  # NATIVE_DEBUG_SYMBOLS
52179  # This must be done after the toolchain is setup, since we're looking at objcopy.
52180  #
52181  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
52182$as_echo_n "checking what type of native debug symbols to use... " >&6; }
52183
52184# Check whether --with-native-debug-symbols was given.
52185if test "${with_native_debug_symbols+set}" = set; then :
52186  withval=$with_native_debug_symbols;
52187        if test "x$OPENJDK_TARGET_OS" = xaix; then
52188          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
52189            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
52190          fi
52191        fi
52192
52193else
52194
52195        if test "x$OPENJDK_TARGET_OS" = xaix; then
52196          # AIX doesn't support 'zipped' so use 'internal' as default
52197          with_native_debug_symbols="internal"
52198        else
52199          if test "x$STATIC_BUILD" = xtrue; then
52200            with_native_debug_symbols="none"
52201          else
52202            with_native_debug_symbols="zipped"
52203          fi
52204        fi
52205
52206fi
52207
52208  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
52209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
52210$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
52211
52212  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
52213
52214    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52215      if test "x$OBJCOPY" = x; then
52216        # enabling of enable-debug-symbols and can't find objcopy
52217        # this is an error
52218        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52219      fi
52220    fi
52221
52222    COMPILE_WITH_DEBUG_SYMBOLS=true
52223    COPY_DEBUG_SYMBOLS=true
52224    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
52225
52226    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
52227    DEBUG_BINARIES=false
52228    STRIP_POLICY=min_strip
52229
52230  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
52231    COMPILE_WITH_DEBUG_SYMBOLS=false
52232    COPY_DEBUG_SYMBOLS=false
52233    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52234
52235    DEBUG_BINARIES=false
52236    STRIP_POLICY=no_strip
52237  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
52238    COMPILE_WITH_DEBUG_SYMBOLS=true
52239    COPY_DEBUG_SYMBOLS=false
52240    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52241
52242    # Hotspot legacy support, will turn on -g when COPY_DEBUG_SYMBOLS=false
52243    DEBUG_BINARIES=true
52244    STRIP_POLICY=no_strip
52245    STRIP=""
52246
52247  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
52248
52249    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52250      if test "x$OBJCOPY" = x; then
52251        # enabling of enable-debug-symbols and can't find objcopy
52252        # this is an error
52253        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52254      fi
52255    fi
52256
52257    COMPILE_WITH_DEBUG_SYMBOLS=true
52258    COPY_DEBUG_SYMBOLS=true
52259    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52260
52261    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
52262    DEBUG_BINARIES=false
52263    STRIP_POLICY=min_strip
52264  else
52265    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
52266  fi
52267
52268  # --enable-debug-symbols is deprecated.
52269  # Please use --with-native-debug-symbols=[internal,external,zipped] .
52270
52271  # Check whether --enable-debug-symbols was given.
52272if test "${enable_debug_symbols+set}" = set; then :
52273  enableval=$enable_debug_symbols;
52274fi
52275
52276  if test "x$enable_debug_symbols" != x; then
52277    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
52278$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
52279
52280    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
52281      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
52282$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
52283    fi
52284
52285  fi
52286
52287
52288  # --enable-zip-debug-info is deprecated.
52289  # Please use --with-native-debug-symbols=zipped .
52290
52291  # Check whether --enable-zip-debug-info was given.
52292if test "${enable_zip_debug_info+set}" = set; then :
52293  enableval=$enable_zip_debug_info;
52294fi
52295
52296  if test "x$enable_zip_debug_info" != x; then
52297    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
52298$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
52299
52300    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
52301      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
52302$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
52303    fi
52304
52305  fi
52306
52307
52308
52309
52310
52311
52312  # Legacy values
52313
52314
52315
52316
52317  # Check whether --enable-native-coverage was given.
52318if test "${enable_native_coverage+set}" = set; then :
52319  enableval=$enable_native_coverage;
52320fi
52321
52322  GCOV_ENABLED="false"
52323  if test "x$enable_native_coverage" = "xyes"; then
52324    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
52325      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52326$as_echo_n "checking if native coverage is enabled... " >&6; }
52327      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52328$as_echo "yes" >&6; }
52329      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
52330      GCOV_LDFLAGS="-fprofile-arcs"
52331      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
52332      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
52333      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
52334      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
52335      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
52336      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
52337      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
52338      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
52339      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
52340      GCOV_ENABLED="true"
52341    else
52342      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
52343    fi
52344  elif test "x$enable_native_coverage" = "xno"; then
52345    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52346$as_echo_n "checking if native coverage is enabled... " >&6; }
52347    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52348$as_echo "no" >&6; }
52349  elif test "x$enable_native_coverage" != "x"; then
52350    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
52351  fi
52352
52353
52354
52355
52356# Need toolchain to setup dtrace
52357
52358  # Test for dtrace dependencies
52359  # Check whether --enable-dtrace was given.
52360if test "${enable_dtrace+set}" = set; then :
52361  enableval=$enable_dtrace;
52362fi
52363
52364
52365  DTRACE_DEP_MISSING=false
52366
52367  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
52368$as_echo_n "checking for dtrace tool... " >&6; }
52369  if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
52370    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
52371$as_echo "$DTRACE" >&6; }
52372  else
52373    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
52374$as_echo "not found, cannot build dtrace" >&6; }
52375    DTRACE_DEP_MISSING=true
52376  fi
52377
52378  for ac_header in sys/sdt.h
52379do :
52380  ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
52381if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
52382  cat >>confdefs.h <<_ACEOF
52383#define HAVE_SYS_SDT_H 1
52384_ACEOF
52385 DTRACE_HEADERS_OK=yes
52386else
52387  DTRACE_HEADERS_OK=no
52388fi
52389
52390done
52391
52392  if test "x$DTRACE_HEADERS_OK" != "xyes"; then
52393    DTRACE_DEP_MISSING=true
52394  fi
52395
52396  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
52397$as_echo_n "checking if dtrace should be built... " >&6; }
52398  if test "x$enable_dtrace" = "xyes"; then
52399    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52400      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52401$as_echo "no, missing dependencies" >&6; }
52402
52403  # Print a helpful message on how to acquire the necessary build dependency.
52404  # dtrace is the help tag: freetype, cups, alsa etc
52405  MISSING_DEPENDENCY=dtrace
52406
52407  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52408    cygwin_help $MISSING_DEPENDENCY
52409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52410    msys_help $MISSING_DEPENDENCY
52411  else
52412    PKGHANDLER_COMMAND=
52413
52414    case $PKGHANDLER in
52415      apt-get)
52416        apt_help     $MISSING_DEPENDENCY ;;
52417      yum)
52418        yum_help     $MISSING_DEPENDENCY ;;
52419      port)
52420        port_help    $MISSING_DEPENDENCY ;;
52421      pkgutil)
52422        pkgutil_help $MISSING_DEPENDENCY ;;
52423      pkgadd)
52424        pkgadd_help  $MISSING_DEPENDENCY ;;
52425    esac
52426
52427    if test "x$PKGHANDLER_COMMAND" != x; then
52428      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
52429    fi
52430  fi
52431
52432      as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
52433    else
52434      INCLUDE_DTRACE=true
52435      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52436$as_echo "yes, forced" >&6; }
52437    fi
52438  elif test "x$enable_dtrace" = "xno"; then
52439    INCLUDE_DTRACE=false
52440    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52441$as_echo "no, forced" >&6; }
52442  elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
52443    if test "x$OPENJDK_TARGET_OS" = "xlinux" && test "x$OPENJDK" != "xtrue"; then
52444      INCLUDE_DTRACE=false
52445      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, non-open linux build" >&5
52446$as_echo "no, non-open linux build" >&6; }
52447    elif test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52448      INCLUDE_DTRACE=false
52449      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52450$as_echo "no, missing dependencies" >&6; }
52451    else
52452      INCLUDE_DTRACE=true
52453      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
52454$as_echo "yes, dependencies present" >&6; }
52455    fi
52456  else
52457    as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
52458  fi
52459
52460
52461
52462  # The user can in some cases supply additional jvm features. For the custom
52463  # variant, this defines the entire variant.
52464
52465# Check whether --with-jvm-features was given.
52466if test "${with_jvm_features+set}" = set; then :
52467  withval=$with_jvm_features;
52468fi
52469
52470  if test "x$with_jvm_features" != x; then
52471    { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
52472$as_echo_n "checking additional JVM features... " >&6; }
52473    JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
52474    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
52475$as_echo "$JVM_FEATURES" >&6; }
52476  fi
52477
52478  # Verify that dependencies are met for explicitly set features.
52479  if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
52480    as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
52481  fi
52482
52483  if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
52484    as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
52485  fi
52486
52487  if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && !   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ; then
52488    as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2'" "$LINENO" 5
52489  fi
52490
52491  if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
52492    as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
52493  fi
52494
52495  if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
52496    as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
52497  fi
52498
52499  # Turn on additional features based on other parts of configure
52500  if test "x$INCLUDE_DTRACE" = "xtrue"; then
52501    JVM_FEATURES="$JVM_FEATURES dtrace"
52502  else
52503    if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
52504      as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
52505    fi
52506  fi
52507
52508  if test "x$STATIC_BUILD" = "xtrue"; then
52509    JVM_FEATURES="$JVM_FEATURES static-build"
52510  else
52511    if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
52512      as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
52513    fi
52514  fi
52515
52516  if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52517    if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
52518      as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
52519    fi
52520  fi
52521
52522  if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52523    if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
52524      as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
52525    fi
52526  fi
52527
52528  # Only enable jvmci on x86_64, sparcv9 and aarch64, and only on server.
52529  if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
52530      test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
52531      test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
52532    JVM_FEATURES_jvmci="jvmci"
52533  else
52534    JVM_FEATURES_jvmci=""
52535  fi
52536
52537  # All variants but minimal (and custom) get these features
52538  NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
52539
52540  # Enable features depending on variant.
52541  JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
52542  JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES"
52543  JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
52544  JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES"
52545  JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
52546  JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
52547  JVM_FEATURES_custom="$JVM_FEATURES"
52548
52549
52550
52551
52552
52553
52554
52555
52556
52557  # Used for verification of Makefiles by check-jvm-feature
52558
52559
52560  # We don't support --with-jvm-interpreter anymore, use zero instead.
52561
52562
52563# Check whether --with-jvm-interpreter was given.
52564if test "${with_jvm_interpreter+set}" = set; then :
52565  withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
52566$as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
52567fi
52568
52569
52570
52571
52572###############################################################################
52573#
52574# Check dependencies for external and internal libraries.
52575#
52576###############################################################################
52577
52578# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
52579
52580  # When using cygwin or msys, we need a wrapper binary that renames
52581  # /cygdrive/c/ arguments into c:/ arguments and peeks into
52582  # @files and rewrites these too! This wrapper binary is
52583  # called fixpath.
52584  FIXPATH=
52585  if test "x$OPENJDK_BUILD_OS" = xwindows; then
52586    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
52587$as_echo_n "checking if fixpath can be created... " >&6; }
52588    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
52589    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
52590    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
52591    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
52592      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
52593      FIXPATH="$FIXPATH_BIN -c"
52594    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
52595      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
52596      # @ was chosen as separator to minimize risk of other tools messing around with it
52597      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
52598          | tr ' ' '\n' | grep '^/./' | sort | uniq`
52599      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
52600      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
52601    fi
52602    FIXPATH_SRC_W="$FIXPATH_SRC"
52603    FIXPATH_BIN_W="$FIXPATH_BIN"
52604
52605  unix_path="$FIXPATH_SRC_W"
52606  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52607    windows_path=`$CYGPATH -m "$unix_path"`
52608    FIXPATH_SRC_W="$windows_path"
52609  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52610    windows_path=`cmd //c echo $unix_path`
52611    FIXPATH_SRC_W="$windows_path"
52612  fi
52613
52614
52615  unix_path="$FIXPATH_BIN_W"
52616  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52617    windows_path=`$CYGPATH -m "$unix_path"`
52618    FIXPATH_BIN_W="$windows_path"
52619  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52620    windows_path=`cmd //c echo $unix_path`
52621    FIXPATH_BIN_W="$windows_path"
52622  fi
52623
52624    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
52625    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
52626    cd $FIXPATH_DIR
52627    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
52628    cd $CURDIR
52629
52630    if test ! -x $FIXPATH_BIN; then
52631      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52632$as_echo "no" >&6; }
52633      cat $FIXPATH_DIR/fixpath1.log
52634      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
52635    fi
52636    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52637$as_echo "yes" >&6; }
52638    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
52639$as_echo_n "checking if fixpath.exe works... " >&6; }
52640    cd $FIXPATH_DIR
52641    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
52642        > $FIXPATH_DIR/fixpath2.log 2>&1
52643    cd $CURDIR
52644    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
52645      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52646$as_echo "no" >&6; }
52647      cat $FIXPATH_DIR/fixpath2.log
52648      as_fn_error $? "fixpath did not work!" "$LINENO" 5
52649    fi
52650    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52651$as_echo "yes" >&6; }
52652
52653    FIXPATH_DETACH_FLAG="--detach"
52654  fi
52655
52656
52657
52658
52659
52660
52661  # Check if X11 is needed
52662  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
52663    # No X11 support on windows or macosx
52664    NEEDS_LIB_X11=false
52665  else
52666    if test "x$SUPPORT_HEADFUL" = xno; then
52667      # No X11 support if building headless-only
52668      NEEDS_LIB_X11=false
52669    else
52670      # All other instances need X11
52671      NEEDS_LIB_X11=true
52672    fi
52673  fi
52674
52675  # Check if cups is needed
52676  if test "x$OPENJDK_TARGET_OS" = xwindows; then
52677    # Windows have a separate print system
52678    NEEDS_LIB_CUPS=false
52679  else
52680    NEEDS_LIB_CUPS=true
52681  fi
52682
52683  # Check if freetype is needed
52684  if test "x$OPENJDK" = "xtrue"; then
52685    NEEDS_LIB_FREETYPE=true
52686  else
52687    NEEDS_LIB_FREETYPE=false
52688  fi
52689
52690  # Check if alsa is needed
52691  if test "x$OPENJDK_TARGET_OS" = xlinux; then
52692    NEEDS_LIB_ALSA=true
52693  else
52694    NEEDS_LIB_ALSA=false
52695  fi
52696
52697  # Check if ffi is needed
52698  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52699    NEEDS_LIB_FFI=true
52700  else
52701    NEEDS_LIB_FFI=false
52702  fi
52703
52704
52705  # statically link libstdc++ before C++ ABI is stablized on Linux unless
52706  # dynamic build is configured on command line.
52707
52708# Check whether --with-stdc++lib was given.
52709if test "${with_stdc__lib+set}" = set; then :
52710  withval=$with_stdc__lib;
52711        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
52712                && test "x$with_stdc__lib" != xdefault; then
52713          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
52714        fi
52715
52716else
52717  with_stdc__lib=default
52718
52719fi
52720
52721
52722  if test "x$OPENJDK_TARGET_OS" = xlinux; then
52723    # Test if -lstdc++ works.
52724    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
52725$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
52726    ac_ext=cpp
52727ac_cpp='$CXXCPP $CPPFLAGS'
52728ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52729ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52730ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52731
52732    OLD_CXXFLAGS="$CXXFLAGS"
52733    CXXFLAGS="$CXXFLAGS -lstdc++"
52734    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52735/* end confdefs.h.  */
52736
52737int
52738main ()
52739{
52740return 0;
52741  ;
52742  return 0;
52743}
52744_ACEOF
52745if ac_fn_cxx_try_link "$LINENO"; then :
52746  has_dynamic_libstdcxx=yes
52747else
52748  has_dynamic_libstdcxx=no
52749fi
52750rm -f core conftest.err conftest.$ac_objext \
52751    conftest$ac_exeext conftest.$ac_ext
52752    CXXFLAGS="$OLD_CXXFLAGS"
52753    ac_ext=cpp
52754ac_cpp='$CXXCPP $CPPFLAGS'
52755ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52756ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52757ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52758
52759    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
52760$as_echo "$has_dynamic_libstdcxx" >&6; }
52761
52762    # Test if stdc++ can be linked statically.
52763    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
52764$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
52765    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
52766    ac_ext=cpp
52767ac_cpp='$CXXCPP $CPPFLAGS'
52768ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52769ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52770ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52771
52772    OLD_LIBS="$LIBS"
52773    OLD_CXX="$CXX"
52774    LIBS="$STATIC_STDCXX_FLAGS"
52775    CXX="$CC"
52776    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52777/* end confdefs.h.  */
52778
52779int
52780main ()
52781{
52782return 0;
52783  ;
52784  return 0;
52785}
52786_ACEOF
52787if ac_fn_cxx_try_link "$LINENO"; then :
52788  has_static_libstdcxx=yes
52789else
52790  has_static_libstdcxx=no
52791fi
52792rm -f core conftest.err conftest.$ac_objext \
52793    conftest$ac_exeext conftest.$ac_ext
52794    LIBS="$OLD_LIBS"
52795    CXX="$OLD_CXX"
52796    ac_ext=cpp
52797ac_cpp='$CXXCPP $CPPFLAGS'
52798ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52799ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52800ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52801
52802    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
52803$as_echo "$has_static_libstdcxx" >&6; }
52804
52805    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
52806      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
52807    fi
52808
52809    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
52810      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
52811    fi
52812
52813    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
52814      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
52815    fi
52816
52817    # If dynamic was requested, it's available since it would fail above otherwise.
52818    # If dynamic wasn't requested, go with static unless it isn't available.
52819    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
52820$as_echo_n "checking how to link with libstdc++... " >&6; }
52821    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52822      LIBCXX="$LIBCXX -lstdc++"
52823      # To help comparisons with old build, put stdc++ first in JVM_LIBS
52824      JVM_LIBS="-lstdc++ $JVM_LIBS"
52825      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
52826      # just use the same setting as for the TARGET toolchain.
52827      OPENJDK_BUILD_JVM_LIBS="-lstdc++ $OPENJDK_BUILD_JVM_LIBS"
52828      LDCXX="$CXX"
52829      STATIC_CXX_SETTING="STATIC_CXX=false"
52830      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
52831$as_echo "dynamic" >&6; }
52832    else
52833      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
52834      JVM_LDFLAGS="$JVM_LDFLAGS -static-libgcc"
52835      # To help comparisons with old build, put stdc++ first in JVM_LIBS
52836      JVM_LIBS="-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic $JVM_LIBS"
52837      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
52838      # just use the same setting as for the TARGET toolchain.
52839      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -static-libgcc"
52840      OPENJDK_BUILD_JVM_LIBS="-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic $OPENJDK_BUILD_JVM_LIBS"
52841      LDCXX="$CC"
52842      STATIC_CXX_SETTING="STATIC_CXX=true"
52843      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
52844$as_echo "static" >&6; }
52845    fi
52846  fi
52847
52848
52849  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
52850  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
52851    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
52852  fi
52853
52854  # TODO better (platform agnostic) test
52855  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
52856    LIBCXX="-lstdc++"
52857  fi
52858
52859
52860  # Setup Windows runtime dlls
52861  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
52862
52863
52864# Check whether --with-msvcr-dll was given.
52865if test "${with_msvcr_dll+set}" = set; then :
52866  withval=$with_msvcr_dll;
52867fi
52868
52869
52870  if test "x$with_msvcr_dll" != x; then
52871    # If given explicitely by user, do not probe. If not present, fail directly.
52872
52873  DLL_NAME="$MSVCR_NAME"
52874  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
52875  METHOD="--with-msvcr-dll"
52876  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
52877    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
52878$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
52879
52880    # Need to check if the found msvcr is correct architecture
52881    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
52882$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
52883    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
52884    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52885      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
52886      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
52887      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52888        CORRECT_MSVCR_ARCH="PE32 executable"
52889      else
52890        CORRECT_MSVCR_ARCH="PE32+ executable"
52891      fi
52892    else
52893      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52894        CORRECT_MSVCR_ARCH=386
52895      else
52896        CORRECT_MSVCR_ARCH=x86-64
52897      fi
52898    fi
52899    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
52900      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
52901$as_echo "ok" >&6; }
52902      MSVC_DLL="$POSSIBLE_MSVC_DLL"
52903
52904  # Only process if variable expands to non-empty
52905
52906  if test "x$MSVC_DLL" != x; then
52907    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52908
52909  # Input might be given as Windows format, start by converting to
52910  # unix format.
52911  path="$MSVC_DLL"
52912  new_path=`$CYGPATH -u "$path"`
52913
52914  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52915  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52916  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52917  # "foo.exe" is OK but "foo" is an error.
52918  #
52919  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52920  # It is also a way to make sure we got the proper file name for the real test later on.
52921  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52922  if test "x$test_shortpath" = x; then
52923    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52924$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52925    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
52926  fi
52927
52928  # Call helper function which possibly converts this using DOS-style short mode.
52929  # If so, the updated path is stored in $new_path.
52930
52931  input_path="$new_path"
52932  # Check if we need to convert this using DOS-style short mode. If the path
52933  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52934  # take no chances and rewrite it.
52935  # Note: m4 eats our [], so we need to use [ and ] instead.
52936  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52937  if test "x$has_forbidden_chars" != x; then
52938    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52939    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52940    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52941    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52942      # Going to short mode and back again did indeed matter. Since short mode is
52943      # case insensitive, let's make it lowercase to improve readability.
52944      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52945      # Now convert it back to Unix-style (cygpath)
52946      input_path=`$CYGPATH -u "$shortmode_path"`
52947      new_path="$input_path"
52948    fi
52949  fi
52950
52951  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52952  if test "x$test_cygdrive_prefix" = x; then
52953    # As a simple fix, exclude /usr/bin since it's not a real path.
52954    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52955      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52956      # a path prefixed by /cygdrive for fixpath to work.
52957      new_path="$CYGWIN_ROOT_PATH$input_path"
52958    fi
52959  fi
52960
52961
52962  if test "x$path" != "x$new_path"; then
52963    MSVC_DLL="$new_path"
52964    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52965$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52966  fi
52967
52968    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52969
52970  path="$MSVC_DLL"
52971  has_colon=`$ECHO $path | $GREP ^.:`
52972  new_path="$path"
52973  if test "x$has_colon" = x; then
52974    # Not in mixed or Windows style, start by that.
52975    new_path=`cmd //c echo $path`
52976  fi
52977
52978
52979  input_path="$new_path"
52980  # Check if we need to convert this using DOS-style short mode. If the path
52981  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52982  # take no chances and rewrite it.
52983  # Note: m4 eats our [], so we need to use [ and ] instead.
52984  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52985  if test "x$has_forbidden_chars" != x; then
52986    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52987    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52988  fi
52989
52990
52991  windows_path="$new_path"
52992  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52993    unix_path=`$CYGPATH -u "$windows_path"`
52994    new_path="$unix_path"
52995  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52996    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52997    new_path="$unix_path"
52998  fi
52999
53000  if test "x$path" != "x$new_path"; then
53001    MSVC_DLL="$new_path"
53002    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53003$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53004  fi
53005
53006  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53007  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53008
53009    else
53010      # We're on a unix platform. Hooray! :)
53011      path="$MSVC_DLL"
53012      has_space=`$ECHO "$path" | $GREP " "`
53013      if test "x$has_space" != x; then
53014        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53015$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53016        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53017      fi
53018
53019      # Use eval to expand a potential ~
53020      eval path="$path"
53021      if test ! -f "$path" && test ! -d "$path"; then
53022        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53023      fi
53024
53025      if test -d "$path"; then
53026        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53027      else
53028        dir="`$DIRNAME "$path"`"
53029        base="`$BASENAME "$path"`"
53030        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53031      fi
53032    fi
53033  fi
53034
53035      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53036$as_echo_n "checking for $DLL_NAME... " >&6; }
53037      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53038$as_echo "$MSVC_DLL" >&6; }
53039    else
53040      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53041$as_echo "incorrect, ignoring" >&6; }
53042      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53043$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53044    fi
53045  fi
53046
53047    if test "x$MSVC_DLL" = x; then
53048      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
53049    fi
53050    MSVCR_DLL="$MSVC_DLL"
53051  elif test "x$DEVKIT_MSVCR_DLL" != x; then
53052
53053  DLL_NAME="$MSVCR_NAME"
53054  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
53055  METHOD="devkit"
53056  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53057    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53058$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53059
53060    # Need to check if the found msvcr is correct architecture
53061    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53062$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53063    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53064    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53065      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53066      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53067      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53068        CORRECT_MSVCR_ARCH="PE32 executable"
53069      else
53070        CORRECT_MSVCR_ARCH="PE32+ executable"
53071      fi
53072    else
53073      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53074        CORRECT_MSVCR_ARCH=386
53075      else
53076        CORRECT_MSVCR_ARCH=x86-64
53077      fi
53078    fi
53079    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53080      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53081$as_echo "ok" >&6; }
53082      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53083
53084  # Only process if variable expands to non-empty
53085
53086  if test "x$MSVC_DLL" != x; then
53087    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53088
53089  # Input might be given as Windows format, start by converting to
53090  # unix format.
53091  path="$MSVC_DLL"
53092  new_path=`$CYGPATH -u "$path"`
53093
53094  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53095  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53096  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53097  # "foo.exe" is OK but "foo" is an error.
53098  #
53099  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53100  # It is also a way to make sure we got the proper file name for the real test later on.
53101  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53102  if test "x$test_shortpath" = x; then
53103    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53104$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53105    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53106  fi
53107
53108  # Call helper function which possibly converts this using DOS-style short mode.
53109  # If so, the updated path is stored in $new_path.
53110
53111  input_path="$new_path"
53112  # Check if we need to convert this using DOS-style short mode. If the path
53113  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53114  # take no chances and rewrite it.
53115  # Note: m4 eats our [], so we need to use [ and ] instead.
53116  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53117  if test "x$has_forbidden_chars" != x; then
53118    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53119    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53120    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53121    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53122      # Going to short mode and back again did indeed matter. Since short mode is
53123      # case insensitive, let's make it lowercase to improve readability.
53124      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53125      # Now convert it back to Unix-style (cygpath)
53126      input_path=`$CYGPATH -u "$shortmode_path"`
53127      new_path="$input_path"
53128    fi
53129  fi
53130
53131  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53132  if test "x$test_cygdrive_prefix" = x; then
53133    # As a simple fix, exclude /usr/bin since it's not a real path.
53134    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53135      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53136      # a path prefixed by /cygdrive for fixpath to work.
53137      new_path="$CYGWIN_ROOT_PATH$input_path"
53138    fi
53139  fi
53140
53141
53142  if test "x$path" != "x$new_path"; then
53143    MSVC_DLL="$new_path"
53144    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53145$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53146  fi
53147
53148    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53149
53150  path="$MSVC_DLL"
53151  has_colon=`$ECHO $path | $GREP ^.:`
53152  new_path="$path"
53153  if test "x$has_colon" = x; then
53154    # Not in mixed or Windows style, start by that.
53155    new_path=`cmd //c echo $path`
53156  fi
53157
53158
53159  input_path="$new_path"
53160  # Check if we need to convert this using DOS-style short mode. If the path
53161  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53162  # take no chances and rewrite it.
53163  # Note: m4 eats our [], so we need to use [ and ] instead.
53164  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53165  if test "x$has_forbidden_chars" != x; then
53166    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53167    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53168  fi
53169
53170
53171  windows_path="$new_path"
53172  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53173    unix_path=`$CYGPATH -u "$windows_path"`
53174    new_path="$unix_path"
53175  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53176    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53177    new_path="$unix_path"
53178  fi
53179
53180  if test "x$path" != "x$new_path"; then
53181    MSVC_DLL="$new_path"
53182    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53183$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53184  fi
53185
53186  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53187  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53188
53189    else
53190      # We're on a unix platform. Hooray! :)
53191      path="$MSVC_DLL"
53192      has_space=`$ECHO "$path" | $GREP " "`
53193      if test "x$has_space" != x; then
53194        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53195$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53196        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53197      fi
53198
53199      # Use eval to expand a potential ~
53200      eval path="$path"
53201      if test ! -f "$path" && test ! -d "$path"; then
53202        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53203      fi
53204
53205      if test -d "$path"; then
53206        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53207      else
53208        dir="`$DIRNAME "$path"`"
53209        base="`$BASENAME "$path"`"
53210        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53211      fi
53212    fi
53213  fi
53214
53215      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53216$as_echo_n "checking for $DLL_NAME... " >&6; }
53217      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53218$as_echo "$MSVC_DLL" >&6; }
53219    else
53220      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53221$as_echo "incorrect, ignoring" >&6; }
53222      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53223$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53224    fi
53225  fi
53226
53227    if test "x$MSVC_DLL" = x; then
53228      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
53229    fi
53230    MSVCR_DLL="$MSVC_DLL"
53231  else
53232
53233  DLL_NAME="${MSVCR_NAME}"
53234  MSVC_DLL=
53235
53236  if test "x$MSVC_DLL" = x; then
53237    # Probe: Using well-known location from Visual Studio 10.0
53238    if test "x$VCINSTALLDIR" != x; then
53239      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
53240
53241  windows_path="$CYGWIN_VC_INSTALL_DIR"
53242  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53243    unix_path=`$CYGPATH -u "$windows_path"`
53244    CYGWIN_VC_INSTALL_DIR="$unix_path"
53245  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53246    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53247    CYGWIN_VC_INSTALL_DIR="$unix_path"
53248  fi
53249
53250      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53251        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53252      else
53253        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53254      fi
53255      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
53256
53257  DLL_NAME="$DLL_NAME"
53258  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53259  METHOD="well-known location in VCINSTALLDIR"
53260  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53261    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53262$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53263
53264    # Need to check if the found msvcr is correct architecture
53265    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53266$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53267    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53268    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53269      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53270      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53271      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53272        CORRECT_MSVCR_ARCH="PE32 executable"
53273      else
53274        CORRECT_MSVCR_ARCH="PE32+ executable"
53275      fi
53276    else
53277      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53278        CORRECT_MSVCR_ARCH=386
53279      else
53280        CORRECT_MSVCR_ARCH=x86-64
53281      fi
53282    fi
53283    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53284      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53285$as_echo "ok" >&6; }
53286      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53287
53288  # Only process if variable expands to non-empty
53289
53290  if test "x$MSVC_DLL" != x; then
53291    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53292
53293  # Input might be given as Windows format, start by converting to
53294  # unix format.
53295  path="$MSVC_DLL"
53296  new_path=`$CYGPATH -u "$path"`
53297
53298  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53299  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53300  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53301  # "foo.exe" is OK but "foo" is an error.
53302  #
53303  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53304  # It is also a way to make sure we got the proper file name for the real test later on.
53305  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53306  if test "x$test_shortpath" = x; then
53307    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53308$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53309    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53310  fi
53311
53312  # Call helper function which possibly converts this using DOS-style short mode.
53313  # If so, the updated path is stored in $new_path.
53314
53315  input_path="$new_path"
53316  # Check if we need to convert this using DOS-style short mode. If the path
53317  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53318  # take no chances and rewrite it.
53319  # Note: m4 eats our [], so we need to use [ and ] instead.
53320  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53321  if test "x$has_forbidden_chars" != x; then
53322    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53323    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53324    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53325    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53326      # Going to short mode and back again did indeed matter. Since short mode is
53327      # case insensitive, let's make it lowercase to improve readability.
53328      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53329      # Now convert it back to Unix-style (cygpath)
53330      input_path=`$CYGPATH -u "$shortmode_path"`
53331      new_path="$input_path"
53332    fi
53333  fi
53334
53335  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53336  if test "x$test_cygdrive_prefix" = x; then
53337    # As a simple fix, exclude /usr/bin since it's not a real path.
53338    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53339      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53340      # a path prefixed by /cygdrive for fixpath to work.
53341      new_path="$CYGWIN_ROOT_PATH$input_path"
53342    fi
53343  fi
53344
53345
53346  if test "x$path" != "x$new_path"; then
53347    MSVC_DLL="$new_path"
53348    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53349$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53350  fi
53351
53352    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53353
53354  path="$MSVC_DLL"
53355  has_colon=`$ECHO $path | $GREP ^.:`
53356  new_path="$path"
53357  if test "x$has_colon" = x; then
53358    # Not in mixed or Windows style, start by that.
53359    new_path=`cmd //c echo $path`
53360  fi
53361
53362
53363  input_path="$new_path"
53364  # Check if we need to convert this using DOS-style short mode. If the path
53365  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53366  # take no chances and rewrite it.
53367  # Note: m4 eats our [], so we need to use [ and ] instead.
53368  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53369  if test "x$has_forbidden_chars" != x; then
53370    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53371    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53372  fi
53373
53374
53375  windows_path="$new_path"
53376  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53377    unix_path=`$CYGPATH -u "$windows_path"`
53378    new_path="$unix_path"
53379  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53380    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53381    new_path="$unix_path"
53382  fi
53383
53384  if test "x$path" != "x$new_path"; then
53385    MSVC_DLL="$new_path"
53386    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53387$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53388  fi
53389
53390  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53391  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53392
53393    else
53394      # We're on a unix platform. Hooray! :)
53395      path="$MSVC_DLL"
53396      has_space=`$ECHO "$path" | $GREP " "`
53397      if test "x$has_space" != x; then
53398        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53399$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53400        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53401      fi
53402
53403      # Use eval to expand a potential ~
53404      eval path="$path"
53405      if test ! -f "$path" && test ! -d "$path"; then
53406        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53407      fi
53408
53409      if test -d "$path"; then
53410        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53411      else
53412        dir="`$DIRNAME "$path"`"
53413        base="`$BASENAME "$path"`"
53414        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53415      fi
53416    fi
53417  fi
53418
53419      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53420$as_echo_n "checking for $DLL_NAME... " >&6; }
53421      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53422$as_echo "$MSVC_DLL" >&6; }
53423    else
53424      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53425$as_echo "incorrect, ignoring" >&6; }
53426      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53427$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53428    fi
53429  fi
53430
53431    fi
53432  fi
53433
53434  if test "x$MSVC_DLL" = x; then
53435    # Probe: Check in the Boot JDK directory.
53436    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
53437
53438  DLL_NAME="$DLL_NAME"
53439  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53440  METHOD="well-known location in Boot JDK"
53441  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53442    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53443$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53444
53445    # Need to check if the found msvcr is correct architecture
53446    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53447$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53448    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53449    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53450      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53451      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53452      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53453        CORRECT_MSVCR_ARCH="PE32 executable"
53454      else
53455        CORRECT_MSVCR_ARCH="PE32+ executable"
53456      fi
53457    else
53458      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53459        CORRECT_MSVCR_ARCH=386
53460      else
53461        CORRECT_MSVCR_ARCH=x86-64
53462      fi
53463    fi
53464    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53465      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53466$as_echo "ok" >&6; }
53467      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53468
53469  # Only process if variable expands to non-empty
53470
53471  if test "x$MSVC_DLL" != x; then
53472    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53473
53474  # Input might be given as Windows format, start by converting to
53475  # unix format.
53476  path="$MSVC_DLL"
53477  new_path=`$CYGPATH -u "$path"`
53478
53479  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53480  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53481  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53482  # "foo.exe" is OK but "foo" is an error.
53483  #
53484  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53485  # It is also a way to make sure we got the proper file name for the real test later on.
53486  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53487  if test "x$test_shortpath" = x; then
53488    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53489$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53490    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53491  fi
53492
53493  # Call helper function which possibly converts this using DOS-style short mode.
53494  # If so, the updated path is stored in $new_path.
53495
53496  input_path="$new_path"
53497  # Check if we need to convert this using DOS-style short mode. If the path
53498  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53499  # take no chances and rewrite it.
53500  # Note: m4 eats our [], so we need to use [ and ] instead.
53501  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53502  if test "x$has_forbidden_chars" != x; then
53503    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53504    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53505    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53506    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53507      # Going to short mode and back again did indeed matter. Since short mode is
53508      # case insensitive, let's make it lowercase to improve readability.
53509      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53510      # Now convert it back to Unix-style (cygpath)
53511      input_path=`$CYGPATH -u "$shortmode_path"`
53512      new_path="$input_path"
53513    fi
53514  fi
53515
53516  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53517  if test "x$test_cygdrive_prefix" = x; then
53518    # As a simple fix, exclude /usr/bin since it's not a real path.
53519    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53520      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53521      # a path prefixed by /cygdrive for fixpath to work.
53522      new_path="$CYGWIN_ROOT_PATH$input_path"
53523    fi
53524  fi
53525
53526
53527  if test "x$path" != "x$new_path"; then
53528    MSVC_DLL="$new_path"
53529    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53530$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53531  fi
53532
53533    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53534
53535  path="$MSVC_DLL"
53536  has_colon=`$ECHO $path | $GREP ^.:`
53537  new_path="$path"
53538  if test "x$has_colon" = x; then
53539    # Not in mixed or Windows style, start by that.
53540    new_path=`cmd //c echo $path`
53541  fi
53542
53543
53544  input_path="$new_path"
53545  # Check if we need to convert this using DOS-style short mode. If the path
53546  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53547  # take no chances and rewrite it.
53548  # Note: m4 eats our [], so we need to use [ and ] instead.
53549  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53550  if test "x$has_forbidden_chars" != x; then
53551    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53552    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53553  fi
53554
53555
53556  windows_path="$new_path"
53557  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53558    unix_path=`$CYGPATH -u "$windows_path"`
53559    new_path="$unix_path"
53560  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53561    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53562    new_path="$unix_path"
53563  fi
53564
53565  if test "x$path" != "x$new_path"; then
53566    MSVC_DLL="$new_path"
53567    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53568$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53569  fi
53570
53571  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53572  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53573
53574    else
53575      # We're on a unix platform. Hooray! :)
53576      path="$MSVC_DLL"
53577      has_space=`$ECHO "$path" | $GREP " "`
53578      if test "x$has_space" != x; then
53579        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53580$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53581        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53582      fi
53583
53584      # Use eval to expand a potential ~
53585      eval path="$path"
53586      if test ! -f "$path" && test ! -d "$path"; then
53587        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53588      fi
53589
53590      if test -d "$path"; then
53591        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53592      else
53593        dir="`$DIRNAME "$path"`"
53594        base="`$BASENAME "$path"`"
53595        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53596      fi
53597    fi
53598  fi
53599
53600      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53601$as_echo_n "checking for $DLL_NAME... " >&6; }
53602      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53603$as_echo "$MSVC_DLL" >&6; }
53604    else
53605      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53606$as_echo "incorrect, ignoring" >&6; }
53607      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53608$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53609    fi
53610  fi
53611
53612  fi
53613
53614  if test "x$MSVC_DLL" = x; then
53615    # Probe: Look in the Windows system32 directory
53616    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
53617
53618  windows_path="$CYGWIN_SYSTEMROOT"
53619  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53620    unix_path=`$CYGPATH -u "$windows_path"`
53621    CYGWIN_SYSTEMROOT="$unix_path"
53622  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53623    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53624    CYGWIN_SYSTEMROOT="$unix_path"
53625  fi
53626
53627    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
53628
53629  DLL_NAME="$DLL_NAME"
53630  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53631  METHOD="well-known location in SYSTEMROOT"
53632  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53633    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53634$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53635
53636    # Need to check if the found msvcr is correct architecture
53637    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53638$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53639    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53640    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53641      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53642      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53643      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53644        CORRECT_MSVCR_ARCH="PE32 executable"
53645      else
53646        CORRECT_MSVCR_ARCH="PE32+ executable"
53647      fi
53648    else
53649      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53650        CORRECT_MSVCR_ARCH=386
53651      else
53652        CORRECT_MSVCR_ARCH=x86-64
53653      fi
53654    fi
53655    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53656      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53657$as_echo "ok" >&6; }
53658      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53659
53660  # Only process if variable expands to non-empty
53661
53662  if test "x$MSVC_DLL" != x; then
53663    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53664
53665  # Input might be given as Windows format, start by converting to
53666  # unix format.
53667  path="$MSVC_DLL"
53668  new_path=`$CYGPATH -u "$path"`
53669
53670  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53671  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53672  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53673  # "foo.exe" is OK but "foo" is an error.
53674  #
53675  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53676  # It is also a way to make sure we got the proper file name for the real test later on.
53677  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53678  if test "x$test_shortpath" = x; then
53679    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53680$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53681    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53682  fi
53683
53684  # Call helper function which possibly converts this using DOS-style short mode.
53685  # If so, the updated path is stored in $new_path.
53686
53687  input_path="$new_path"
53688  # Check if we need to convert this using DOS-style short mode. If the path
53689  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53690  # take no chances and rewrite it.
53691  # Note: m4 eats our [], so we need to use [ and ] instead.
53692  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53693  if test "x$has_forbidden_chars" != x; then
53694    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53695    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53696    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53697    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53698      # Going to short mode and back again did indeed matter. Since short mode is
53699      # case insensitive, let's make it lowercase to improve readability.
53700      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53701      # Now convert it back to Unix-style (cygpath)
53702      input_path=`$CYGPATH -u "$shortmode_path"`
53703      new_path="$input_path"
53704    fi
53705  fi
53706
53707  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53708  if test "x$test_cygdrive_prefix" = x; then
53709    # As a simple fix, exclude /usr/bin since it's not a real path.
53710    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53711      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53712      # a path prefixed by /cygdrive for fixpath to work.
53713      new_path="$CYGWIN_ROOT_PATH$input_path"
53714    fi
53715  fi
53716
53717
53718  if test "x$path" != "x$new_path"; then
53719    MSVC_DLL="$new_path"
53720    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53721$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53722  fi
53723
53724    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53725
53726  path="$MSVC_DLL"
53727  has_colon=`$ECHO $path | $GREP ^.:`
53728  new_path="$path"
53729  if test "x$has_colon" = x; then
53730    # Not in mixed or Windows style, start by that.
53731    new_path=`cmd //c echo $path`
53732  fi
53733
53734
53735  input_path="$new_path"
53736  # Check if we need to convert this using DOS-style short mode. If the path
53737  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53738  # take no chances and rewrite it.
53739  # Note: m4 eats our [], so we need to use [ and ] instead.
53740  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53741  if test "x$has_forbidden_chars" != x; then
53742    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53743    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53744  fi
53745
53746
53747  windows_path="$new_path"
53748  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53749    unix_path=`$CYGPATH -u "$windows_path"`
53750    new_path="$unix_path"
53751  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53752    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53753    new_path="$unix_path"
53754  fi
53755
53756  if test "x$path" != "x$new_path"; then
53757    MSVC_DLL="$new_path"
53758    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53759$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53760  fi
53761
53762  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53763  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53764
53765    else
53766      # We're on a unix platform. Hooray! :)
53767      path="$MSVC_DLL"
53768      has_space=`$ECHO "$path" | $GREP " "`
53769      if test "x$has_space" != x; then
53770        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53771$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53772        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53773      fi
53774
53775      # Use eval to expand a potential ~
53776      eval path="$path"
53777      if test ! -f "$path" && test ! -d "$path"; then
53778        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53779      fi
53780
53781      if test -d "$path"; then
53782        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53783      else
53784        dir="`$DIRNAME "$path"`"
53785        base="`$BASENAME "$path"`"
53786        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53787      fi
53788    fi
53789  fi
53790
53791      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53792$as_echo_n "checking for $DLL_NAME... " >&6; }
53793      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53794$as_echo "$MSVC_DLL" >&6; }
53795    else
53796      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53797$as_echo "incorrect, ignoring" >&6; }
53798      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53799$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53800    fi
53801  fi
53802
53803  fi
53804
53805  if test "x$MSVC_DLL" = x; then
53806    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
53807    if test "x$VS100COMNTOOLS" != x; then
53808      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
53809
53810  windows_path="$CYGWIN_VS_TOOLS_DIR"
53811  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53812    unix_path=`$CYGPATH -u "$windows_path"`
53813    CYGWIN_VS_TOOLS_DIR="$unix_path"
53814  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53815    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53816    CYGWIN_VS_TOOLS_DIR="$unix_path"
53817  fi
53818
53819      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53820        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
53821	    | $GREP -i /x64/ | $HEAD --lines 1`
53822      else
53823        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
53824	    | $GREP -i /x86/ | $HEAD --lines 1`
53825      fi
53826
53827  DLL_NAME="$DLL_NAME"
53828  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53829  METHOD="search of VS100COMNTOOLS"
53830  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53831    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53832$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53833
53834    # Need to check if the found msvcr is correct architecture
53835    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53836$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53837    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53838    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53839      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53840      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53841      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53842        CORRECT_MSVCR_ARCH="PE32 executable"
53843      else
53844        CORRECT_MSVCR_ARCH="PE32+ executable"
53845      fi
53846    else
53847      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53848        CORRECT_MSVCR_ARCH=386
53849      else
53850        CORRECT_MSVCR_ARCH=x86-64
53851      fi
53852    fi
53853    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53854      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53855$as_echo "ok" >&6; }
53856      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53857
53858  # Only process if variable expands to non-empty
53859
53860  if test "x$MSVC_DLL" != x; then
53861    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53862
53863  # Input might be given as Windows format, start by converting to
53864  # unix format.
53865  path="$MSVC_DLL"
53866  new_path=`$CYGPATH -u "$path"`
53867
53868  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53869  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53870  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53871  # "foo.exe" is OK but "foo" is an error.
53872  #
53873  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53874  # It is also a way to make sure we got the proper file name for the real test later on.
53875  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53876  if test "x$test_shortpath" = x; then
53877    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53878$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53879    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53880  fi
53881
53882  # Call helper function which possibly converts this using DOS-style short mode.
53883  # If so, the updated path is stored in $new_path.
53884
53885  input_path="$new_path"
53886  # Check if we need to convert this using DOS-style short mode. If the path
53887  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53888  # take no chances and rewrite it.
53889  # Note: m4 eats our [], so we need to use [ and ] instead.
53890  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53891  if test "x$has_forbidden_chars" != x; then
53892    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53893    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53894    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53895    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53896      # Going to short mode and back again did indeed matter. Since short mode is
53897      # case insensitive, let's make it lowercase to improve readability.
53898      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53899      # Now convert it back to Unix-style (cygpath)
53900      input_path=`$CYGPATH -u "$shortmode_path"`
53901      new_path="$input_path"
53902    fi
53903  fi
53904
53905  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53906  if test "x$test_cygdrive_prefix" = x; then
53907    # As a simple fix, exclude /usr/bin since it's not a real path.
53908    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53909      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53910      # a path prefixed by /cygdrive for fixpath to work.
53911      new_path="$CYGWIN_ROOT_PATH$input_path"
53912    fi
53913  fi
53914
53915
53916  if test "x$path" != "x$new_path"; then
53917    MSVC_DLL="$new_path"
53918    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53919$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53920  fi
53921
53922    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53923
53924  path="$MSVC_DLL"
53925  has_colon=`$ECHO $path | $GREP ^.:`
53926  new_path="$path"
53927  if test "x$has_colon" = x; then
53928    # Not in mixed or Windows style, start by that.
53929    new_path=`cmd //c echo $path`
53930  fi
53931
53932
53933  input_path="$new_path"
53934  # Check if we need to convert this using DOS-style short mode. If the path
53935  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53936  # take no chances and rewrite it.
53937  # Note: m4 eats our [], so we need to use [ and ] instead.
53938  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53939  if test "x$has_forbidden_chars" != x; then
53940    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53941    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53942  fi
53943
53944
53945  windows_path="$new_path"
53946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53947    unix_path=`$CYGPATH -u "$windows_path"`
53948    new_path="$unix_path"
53949  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53950    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53951    new_path="$unix_path"
53952  fi
53953
53954  if test "x$path" != "x$new_path"; then
53955    MSVC_DLL="$new_path"
53956    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53957$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53958  fi
53959
53960  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53961  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53962
53963    else
53964      # We're on a unix platform. Hooray! :)
53965      path="$MSVC_DLL"
53966      has_space=`$ECHO "$path" | $GREP " "`
53967      if test "x$has_space" != x; then
53968        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53969$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53970        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53971      fi
53972
53973      # Use eval to expand a potential ~
53974      eval path="$path"
53975      if test ! -f "$path" && test ! -d "$path"; then
53976        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53977      fi
53978
53979      if test -d "$path"; then
53980        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53981      else
53982        dir="`$DIRNAME "$path"`"
53983        base="`$BASENAME "$path"`"
53984        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53985      fi
53986    fi
53987  fi
53988
53989      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53990$as_echo_n "checking for $DLL_NAME... " >&6; }
53991      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53992$as_echo "$MSVC_DLL" >&6; }
53993    else
53994      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53995$as_echo "incorrect, ignoring" >&6; }
53996      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53997$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53998    fi
53999  fi
54000
54001    fi
54002  fi
54003
54004  if test "x$MSVC_DLL" = x; then
54005    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
54006    # (This was the original behaviour; kept since it might turn something up)
54007    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
54008      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54009        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54010	    | $GREP x64 | $HEAD --lines 1`
54011      else
54012        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54013	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
54014        if test "x$POSSIBLE_MSVC_DLL" = x; then
54015          # We're grasping at straws now...
54016          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54017	      | $HEAD --lines 1`
54018        fi
54019      fi
54020
54021
54022  DLL_NAME="$DLL_NAME"
54023  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54024  METHOD="search of VCINSTALLDIR"
54025  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54026    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54027$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54028
54029    # Need to check if the found msvcr is correct architecture
54030    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54031$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54032    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54033    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54034      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54035      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54036      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54037        CORRECT_MSVCR_ARCH="PE32 executable"
54038      else
54039        CORRECT_MSVCR_ARCH="PE32+ executable"
54040      fi
54041    else
54042      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54043        CORRECT_MSVCR_ARCH=386
54044      else
54045        CORRECT_MSVCR_ARCH=x86-64
54046      fi
54047    fi
54048    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54049      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54050$as_echo "ok" >&6; }
54051      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54052
54053  # Only process if variable expands to non-empty
54054
54055  if test "x$MSVC_DLL" != x; then
54056    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54057
54058  # Input might be given as Windows format, start by converting to
54059  # unix format.
54060  path="$MSVC_DLL"
54061  new_path=`$CYGPATH -u "$path"`
54062
54063  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54064  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54065  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54066  # "foo.exe" is OK but "foo" is an error.
54067  #
54068  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54069  # It is also a way to make sure we got the proper file name for the real test later on.
54070  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54071  if test "x$test_shortpath" = x; then
54072    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54073$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54074    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54075  fi
54076
54077  # Call helper function which possibly converts this using DOS-style short mode.
54078  # If so, the updated path is stored in $new_path.
54079
54080  input_path="$new_path"
54081  # Check if we need to convert this using DOS-style short mode. If the path
54082  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54083  # take no chances and rewrite it.
54084  # Note: m4 eats our [], so we need to use [ and ] instead.
54085  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54086  if test "x$has_forbidden_chars" != x; then
54087    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54088    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54089    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54090    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54091      # Going to short mode and back again did indeed matter. Since short mode is
54092      # case insensitive, let's make it lowercase to improve readability.
54093      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54094      # Now convert it back to Unix-style (cygpath)
54095      input_path=`$CYGPATH -u "$shortmode_path"`
54096      new_path="$input_path"
54097    fi
54098  fi
54099
54100  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54101  if test "x$test_cygdrive_prefix" = x; then
54102    # As a simple fix, exclude /usr/bin since it's not a real path.
54103    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54104      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54105      # a path prefixed by /cygdrive for fixpath to work.
54106      new_path="$CYGWIN_ROOT_PATH$input_path"
54107    fi
54108  fi
54109
54110
54111  if test "x$path" != "x$new_path"; then
54112    MSVC_DLL="$new_path"
54113    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54114$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54115  fi
54116
54117    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54118
54119  path="$MSVC_DLL"
54120  has_colon=`$ECHO $path | $GREP ^.:`
54121  new_path="$path"
54122  if test "x$has_colon" = x; then
54123    # Not in mixed or Windows style, start by that.
54124    new_path=`cmd //c echo $path`
54125  fi
54126
54127
54128  input_path="$new_path"
54129  # Check if we need to convert this using DOS-style short mode. If the path
54130  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54131  # take no chances and rewrite it.
54132  # Note: m4 eats our [], so we need to use [ and ] instead.
54133  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54134  if test "x$has_forbidden_chars" != x; then
54135    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54136    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54137  fi
54138
54139
54140  windows_path="$new_path"
54141  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54142    unix_path=`$CYGPATH -u "$windows_path"`
54143    new_path="$unix_path"
54144  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54145    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54146    new_path="$unix_path"
54147  fi
54148
54149  if test "x$path" != "x$new_path"; then
54150    MSVC_DLL="$new_path"
54151    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54152$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54153  fi
54154
54155  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54156  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54157
54158    else
54159      # We're on a unix platform. Hooray! :)
54160      path="$MSVC_DLL"
54161      has_space=`$ECHO "$path" | $GREP " "`
54162      if test "x$has_space" != x; then
54163        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54164$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54165        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54166      fi
54167
54168      # Use eval to expand a potential ~
54169      eval path="$path"
54170      if test ! -f "$path" && test ! -d "$path"; then
54171        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54172      fi
54173
54174      if test -d "$path"; then
54175        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54176      else
54177        dir="`$DIRNAME "$path"`"
54178        base="`$BASENAME "$path"`"
54179        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54180      fi
54181    fi
54182  fi
54183
54184      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54185$as_echo_n "checking for $DLL_NAME... " >&6; }
54186      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54187$as_echo "$MSVC_DLL" >&6; }
54188    else
54189      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54190$as_echo "incorrect, ignoring" >&6; }
54191      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54192$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54193    fi
54194  fi
54195
54196    fi
54197  fi
54198
54199  if test "x$MSVC_DLL" = x; then
54200    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54201$as_echo_n "checking for $DLL_NAME... " >&6; }
54202    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54203$as_echo "no" >&6; }
54204    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
54205  fi
54206
54207    MSVCR_DLL="$MSVC_DLL"
54208  fi
54209
54210
54211
54212# Check whether --with-msvcp-dll was given.
54213if test "${with_msvcp_dll+set}" = set; then :
54214  withval=$with_msvcp_dll;
54215fi
54216
54217
54218  if test "x$MSVCP_NAME" != "x"; then
54219    if test "x$with_msvcp_dll" != x; then
54220      # If given explicitely by user, do not probe. If not present, fail directly.
54221
54222  DLL_NAME="$MSVCP_NAME"
54223  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
54224  METHOD="--with-msvcp-dll"
54225  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54226    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54227$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54228
54229    # Need to check if the found msvcr is correct architecture
54230    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54231$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54232    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54233    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54234      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54235      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54236      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54237        CORRECT_MSVCR_ARCH="PE32 executable"
54238      else
54239        CORRECT_MSVCR_ARCH="PE32+ executable"
54240      fi
54241    else
54242      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54243        CORRECT_MSVCR_ARCH=386
54244      else
54245        CORRECT_MSVCR_ARCH=x86-64
54246      fi
54247    fi
54248    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54249      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54250$as_echo "ok" >&6; }
54251      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54252
54253  # Only process if variable expands to non-empty
54254
54255  if test "x$MSVC_DLL" != x; then
54256    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54257
54258  # Input might be given as Windows format, start by converting to
54259  # unix format.
54260  path="$MSVC_DLL"
54261  new_path=`$CYGPATH -u "$path"`
54262
54263  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54264  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54265  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54266  # "foo.exe" is OK but "foo" is an error.
54267  #
54268  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54269  # It is also a way to make sure we got the proper file name for the real test later on.
54270  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54271  if test "x$test_shortpath" = x; then
54272    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54273$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54274    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54275  fi
54276
54277  # Call helper function which possibly converts this using DOS-style short mode.
54278  # If so, the updated path is stored in $new_path.
54279
54280  input_path="$new_path"
54281  # Check if we need to convert this using DOS-style short mode. If the path
54282  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54283  # take no chances and rewrite it.
54284  # Note: m4 eats our [], so we need to use [ and ] instead.
54285  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54286  if test "x$has_forbidden_chars" != x; then
54287    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54288    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54289    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54290    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54291      # Going to short mode and back again did indeed matter. Since short mode is
54292      # case insensitive, let's make it lowercase to improve readability.
54293      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54294      # Now convert it back to Unix-style (cygpath)
54295      input_path=`$CYGPATH -u "$shortmode_path"`
54296      new_path="$input_path"
54297    fi
54298  fi
54299
54300  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54301  if test "x$test_cygdrive_prefix" = x; then
54302    # As a simple fix, exclude /usr/bin since it's not a real path.
54303    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54304      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54305      # a path prefixed by /cygdrive for fixpath to work.
54306      new_path="$CYGWIN_ROOT_PATH$input_path"
54307    fi
54308  fi
54309
54310
54311  if test "x$path" != "x$new_path"; then
54312    MSVC_DLL="$new_path"
54313    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54314$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54315  fi
54316
54317    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54318
54319  path="$MSVC_DLL"
54320  has_colon=`$ECHO $path | $GREP ^.:`
54321  new_path="$path"
54322  if test "x$has_colon" = x; then
54323    # Not in mixed or Windows style, start by that.
54324    new_path=`cmd //c echo $path`
54325  fi
54326
54327
54328  input_path="$new_path"
54329  # Check if we need to convert this using DOS-style short mode. If the path
54330  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54331  # take no chances and rewrite it.
54332  # Note: m4 eats our [], so we need to use [ and ] instead.
54333  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54334  if test "x$has_forbidden_chars" != x; then
54335    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54336    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54337  fi
54338
54339
54340  windows_path="$new_path"
54341  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54342    unix_path=`$CYGPATH -u "$windows_path"`
54343    new_path="$unix_path"
54344  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54345    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54346    new_path="$unix_path"
54347  fi
54348
54349  if test "x$path" != "x$new_path"; then
54350    MSVC_DLL="$new_path"
54351    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54352$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54353  fi
54354
54355  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54356  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54357
54358    else
54359      # We're on a unix platform. Hooray! :)
54360      path="$MSVC_DLL"
54361      has_space=`$ECHO "$path" | $GREP " "`
54362      if test "x$has_space" != x; then
54363        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54364$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54365        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54366      fi
54367
54368      # Use eval to expand a potential ~
54369      eval path="$path"
54370      if test ! -f "$path" && test ! -d "$path"; then
54371        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54372      fi
54373
54374      if test -d "$path"; then
54375        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54376      else
54377        dir="`$DIRNAME "$path"`"
54378        base="`$BASENAME "$path"`"
54379        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54380      fi
54381    fi
54382  fi
54383
54384      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54385$as_echo_n "checking for $DLL_NAME... " >&6; }
54386      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54387$as_echo "$MSVC_DLL" >&6; }
54388    else
54389      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54390$as_echo "incorrect, ignoring" >&6; }
54391      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54392$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54393    fi
54394  fi
54395
54396      if test "x$MSVC_DLL" = x; then
54397        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
54398      fi
54399      MSVCP_DLL="$MSVC_DLL"
54400    elif test "x$DEVKIT_MSVCP_DLL" != x; then
54401
54402  DLL_NAME="$MSVCP_NAME"
54403  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
54404  METHOD="devkit"
54405  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54406    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54407$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54408
54409    # Need to check if the found msvcr is correct architecture
54410    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54411$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54412    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54413    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54414      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54415      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54416      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54417        CORRECT_MSVCR_ARCH="PE32 executable"
54418      else
54419        CORRECT_MSVCR_ARCH="PE32+ executable"
54420      fi
54421    else
54422      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54423        CORRECT_MSVCR_ARCH=386
54424      else
54425        CORRECT_MSVCR_ARCH=x86-64
54426      fi
54427    fi
54428    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54429      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54430$as_echo "ok" >&6; }
54431      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54432
54433  # Only process if variable expands to non-empty
54434
54435  if test "x$MSVC_DLL" != x; then
54436    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54437
54438  # Input might be given as Windows format, start by converting to
54439  # unix format.
54440  path="$MSVC_DLL"
54441  new_path=`$CYGPATH -u "$path"`
54442
54443  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54444  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54445  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54446  # "foo.exe" is OK but "foo" is an error.
54447  #
54448  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54449  # It is also a way to make sure we got the proper file name for the real test later on.
54450  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54451  if test "x$test_shortpath" = x; then
54452    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54453$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54454    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54455  fi
54456
54457  # Call helper function which possibly converts this using DOS-style short mode.
54458  # If so, the updated path is stored in $new_path.
54459
54460  input_path="$new_path"
54461  # Check if we need to convert this using DOS-style short mode. If the path
54462  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54463  # take no chances and rewrite it.
54464  # Note: m4 eats our [], so we need to use [ and ] instead.
54465  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54466  if test "x$has_forbidden_chars" != x; then
54467    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54468    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54469    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54470    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54471      # Going to short mode and back again did indeed matter. Since short mode is
54472      # case insensitive, let's make it lowercase to improve readability.
54473      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54474      # Now convert it back to Unix-style (cygpath)
54475      input_path=`$CYGPATH -u "$shortmode_path"`
54476      new_path="$input_path"
54477    fi
54478  fi
54479
54480  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54481  if test "x$test_cygdrive_prefix" = x; then
54482    # As a simple fix, exclude /usr/bin since it's not a real path.
54483    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54484      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54485      # a path prefixed by /cygdrive for fixpath to work.
54486      new_path="$CYGWIN_ROOT_PATH$input_path"
54487    fi
54488  fi
54489
54490
54491  if test "x$path" != "x$new_path"; then
54492    MSVC_DLL="$new_path"
54493    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54494$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54495  fi
54496
54497    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54498
54499  path="$MSVC_DLL"
54500  has_colon=`$ECHO $path | $GREP ^.:`
54501  new_path="$path"
54502  if test "x$has_colon" = x; then
54503    # Not in mixed or Windows style, start by that.
54504    new_path=`cmd //c echo $path`
54505  fi
54506
54507
54508  input_path="$new_path"
54509  # Check if we need to convert this using DOS-style short mode. If the path
54510  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54511  # take no chances and rewrite it.
54512  # Note: m4 eats our [], so we need to use [ and ] instead.
54513  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54514  if test "x$has_forbidden_chars" != x; then
54515    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54516    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54517  fi
54518
54519
54520  windows_path="$new_path"
54521  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54522    unix_path=`$CYGPATH -u "$windows_path"`
54523    new_path="$unix_path"
54524  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54525    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54526    new_path="$unix_path"
54527  fi
54528
54529  if test "x$path" != "x$new_path"; then
54530    MSVC_DLL="$new_path"
54531    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54532$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54533  fi
54534
54535  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54536  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54537
54538    else
54539      # We're on a unix platform. Hooray! :)
54540      path="$MSVC_DLL"
54541      has_space=`$ECHO "$path" | $GREP " "`
54542      if test "x$has_space" != x; then
54543        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54544$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54545        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54546      fi
54547
54548      # Use eval to expand a potential ~
54549      eval path="$path"
54550      if test ! -f "$path" && test ! -d "$path"; then
54551        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54552      fi
54553
54554      if test -d "$path"; then
54555        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54556      else
54557        dir="`$DIRNAME "$path"`"
54558        base="`$BASENAME "$path"`"
54559        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54560      fi
54561    fi
54562  fi
54563
54564      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54565$as_echo_n "checking for $DLL_NAME... " >&6; }
54566      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54567$as_echo "$MSVC_DLL" >&6; }
54568    else
54569      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54570$as_echo "incorrect, ignoring" >&6; }
54571      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54572$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54573    fi
54574  fi
54575
54576      if test "x$MSVC_DLL" = x; then
54577        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
54578      fi
54579      MSVCP_DLL="$MSVC_DLL"
54580    else
54581
54582  DLL_NAME="${MSVCP_NAME}"
54583  MSVC_DLL=
54584
54585  if test "x$MSVC_DLL" = x; then
54586    # Probe: Using well-known location from Visual Studio 10.0
54587    if test "x$VCINSTALLDIR" != x; then
54588      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
54589
54590  windows_path="$CYGWIN_VC_INSTALL_DIR"
54591  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54592    unix_path=`$CYGPATH -u "$windows_path"`
54593    CYGWIN_VC_INSTALL_DIR="$unix_path"
54594  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54595    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54596    CYGWIN_VC_INSTALL_DIR="$unix_path"
54597  fi
54598
54599      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54600        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54601      else
54602        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54603      fi
54604      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
54605
54606  DLL_NAME="$DLL_NAME"
54607  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54608  METHOD="well-known location in VCINSTALLDIR"
54609  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54610    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54611$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54612
54613    # Need to check if the found msvcr is correct architecture
54614    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54615$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54616    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54617    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54618      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54619      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54620      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54621        CORRECT_MSVCR_ARCH="PE32 executable"
54622      else
54623        CORRECT_MSVCR_ARCH="PE32+ executable"
54624      fi
54625    else
54626      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54627        CORRECT_MSVCR_ARCH=386
54628      else
54629        CORRECT_MSVCR_ARCH=x86-64
54630      fi
54631    fi
54632    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54633      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54634$as_echo "ok" >&6; }
54635      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54636
54637  # Only process if variable expands to non-empty
54638
54639  if test "x$MSVC_DLL" != x; then
54640    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54641
54642  # Input might be given as Windows format, start by converting to
54643  # unix format.
54644  path="$MSVC_DLL"
54645  new_path=`$CYGPATH -u "$path"`
54646
54647  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54648  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54649  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54650  # "foo.exe" is OK but "foo" is an error.
54651  #
54652  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54653  # It is also a way to make sure we got the proper file name for the real test later on.
54654  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54655  if test "x$test_shortpath" = x; then
54656    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54657$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54658    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54659  fi
54660
54661  # Call helper function which possibly converts this using DOS-style short mode.
54662  # If so, the updated path is stored in $new_path.
54663
54664  input_path="$new_path"
54665  # Check if we need to convert this using DOS-style short mode. If the path
54666  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54667  # take no chances and rewrite it.
54668  # Note: m4 eats our [], so we need to use [ and ] instead.
54669  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54670  if test "x$has_forbidden_chars" != x; then
54671    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54672    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54673    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54674    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54675      # Going to short mode and back again did indeed matter. Since short mode is
54676      # case insensitive, let's make it lowercase to improve readability.
54677      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54678      # Now convert it back to Unix-style (cygpath)
54679      input_path=`$CYGPATH -u "$shortmode_path"`
54680      new_path="$input_path"
54681    fi
54682  fi
54683
54684  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54685  if test "x$test_cygdrive_prefix" = x; then
54686    # As a simple fix, exclude /usr/bin since it's not a real path.
54687    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54688      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54689      # a path prefixed by /cygdrive for fixpath to work.
54690      new_path="$CYGWIN_ROOT_PATH$input_path"
54691    fi
54692  fi
54693
54694
54695  if test "x$path" != "x$new_path"; then
54696    MSVC_DLL="$new_path"
54697    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54698$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54699  fi
54700
54701    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54702
54703  path="$MSVC_DLL"
54704  has_colon=`$ECHO $path | $GREP ^.:`
54705  new_path="$path"
54706  if test "x$has_colon" = x; then
54707    # Not in mixed or Windows style, start by that.
54708    new_path=`cmd //c echo $path`
54709  fi
54710
54711
54712  input_path="$new_path"
54713  # Check if we need to convert this using DOS-style short mode. If the path
54714  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54715  # take no chances and rewrite it.
54716  # Note: m4 eats our [], so we need to use [ and ] instead.
54717  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54718  if test "x$has_forbidden_chars" != x; then
54719    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54720    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54721  fi
54722
54723
54724  windows_path="$new_path"
54725  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54726    unix_path=`$CYGPATH -u "$windows_path"`
54727    new_path="$unix_path"
54728  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54729    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54730    new_path="$unix_path"
54731  fi
54732
54733  if test "x$path" != "x$new_path"; then
54734    MSVC_DLL="$new_path"
54735    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54736$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54737  fi
54738
54739  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54740  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54741
54742    else
54743      # We're on a unix platform. Hooray! :)
54744      path="$MSVC_DLL"
54745      has_space=`$ECHO "$path" | $GREP " "`
54746      if test "x$has_space" != x; then
54747        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54748$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54749        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54750      fi
54751
54752      # Use eval to expand a potential ~
54753      eval path="$path"
54754      if test ! -f "$path" && test ! -d "$path"; then
54755        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54756      fi
54757
54758      if test -d "$path"; then
54759        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54760      else
54761        dir="`$DIRNAME "$path"`"
54762        base="`$BASENAME "$path"`"
54763        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54764      fi
54765    fi
54766  fi
54767
54768      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54769$as_echo_n "checking for $DLL_NAME... " >&6; }
54770      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54771$as_echo "$MSVC_DLL" >&6; }
54772    else
54773      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54774$as_echo "incorrect, ignoring" >&6; }
54775      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54776$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54777    fi
54778  fi
54779
54780    fi
54781  fi
54782
54783  if test "x$MSVC_DLL" = x; then
54784    # Probe: Check in the Boot JDK directory.
54785    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
54786
54787  DLL_NAME="$DLL_NAME"
54788  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54789  METHOD="well-known location in Boot JDK"
54790  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54791    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54792$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54793
54794    # Need to check if the found msvcr is correct architecture
54795    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54796$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54797    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54798    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54799      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54800      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54801      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54802        CORRECT_MSVCR_ARCH="PE32 executable"
54803      else
54804        CORRECT_MSVCR_ARCH="PE32+ executable"
54805      fi
54806    else
54807      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54808        CORRECT_MSVCR_ARCH=386
54809      else
54810        CORRECT_MSVCR_ARCH=x86-64
54811      fi
54812    fi
54813    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54814      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54815$as_echo "ok" >&6; }
54816      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54817
54818  # Only process if variable expands to non-empty
54819
54820  if test "x$MSVC_DLL" != x; then
54821    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54822
54823  # Input might be given as Windows format, start by converting to
54824  # unix format.
54825  path="$MSVC_DLL"
54826  new_path=`$CYGPATH -u "$path"`
54827
54828  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54829  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54830  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54831  # "foo.exe" is OK but "foo" is an error.
54832  #
54833  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54834  # It is also a way to make sure we got the proper file name for the real test later on.
54835  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54836  if test "x$test_shortpath" = x; then
54837    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54838$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54839    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54840  fi
54841
54842  # Call helper function which possibly converts this using DOS-style short mode.
54843  # If so, the updated path is stored in $new_path.
54844
54845  input_path="$new_path"
54846  # Check if we need to convert this using DOS-style short mode. If the path
54847  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54848  # take no chances and rewrite it.
54849  # Note: m4 eats our [], so we need to use [ and ] instead.
54850  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54851  if test "x$has_forbidden_chars" != x; then
54852    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54853    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54854    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54855    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54856      # Going to short mode and back again did indeed matter. Since short mode is
54857      # case insensitive, let's make it lowercase to improve readability.
54858      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54859      # Now convert it back to Unix-style (cygpath)
54860      input_path=`$CYGPATH -u "$shortmode_path"`
54861      new_path="$input_path"
54862    fi
54863  fi
54864
54865  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54866  if test "x$test_cygdrive_prefix" = x; then
54867    # As a simple fix, exclude /usr/bin since it's not a real path.
54868    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54869      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54870      # a path prefixed by /cygdrive for fixpath to work.
54871      new_path="$CYGWIN_ROOT_PATH$input_path"
54872    fi
54873  fi
54874
54875
54876  if test "x$path" != "x$new_path"; then
54877    MSVC_DLL="$new_path"
54878    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54879$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54880  fi
54881
54882    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54883
54884  path="$MSVC_DLL"
54885  has_colon=`$ECHO $path | $GREP ^.:`
54886  new_path="$path"
54887  if test "x$has_colon" = x; then
54888    # Not in mixed or Windows style, start by that.
54889    new_path=`cmd //c echo $path`
54890  fi
54891
54892
54893  input_path="$new_path"
54894  # Check if we need to convert this using DOS-style short mode. If the path
54895  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54896  # take no chances and rewrite it.
54897  # Note: m4 eats our [], so we need to use [ and ] instead.
54898  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54899  if test "x$has_forbidden_chars" != x; then
54900    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54901    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54902  fi
54903
54904
54905  windows_path="$new_path"
54906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54907    unix_path=`$CYGPATH -u "$windows_path"`
54908    new_path="$unix_path"
54909  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54910    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54911    new_path="$unix_path"
54912  fi
54913
54914  if test "x$path" != "x$new_path"; then
54915    MSVC_DLL="$new_path"
54916    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54917$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54918  fi
54919
54920  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54921  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54922
54923    else
54924      # We're on a unix platform. Hooray! :)
54925      path="$MSVC_DLL"
54926      has_space=`$ECHO "$path" | $GREP " "`
54927      if test "x$has_space" != x; then
54928        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54929$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54930        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54931      fi
54932
54933      # Use eval to expand a potential ~
54934      eval path="$path"
54935      if test ! -f "$path" && test ! -d "$path"; then
54936        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54937      fi
54938
54939      if test -d "$path"; then
54940        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54941      else
54942        dir="`$DIRNAME "$path"`"
54943        base="`$BASENAME "$path"`"
54944        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54945      fi
54946    fi
54947  fi
54948
54949      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54950$as_echo_n "checking for $DLL_NAME... " >&6; }
54951      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54952$as_echo "$MSVC_DLL" >&6; }
54953    else
54954      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54955$as_echo "incorrect, ignoring" >&6; }
54956      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54957$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54958    fi
54959  fi
54960
54961  fi
54962
54963  if test "x$MSVC_DLL" = x; then
54964    # Probe: Look in the Windows system32 directory
54965    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
54966
54967  windows_path="$CYGWIN_SYSTEMROOT"
54968  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54969    unix_path=`$CYGPATH -u "$windows_path"`
54970    CYGWIN_SYSTEMROOT="$unix_path"
54971  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54972    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54973    CYGWIN_SYSTEMROOT="$unix_path"
54974  fi
54975
54976    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
54977
54978  DLL_NAME="$DLL_NAME"
54979  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54980  METHOD="well-known location in SYSTEMROOT"
54981  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54982    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54983$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54984
54985    # Need to check if the found msvcr is correct architecture
54986    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54987$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54988    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54989    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54990      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54991      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54992      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54993        CORRECT_MSVCR_ARCH="PE32 executable"
54994      else
54995        CORRECT_MSVCR_ARCH="PE32+ executable"
54996      fi
54997    else
54998      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54999        CORRECT_MSVCR_ARCH=386
55000      else
55001        CORRECT_MSVCR_ARCH=x86-64
55002      fi
55003    fi
55004    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55005      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55006$as_echo "ok" >&6; }
55007      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55008
55009  # Only process if variable expands to non-empty
55010
55011  if test "x$MSVC_DLL" != x; then
55012    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55013
55014  # Input might be given as Windows format, start by converting to
55015  # unix format.
55016  path="$MSVC_DLL"
55017  new_path=`$CYGPATH -u "$path"`
55018
55019  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55020  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55021  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55022  # "foo.exe" is OK but "foo" is an error.
55023  #
55024  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55025  # It is also a way to make sure we got the proper file name for the real test later on.
55026  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55027  if test "x$test_shortpath" = x; then
55028    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55029$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55030    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55031  fi
55032
55033  # Call helper function which possibly converts this using DOS-style short mode.
55034  # If so, the updated path is stored in $new_path.
55035
55036  input_path="$new_path"
55037  # Check if we need to convert this using DOS-style short mode. If the path
55038  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55039  # take no chances and rewrite it.
55040  # Note: m4 eats our [], so we need to use [ and ] instead.
55041  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55042  if test "x$has_forbidden_chars" != x; then
55043    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55044    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55045    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55046    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55047      # Going to short mode and back again did indeed matter. Since short mode is
55048      # case insensitive, let's make it lowercase to improve readability.
55049      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55050      # Now convert it back to Unix-style (cygpath)
55051      input_path=`$CYGPATH -u "$shortmode_path"`
55052      new_path="$input_path"
55053    fi
55054  fi
55055
55056  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55057  if test "x$test_cygdrive_prefix" = x; then
55058    # As a simple fix, exclude /usr/bin since it's not a real path.
55059    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55060      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55061      # a path prefixed by /cygdrive for fixpath to work.
55062      new_path="$CYGWIN_ROOT_PATH$input_path"
55063    fi
55064  fi
55065
55066
55067  if test "x$path" != "x$new_path"; then
55068    MSVC_DLL="$new_path"
55069    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55070$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55071  fi
55072
55073    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55074
55075  path="$MSVC_DLL"
55076  has_colon=`$ECHO $path | $GREP ^.:`
55077  new_path="$path"
55078  if test "x$has_colon" = x; then
55079    # Not in mixed or Windows style, start by that.
55080    new_path=`cmd //c echo $path`
55081  fi
55082
55083
55084  input_path="$new_path"
55085  # Check if we need to convert this using DOS-style short mode. If the path
55086  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55087  # take no chances and rewrite it.
55088  # Note: m4 eats our [], so we need to use [ and ] instead.
55089  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55090  if test "x$has_forbidden_chars" != x; then
55091    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55092    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55093  fi
55094
55095
55096  windows_path="$new_path"
55097  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55098    unix_path=`$CYGPATH -u "$windows_path"`
55099    new_path="$unix_path"
55100  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55101    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55102    new_path="$unix_path"
55103  fi
55104
55105  if test "x$path" != "x$new_path"; then
55106    MSVC_DLL="$new_path"
55107    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55108$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55109  fi
55110
55111  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55112  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55113
55114    else
55115      # We're on a unix platform. Hooray! :)
55116      path="$MSVC_DLL"
55117      has_space=`$ECHO "$path" | $GREP " "`
55118      if test "x$has_space" != x; then
55119        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55120$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55121        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55122      fi
55123
55124      # Use eval to expand a potential ~
55125      eval path="$path"
55126      if test ! -f "$path" && test ! -d "$path"; then
55127        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55128      fi
55129
55130      if test -d "$path"; then
55131        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55132      else
55133        dir="`$DIRNAME "$path"`"
55134        base="`$BASENAME "$path"`"
55135        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55136      fi
55137    fi
55138  fi
55139
55140      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55141$as_echo_n "checking for $DLL_NAME... " >&6; }
55142      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55143$as_echo "$MSVC_DLL" >&6; }
55144    else
55145      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55146$as_echo "incorrect, ignoring" >&6; }
55147      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55148$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55149    fi
55150  fi
55151
55152  fi
55153
55154  if test "x$MSVC_DLL" = x; then
55155    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
55156    if test "x$VS100COMNTOOLS" != x; then
55157      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
55158
55159  windows_path="$CYGWIN_VS_TOOLS_DIR"
55160  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55161    unix_path=`$CYGPATH -u "$windows_path"`
55162    CYGWIN_VS_TOOLS_DIR="$unix_path"
55163  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55164    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55165    CYGWIN_VS_TOOLS_DIR="$unix_path"
55166  fi
55167
55168      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55169        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55170	    | $GREP -i /x64/ | $HEAD --lines 1`
55171      else
55172        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55173	    | $GREP -i /x86/ | $HEAD --lines 1`
55174      fi
55175
55176  DLL_NAME="$DLL_NAME"
55177  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55178  METHOD="search of VS100COMNTOOLS"
55179  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55180    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55181$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55182
55183    # Need to check if the found msvcr is correct architecture
55184    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55185$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55186    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55187    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55188      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55189      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55190      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55191        CORRECT_MSVCR_ARCH="PE32 executable"
55192      else
55193        CORRECT_MSVCR_ARCH="PE32+ executable"
55194      fi
55195    else
55196      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55197        CORRECT_MSVCR_ARCH=386
55198      else
55199        CORRECT_MSVCR_ARCH=x86-64
55200      fi
55201    fi
55202    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55203      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55204$as_echo "ok" >&6; }
55205      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55206
55207  # Only process if variable expands to non-empty
55208
55209  if test "x$MSVC_DLL" != x; then
55210    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55211
55212  # Input might be given as Windows format, start by converting to
55213  # unix format.
55214  path="$MSVC_DLL"
55215  new_path=`$CYGPATH -u "$path"`
55216
55217  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55218  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55219  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55220  # "foo.exe" is OK but "foo" is an error.
55221  #
55222  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55223  # It is also a way to make sure we got the proper file name for the real test later on.
55224  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55225  if test "x$test_shortpath" = x; then
55226    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55227$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55228    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55229  fi
55230
55231  # Call helper function which possibly converts this using DOS-style short mode.
55232  # If so, the updated path is stored in $new_path.
55233
55234  input_path="$new_path"
55235  # Check if we need to convert this using DOS-style short mode. If the path
55236  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55237  # take no chances and rewrite it.
55238  # Note: m4 eats our [], so we need to use [ and ] instead.
55239  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55240  if test "x$has_forbidden_chars" != x; then
55241    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55242    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55243    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55244    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55245      # Going to short mode and back again did indeed matter. Since short mode is
55246      # case insensitive, let's make it lowercase to improve readability.
55247      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55248      # Now convert it back to Unix-style (cygpath)
55249      input_path=`$CYGPATH -u "$shortmode_path"`
55250      new_path="$input_path"
55251    fi
55252  fi
55253
55254  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55255  if test "x$test_cygdrive_prefix" = x; then
55256    # As a simple fix, exclude /usr/bin since it's not a real path.
55257    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55258      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55259      # a path prefixed by /cygdrive for fixpath to work.
55260      new_path="$CYGWIN_ROOT_PATH$input_path"
55261    fi
55262  fi
55263
55264
55265  if test "x$path" != "x$new_path"; then
55266    MSVC_DLL="$new_path"
55267    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55268$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55269  fi
55270
55271    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55272
55273  path="$MSVC_DLL"
55274  has_colon=`$ECHO $path | $GREP ^.:`
55275  new_path="$path"
55276  if test "x$has_colon" = x; then
55277    # Not in mixed or Windows style, start by that.
55278    new_path=`cmd //c echo $path`
55279  fi
55280
55281
55282  input_path="$new_path"
55283  # Check if we need to convert this using DOS-style short mode. If the path
55284  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55285  # take no chances and rewrite it.
55286  # Note: m4 eats our [], so we need to use [ and ] instead.
55287  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55288  if test "x$has_forbidden_chars" != x; then
55289    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55290    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55291  fi
55292
55293
55294  windows_path="$new_path"
55295  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55296    unix_path=`$CYGPATH -u "$windows_path"`
55297    new_path="$unix_path"
55298  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55299    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55300    new_path="$unix_path"
55301  fi
55302
55303  if test "x$path" != "x$new_path"; then
55304    MSVC_DLL="$new_path"
55305    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55306$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55307  fi
55308
55309  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55310  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55311
55312    else
55313      # We're on a unix platform. Hooray! :)
55314      path="$MSVC_DLL"
55315      has_space=`$ECHO "$path" | $GREP " "`
55316      if test "x$has_space" != x; then
55317        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55318$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55319        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55320      fi
55321
55322      # Use eval to expand a potential ~
55323      eval path="$path"
55324      if test ! -f "$path" && test ! -d "$path"; then
55325        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55326      fi
55327
55328      if test -d "$path"; then
55329        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55330      else
55331        dir="`$DIRNAME "$path"`"
55332        base="`$BASENAME "$path"`"
55333        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55334      fi
55335    fi
55336  fi
55337
55338      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55339$as_echo_n "checking for $DLL_NAME... " >&6; }
55340      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55341$as_echo "$MSVC_DLL" >&6; }
55342    else
55343      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55344$as_echo "incorrect, ignoring" >&6; }
55345      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55346$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55347    fi
55348  fi
55349
55350    fi
55351  fi
55352
55353  if test "x$MSVC_DLL" = x; then
55354    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
55355    # (This was the original behaviour; kept since it might turn something up)
55356    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
55357      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55358        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55359	    | $GREP x64 | $HEAD --lines 1`
55360      else
55361        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55362	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
55363        if test "x$POSSIBLE_MSVC_DLL" = x; then
55364          # We're grasping at straws now...
55365          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55366	      | $HEAD --lines 1`
55367        fi
55368      fi
55369
55370
55371  DLL_NAME="$DLL_NAME"
55372  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55373  METHOD="search of VCINSTALLDIR"
55374  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55375    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55376$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55377
55378    # Need to check if the found msvcr is correct architecture
55379    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55380$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55381    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55382    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55383      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55384      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55385      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55386        CORRECT_MSVCR_ARCH="PE32 executable"
55387      else
55388        CORRECT_MSVCR_ARCH="PE32+ executable"
55389      fi
55390    else
55391      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55392        CORRECT_MSVCR_ARCH=386
55393      else
55394        CORRECT_MSVCR_ARCH=x86-64
55395      fi
55396    fi
55397    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55398      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55399$as_echo "ok" >&6; }
55400      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55401
55402  # Only process if variable expands to non-empty
55403
55404  if test "x$MSVC_DLL" != x; then
55405    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55406
55407  # Input might be given as Windows format, start by converting to
55408  # unix format.
55409  path="$MSVC_DLL"
55410  new_path=`$CYGPATH -u "$path"`
55411
55412  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55413  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55414  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55415  # "foo.exe" is OK but "foo" is an error.
55416  #
55417  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55418  # It is also a way to make sure we got the proper file name for the real test later on.
55419  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55420  if test "x$test_shortpath" = x; then
55421    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55422$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55423    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55424  fi
55425
55426  # Call helper function which possibly converts this using DOS-style short mode.
55427  # If so, the updated path is stored in $new_path.
55428
55429  input_path="$new_path"
55430  # Check if we need to convert this using DOS-style short mode. If the path
55431  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55432  # take no chances and rewrite it.
55433  # Note: m4 eats our [], so we need to use [ and ] instead.
55434  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55435  if test "x$has_forbidden_chars" != x; then
55436    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55437    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55438    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55439    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55440      # Going to short mode and back again did indeed matter. Since short mode is
55441      # case insensitive, let's make it lowercase to improve readability.
55442      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55443      # Now convert it back to Unix-style (cygpath)
55444      input_path=`$CYGPATH -u "$shortmode_path"`
55445      new_path="$input_path"
55446    fi
55447  fi
55448
55449  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55450  if test "x$test_cygdrive_prefix" = x; then
55451    # As a simple fix, exclude /usr/bin since it's not a real path.
55452    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55453      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55454      # a path prefixed by /cygdrive for fixpath to work.
55455      new_path="$CYGWIN_ROOT_PATH$input_path"
55456    fi
55457  fi
55458
55459
55460  if test "x$path" != "x$new_path"; then
55461    MSVC_DLL="$new_path"
55462    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55463$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55464  fi
55465
55466    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55467
55468  path="$MSVC_DLL"
55469  has_colon=`$ECHO $path | $GREP ^.:`
55470  new_path="$path"
55471  if test "x$has_colon" = x; then
55472    # Not in mixed or Windows style, start by that.
55473    new_path=`cmd //c echo $path`
55474  fi
55475
55476
55477  input_path="$new_path"
55478  # Check if we need to convert this using DOS-style short mode. If the path
55479  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55480  # take no chances and rewrite it.
55481  # Note: m4 eats our [], so we need to use [ and ] instead.
55482  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55483  if test "x$has_forbidden_chars" != x; then
55484    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55485    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55486  fi
55487
55488
55489  windows_path="$new_path"
55490  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55491    unix_path=`$CYGPATH -u "$windows_path"`
55492    new_path="$unix_path"
55493  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55494    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55495    new_path="$unix_path"
55496  fi
55497
55498  if test "x$path" != "x$new_path"; then
55499    MSVC_DLL="$new_path"
55500    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55501$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55502  fi
55503
55504  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55505  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55506
55507    else
55508      # We're on a unix platform. Hooray! :)
55509      path="$MSVC_DLL"
55510      has_space=`$ECHO "$path" | $GREP " "`
55511      if test "x$has_space" != x; then
55512        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55513$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55514        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55515      fi
55516
55517      # Use eval to expand a potential ~
55518      eval path="$path"
55519      if test ! -f "$path" && test ! -d "$path"; then
55520        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55521      fi
55522
55523      if test -d "$path"; then
55524        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55525      else
55526        dir="`$DIRNAME "$path"`"
55527        base="`$BASENAME "$path"`"
55528        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55529      fi
55530    fi
55531  fi
55532
55533      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55534$as_echo_n "checking for $DLL_NAME... " >&6; }
55535      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55536$as_echo "$MSVC_DLL" >&6; }
55537    else
55538      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55539$as_echo "incorrect, ignoring" >&6; }
55540      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55541$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55542    fi
55543  fi
55544
55545    fi
55546  fi
55547
55548  if test "x$MSVC_DLL" = x; then
55549    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55550$as_echo_n "checking for $DLL_NAME... " >&6; }
55551    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55552$as_echo "no" >&6; }
55553    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
55554  fi
55555
55556      MSVCP_DLL="$MSVC_DLL"
55557    fi
55558
55559  fi
55560
55561  fi
55562
55563
55564  if test "x$NEEDS_LIB_X11" = xfalse; then
55565    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
55566      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
55567$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
55568    fi
55569    X_CFLAGS=
55570    X_LIBS=
55571  else
55572
55573    if test "x${with_x}" = xno; then
55574      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
55575    fi
55576
55577    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
55578      # The user has specified a X11 base directory. Use it for includes and
55579      # libraries, unless explicitely overridden.
55580      if test "x$x_includes" = xNONE; then
55581        x_includes="${with_x}/include"
55582      fi
55583      if test "x$x_libraries" = xNONE; then
55584        x_libraries="${with_x}/lib"
55585      fi
55586    else
55587      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
55588      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
55589      # --x-libraries for the sysroot, if that seems to be correct.
55590      if test "x$SYSROOT" != "x"; then
55591        if test "x$x_includes" = xNONE; then
55592          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
55593            x_includes="$SYSROOT/usr/X11R6/include"
55594          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
55595            x_includes="$SYSROOT/usr/include"
55596          fi
55597        fi
55598        if test "x$x_libraries" = xNONE; then
55599          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
55600            x_libraries="$SYSROOT/usr/X11R6/lib"
55601          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55602            x_libraries="$SYSROOT/usr/lib64"
55603          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
55604            x_libraries="$SYSROOT/usr/lib"
55605          fi
55606        fi
55607      fi
55608    fi
55609
55610    # Now let autoconf do it's magic
55611    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
55612$as_echo_n "checking for X... " >&6; }
55613
55614
55615# Check whether --with-x was given.
55616if test "${with_x+set}" = set; then :
55617  withval=$with_x;
55618fi
55619
55620# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
55621if test "x$with_x" = xno; then
55622  # The user explicitly disabled X.
55623  have_x=disabled
55624else
55625  case $x_includes,$x_libraries in #(
55626    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
55627    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
55628  $as_echo_n "(cached) " >&6
55629else
55630  # One or both of the vars are not set, and there is no cached value.
55631ac_x_includes=no ac_x_libraries=no
55632rm -f -r conftest.dir
55633if mkdir conftest.dir; then
55634  cd conftest.dir
55635  cat >Imakefile <<'_ACEOF'
55636incroot:
55637	@echo incroot='${INCROOT}'
55638usrlibdir:
55639	@echo usrlibdir='${USRLIBDIR}'
55640libdir:
55641	@echo libdir='${LIBDIR}'
55642_ACEOF
55643  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
55644    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
55645    for ac_var in incroot usrlibdir libdir; do
55646      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
55647    done
55648    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
55649    for ac_extension in a so sl dylib la dll; do
55650      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
55651	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
55652	ac_im_usrlibdir=$ac_im_libdir; break
55653      fi
55654    done
55655    # Screen out bogus values from the imake configuration.  They are
55656    # bogus both because they are the default anyway, and because
55657    # using them would break gcc on systems where it needs fixed includes.
55658    case $ac_im_incroot in
55659	/usr/include) ac_x_includes= ;;
55660	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
55661    esac
55662    case $ac_im_usrlibdir in
55663	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
55664	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
55665    esac
55666  fi
55667  cd ..
55668  rm -f -r conftest.dir
55669fi
55670
55671# Standard set of common directories for X headers.
55672# Check X11 before X11Rn because it is often a symlink to the current release.
55673ac_x_header_dirs='
55674/usr/X11/include
55675/usr/X11R7/include
55676/usr/X11R6/include
55677/usr/X11R5/include
55678/usr/X11R4/include
55679
55680/usr/include/X11
55681/usr/include/X11R7
55682/usr/include/X11R6
55683/usr/include/X11R5
55684/usr/include/X11R4
55685
55686/usr/local/X11/include
55687/usr/local/X11R7/include
55688/usr/local/X11R6/include
55689/usr/local/X11R5/include
55690/usr/local/X11R4/include
55691
55692/usr/local/include/X11
55693/usr/local/include/X11R7
55694/usr/local/include/X11R6
55695/usr/local/include/X11R5
55696/usr/local/include/X11R4
55697
55698/usr/X386/include
55699/usr/x386/include
55700/usr/XFree86/include/X11
55701
55702/usr/include
55703/usr/local/include
55704/usr/unsupported/include
55705/usr/athena/include
55706/usr/local/x11r5/include
55707/usr/lpp/Xamples/include
55708
55709/usr/openwin/include
55710/usr/openwin/share/include'
55711
55712if test "$ac_x_includes" = no; then
55713  # Guess where to find include files, by looking for Xlib.h.
55714  # First, try using that file with no special directory specified.
55715  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55716/* end confdefs.h.  */
55717#include <X11/Xlib.h>
55718_ACEOF
55719if ac_fn_cxx_try_cpp "$LINENO"; then :
55720  # We can compile using X headers with no special include directory.
55721ac_x_includes=
55722else
55723  for ac_dir in $ac_x_header_dirs; do
55724  if test -r "$ac_dir/X11/Xlib.h"; then
55725    ac_x_includes=$ac_dir
55726    break
55727  fi
55728done
55729fi
55730rm -f conftest.err conftest.i conftest.$ac_ext
55731fi # $ac_x_includes = no
55732
55733if test "$ac_x_libraries" = no; then
55734  # Check for the libraries.
55735  # See if we find them without any special options.
55736  # Don't add to $LIBS permanently.
55737  ac_save_LIBS=$LIBS
55738  LIBS="-lX11 $LIBS"
55739  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55740/* end confdefs.h.  */
55741#include <X11/Xlib.h>
55742int
55743main ()
55744{
55745XrmInitialize ()
55746  ;
55747  return 0;
55748}
55749_ACEOF
55750if ac_fn_cxx_try_link "$LINENO"; then :
55751  LIBS=$ac_save_LIBS
55752# We can link X programs with no special library path.
55753ac_x_libraries=
55754else
55755  LIBS=$ac_save_LIBS
55756for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
55757do
55758  # Don't even attempt the hair of trying to link an X program!
55759  for ac_extension in a so sl dylib la dll; do
55760    if test -r "$ac_dir/libX11.$ac_extension"; then
55761      ac_x_libraries=$ac_dir
55762      break 2
55763    fi
55764  done
55765done
55766fi
55767rm -f core conftest.err conftest.$ac_objext \
55768    conftest$ac_exeext conftest.$ac_ext
55769fi # $ac_x_libraries = no
55770
55771case $ac_x_includes,$ac_x_libraries in #(
55772  no,* | *,no | *\'*)
55773    # Didn't find X, or a directory has "'" in its name.
55774    ac_cv_have_x="have_x=no";; #(
55775  *)
55776    # Record where we found X for the cache.
55777    ac_cv_have_x="have_x=yes\
55778	ac_x_includes='$ac_x_includes'\
55779	ac_x_libraries='$ac_x_libraries'"
55780esac
55781fi
55782;; #(
55783    *) have_x=yes;;
55784  esac
55785  eval "$ac_cv_have_x"
55786fi # $with_x != no
55787
55788if test "$have_x" != yes; then
55789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
55790$as_echo "$have_x" >&6; }
55791  no_x=yes
55792else
55793  # If each of the values was on the command line, it overrides each guess.
55794  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
55795  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
55796  # Update the cache value to reflect the command line values.
55797  ac_cv_have_x="have_x=yes\
55798	ac_x_includes='$x_includes'\
55799	ac_x_libraries='$x_libraries'"
55800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
55801$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
55802fi
55803
55804    if test "$no_x" = yes; then
55805  # Not all programs may use this symbol, but it does not hurt to define it.
55806
55807$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
55808
55809  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
55810else
55811  if test -n "$x_includes"; then
55812    X_CFLAGS="$X_CFLAGS -I$x_includes"
55813  fi
55814
55815  # It would also be nice to do this for all -L options, not just this one.
55816  if test -n "$x_libraries"; then
55817    X_LIBS="$X_LIBS -L$x_libraries"
55818    # For Solaris; some versions of Sun CC require a space after -R and
55819    # others require no space.  Words are not sufficient . . . .
55820    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
55821$as_echo_n "checking whether -R must be followed by a space... " >&6; }
55822    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
55823    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
55824    ac_cxx_werror_flag=yes
55825    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55826/* end confdefs.h.  */
55827
55828int
55829main ()
55830{
55831
55832  ;
55833  return 0;
55834}
55835_ACEOF
55836if ac_fn_cxx_try_link "$LINENO"; then :
55837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55838$as_echo "no" >&6; }
55839       X_LIBS="$X_LIBS -R$x_libraries"
55840else
55841  LIBS="$ac_xsave_LIBS -R $x_libraries"
55842       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55843/* end confdefs.h.  */
55844
55845int
55846main ()
55847{
55848
55849  ;
55850  return 0;
55851}
55852_ACEOF
55853if ac_fn_cxx_try_link "$LINENO"; then :
55854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55855$as_echo "yes" >&6; }
55856	  X_LIBS="$X_LIBS -R $x_libraries"
55857else
55858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
55859$as_echo "neither works" >&6; }
55860fi
55861rm -f core conftest.err conftest.$ac_objext \
55862    conftest$ac_exeext conftest.$ac_ext
55863fi
55864rm -f core conftest.err conftest.$ac_objext \
55865    conftest$ac_exeext conftest.$ac_ext
55866    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
55867    LIBS=$ac_xsave_LIBS
55868  fi
55869
55870  # Check for system-dependent libraries X programs must link with.
55871  # Do this before checking for the system-independent R6 libraries
55872  # (-lICE), since we may need -lsocket or whatever for X linking.
55873
55874  if test "$ISC" = yes; then
55875    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
55876  else
55877    # Martyn Johnson says this is needed for Ultrix, if the X
55878    # libraries were built with DECnet support.  And Karl Berry says
55879    # the Alpha needs dnet_stub (dnet does not exist).
55880    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
55881    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55882/* end confdefs.h.  */
55883
55884/* Override any GCC internal prototype to avoid an error.
55885   Use char because int might match the return type of a GCC
55886   builtin and then its argument prototype would still apply.  */
55887#ifdef __cplusplus
55888extern "C"
55889#endif
55890char XOpenDisplay ();
55891int
55892main ()
55893{
55894return XOpenDisplay ();
55895  ;
55896  return 0;
55897}
55898_ACEOF
55899if ac_fn_cxx_try_link "$LINENO"; then :
55900
55901else
55902  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
55903$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
55904if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
55905  $as_echo_n "(cached) " >&6
55906else
55907  ac_check_lib_save_LIBS=$LIBS
55908LIBS="-ldnet  $LIBS"
55909cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55910/* end confdefs.h.  */
55911
55912/* Override any GCC internal prototype to avoid an error.
55913   Use char because int might match the return type of a GCC
55914   builtin and then its argument prototype would still apply.  */
55915#ifdef __cplusplus
55916extern "C"
55917#endif
55918char dnet_ntoa ();
55919int
55920main ()
55921{
55922return dnet_ntoa ();
55923  ;
55924  return 0;
55925}
55926_ACEOF
55927if ac_fn_cxx_try_link "$LINENO"; then :
55928  ac_cv_lib_dnet_dnet_ntoa=yes
55929else
55930  ac_cv_lib_dnet_dnet_ntoa=no
55931fi
55932rm -f core conftest.err conftest.$ac_objext \
55933    conftest$ac_exeext conftest.$ac_ext
55934LIBS=$ac_check_lib_save_LIBS
55935fi
55936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
55937$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
55938if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
55939  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
55940fi
55941
55942    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
55943      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
55944$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
55945if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
55946  $as_echo_n "(cached) " >&6
55947else
55948  ac_check_lib_save_LIBS=$LIBS
55949LIBS="-ldnet_stub  $LIBS"
55950cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55951/* end confdefs.h.  */
55952
55953/* Override any GCC internal prototype to avoid an error.
55954   Use char because int might match the return type of a GCC
55955   builtin and then its argument prototype would still apply.  */
55956#ifdef __cplusplus
55957extern "C"
55958#endif
55959char dnet_ntoa ();
55960int
55961main ()
55962{
55963return dnet_ntoa ();
55964  ;
55965  return 0;
55966}
55967_ACEOF
55968if ac_fn_cxx_try_link "$LINENO"; then :
55969  ac_cv_lib_dnet_stub_dnet_ntoa=yes
55970else
55971  ac_cv_lib_dnet_stub_dnet_ntoa=no
55972fi
55973rm -f core conftest.err conftest.$ac_objext \
55974    conftest$ac_exeext conftest.$ac_ext
55975LIBS=$ac_check_lib_save_LIBS
55976fi
55977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
55978$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
55979if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
55980  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
55981fi
55982
55983    fi
55984fi
55985rm -f core conftest.err conftest.$ac_objext \
55986    conftest$ac_exeext conftest.$ac_ext
55987    LIBS="$ac_xsave_LIBS"
55988
55989    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
55990    # to get the SysV transport functions.
55991    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
55992    # needs -lnsl.
55993    # The nsl library prevents programs from opening the X display
55994    # on Irix 5.2, according to T.E. Dickey.
55995    # The functions gethostbyname, getservbyname, and inet_addr are
55996    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
55997    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
55998if test "x$ac_cv_func_gethostbyname" = xyes; then :
55999
56000fi
56001
56002    if test $ac_cv_func_gethostbyname = no; then
56003      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
56004$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
56005if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
56006  $as_echo_n "(cached) " >&6
56007else
56008  ac_check_lib_save_LIBS=$LIBS
56009LIBS="-lnsl  $LIBS"
56010cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56011/* end confdefs.h.  */
56012
56013/* Override any GCC internal prototype to avoid an error.
56014   Use char because int might match the return type of a GCC
56015   builtin and then its argument prototype would still apply.  */
56016#ifdef __cplusplus
56017extern "C"
56018#endif
56019char gethostbyname ();
56020int
56021main ()
56022{
56023return gethostbyname ();
56024  ;
56025  return 0;
56026}
56027_ACEOF
56028if ac_fn_cxx_try_link "$LINENO"; then :
56029  ac_cv_lib_nsl_gethostbyname=yes
56030else
56031  ac_cv_lib_nsl_gethostbyname=no
56032fi
56033rm -f core conftest.err conftest.$ac_objext \
56034    conftest$ac_exeext conftest.$ac_ext
56035LIBS=$ac_check_lib_save_LIBS
56036fi
56037{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
56038$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
56039if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
56040  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
56041fi
56042
56043      if test $ac_cv_lib_nsl_gethostbyname = no; then
56044	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
56045$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
56046if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
56047  $as_echo_n "(cached) " >&6
56048else
56049  ac_check_lib_save_LIBS=$LIBS
56050LIBS="-lbsd  $LIBS"
56051cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56052/* end confdefs.h.  */
56053
56054/* Override any GCC internal prototype to avoid an error.
56055   Use char because int might match the return type of a GCC
56056   builtin and then its argument prototype would still apply.  */
56057#ifdef __cplusplus
56058extern "C"
56059#endif
56060char gethostbyname ();
56061int
56062main ()
56063{
56064return gethostbyname ();
56065  ;
56066  return 0;
56067}
56068_ACEOF
56069if ac_fn_cxx_try_link "$LINENO"; then :
56070  ac_cv_lib_bsd_gethostbyname=yes
56071else
56072  ac_cv_lib_bsd_gethostbyname=no
56073fi
56074rm -f core conftest.err conftest.$ac_objext \
56075    conftest$ac_exeext conftest.$ac_ext
56076LIBS=$ac_check_lib_save_LIBS
56077fi
56078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
56079$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
56080if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
56081  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
56082fi
56083
56084      fi
56085    fi
56086
56087    # lieder@skyler.mavd.honeywell.com says without -lsocket,
56088    # socket/setsockopt and other routines are undefined under SCO ODT
56089    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
56090    # on later versions), says Simon Leinen: it contains gethostby*
56091    # variants that don't use the name server (or something).  -lsocket
56092    # must be given before -lnsl if both are needed.  We assume that
56093    # if connect needs -lnsl, so does gethostbyname.
56094    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
56095if test "x$ac_cv_func_connect" = xyes; then :
56096
56097fi
56098
56099    if test $ac_cv_func_connect = no; then
56100      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
56101$as_echo_n "checking for connect in -lsocket... " >&6; }
56102if ${ac_cv_lib_socket_connect+:} false; then :
56103  $as_echo_n "(cached) " >&6
56104else
56105  ac_check_lib_save_LIBS=$LIBS
56106LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
56107cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56108/* end confdefs.h.  */
56109
56110/* Override any GCC internal prototype to avoid an error.
56111   Use char because int might match the return type of a GCC
56112   builtin and then its argument prototype would still apply.  */
56113#ifdef __cplusplus
56114extern "C"
56115#endif
56116char connect ();
56117int
56118main ()
56119{
56120return connect ();
56121  ;
56122  return 0;
56123}
56124_ACEOF
56125if ac_fn_cxx_try_link "$LINENO"; then :
56126  ac_cv_lib_socket_connect=yes
56127else
56128  ac_cv_lib_socket_connect=no
56129fi
56130rm -f core conftest.err conftest.$ac_objext \
56131    conftest$ac_exeext conftest.$ac_ext
56132LIBS=$ac_check_lib_save_LIBS
56133fi
56134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
56135$as_echo "$ac_cv_lib_socket_connect" >&6; }
56136if test "x$ac_cv_lib_socket_connect" = xyes; then :
56137  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
56138fi
56139
56140    fi
56141
56142    # Guillermo Gomez says -lposix is necessary on A/UX.
56143    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
56144if test "x$ac_cv_func_remove" = xyes; then :
56145
56146fi
56147
56148    if test $ac_cv_func_remove = no; then
56149      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
56150$as_echo_n "checking for remove in -lposix... " >&6; }
56151if ${ac_cv_lib_posix_remove+:} false; then :
56152  $as_echo_n "(cached) " >&6
56153else
56154  ac_check_lib_save_LIBS=$LIBS
56155LIBS="-lposix  $LIBS"
56156cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56157/* end confdefs.h.  */
56158
56159/* Override any GCC internal prototype to avoid an error.
56160   Use char because int might match the return type of a GCC
56161   builtin and then its argument prototype would still apply.  */
56162#ifdef __cplusplus
56163extern "C"
56164#endif
56165char remove ();
56166int
56167main ()
56168{
56169return remove ();
56170  ;
56171  return 0;
56172}
56173_ACEOF
56174if ac_fn_cxx_try_link "$LINENO"; then :
56175  ac_cv_lib_posix_remove=yes
56176else
56177  ac_cv_lib_posix_remove=no
56178fi
56179rm -f core conftest.err conftest.$ac_objext \
56180    conftest$ac_exeext conftest.$ac_ext
56181LIBS=$ac_check_lib_save_LIBS
56182fi
56183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
56184$as_echo "$ac_cv_lib_posix_remove" >&6; }
56185if test "x$ac_cv_lib_posix_remove" = xyes; then :
56186  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
56187fi
56188
56189    fi
56190
56191    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
56192    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
56193if test "x$ac_cv_func_shmat" = xyes; then :
56194
56195fi
56196
56197    if test $ac_cv_func_shmat = no; then
56198      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
56199$as_echo_n "checking for shmat in -lipc... " >&6; }
56200if ${ac_cv_lib_ipc_shmat+:} false; then :
56201  $as_echo_n "(cached) " >&6
56202else
56203  ac_check_lib_save_LIBS=$LIBS
56204LIBS="-lipc  $LIBS"
56205cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56206/* end confdefs.h.  */
56207
56208/* Override any GCC internal prototype to avoid an error.
56209   Use char because int might match the return type of a GCC
56210   builtin and then its argument prototype would still apply.  */
56211#ifdef __cplusplus
56212extern "C"
56213#endif
56214char shmat ();
56215int
56216main ()
56217{
56218return shmat ();
56219  ;
56220  return 0;
56221}
56222_ACEOF
56223if ac_fn_cxx_try_link "$LINENO"; then :
56224  ac_cv_lib_ipc_shmat=yes
56225else
56226  ac_cv_lib_ipc_shmat=no
56227fi
56228rm -f core conftest.err conftest.$ac_objext \
56229    conftest$ac_exeext conftest.$ac_ext
56230LIBS=$ac_check_lib_save_LIBS
56231fi
56232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
56233$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
56234if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
56235  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
56236fi
56237
56238    fi
56239  fi
56240
56241  # Check for libraries that X11R6 Xt/Xaw programs need.
56242  ac_save_LDFLAGS=$LDFLAGS
56243  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
56244  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
56245  # check for ICE first), but we must link in the order -lSM -lICE or
56246  # we get undefined symbols.  So assume we have SM if we have ICE.
56247  # These have to be linked with before -lX11, unlike the other
56248  # libraries we check for below, so use a different variable.
56249  # John Interrante, Karl Berry
56250  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
56251$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
56252if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
56253  $as_echo_n "(cached) " >&6
56254else
56255  ac_check_lib_save_LIBS=$LIBS
56256LIBS="-lICE $X_EXTRA_LIBS $LIBS"
56257cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56258/* end confdefs.h.  */
56259
56260/* Override any GCC internal prototype to avoid an error.
56261   Use char because int might match the return type of a GCC
56262   builtin and then its argument prototype would still apply.  */
56263#ifdef __cplusplus
56264extern "C"
56265#endif
56266char IceConnectionNumber ();
56267int
56268main ()
56269{
56270return IceConnectionNumber ();
56271  ;
56272  return 0;
56273}
56274_ACEOF
56275if ac_fn_cxx_try_link "$LINENO"; then :
56276  ac_cv_lib_ICE_IceConnectionNumber=yes
56277else
56278  ac_cv_lib_ICE_IceConnectionNumber=no
56279fi
56280rm -f core conftest.err conftest.$ac_objext \
56281    conftest$ac_exeext conftest.$ac_ext
56282LIBS=$ac_check_lib_save_LIBS
56283fi
56284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
56285$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
56286if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
56287  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
56288fi
56289
56290  LDFLAGS=$ac_save_LDFLAGS
56291
56292fi
56293
56294
56295    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
56296    # this doesn't make sense so we remove it.
56297    if test "x$COMPILE_TYPE" = xcross; then
56298      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
56299    fi
56300
56301    if test "x$no_x" = xyes; then
56302
56303  # Print a helpful message on how to acquire the necessary build dependency.
56304  # x11 is the help tag: freetype, cups, alsa etc
56305  MISSING_DEPENDENCY=x11
56306
56307  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56308    cygwin_help $MISSING_DEPENDENCY
56309  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56310    msys_help $MISSING_DEPENDENCY
56311  else
56312    PKGHANDLER_COMMAND=
56313
56314    case $PKGHANDLER in
56315      apt-get)
56316        apt_help     $MISSING_DEPENDENCY ;;
56317      yum)
56318        yum_help     $MISSING_DEPENDENCY ;;
56319      port)
56320        port_help    $MISSING_DEPENDENCY ;;
56321      pkgutil)
56322        pkgutil_help $MISSING_DEPENDENCY ;;
56323      pkgadd)
56324        pkgadd_help  $MISSING_DEPENDENCY ;;
56325    esac
56326
56327    if test "x$PKGHANDLER_COMMAND" != x; then
56328      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56329    fi
56330  fi
56331
56332      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
56333    fi
56334
56335    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
56336      OPENWIN_HOME="/usr/openwin"
56337      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
56338      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
56339          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
56340          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
56341          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
56342    fi
56343
56344    ac_ext=c
56345ac_cpp='$CPP $CPPFLAGS'
56346ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56347ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56348ac_compiler_gnu=$ac_cv_c_compiler_gnu
56349
56350    OLD_CFLAGS="$CFLAGS"
56351    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
56352
56353    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
56354    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
56355do :
56356  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56357ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
56358          # include <X11/Xlib.h>
56359          # include <X11/Xutil.h>
56360
56361
56362"
56363if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56364  cat >>confdefs.h <<_ACEOF
56365#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56366_ACEOF
56367 X11_HEADERS_OK=yes
56368else
56369  X11_HEADERS_OK=no; break
56370fi
56371
56372done
56373
56374
56375    if test "x$X11_HEADERS_OK" = xno; then
56376
56377  # Print a helpful message on how to acquire the necessary build dependency.
56378  # x11 is the help tag: freetype, cups, alsa etc
56379  MISSING_DEPENDENCY=x11
56380
56381  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56382    cygwin_help $MISSING_DEPENDENCY
56383  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56384    msys_help $MISSING_DEPENDENCY
56385  else
56386    PKGHANDLER_COMMAND=
56387
56388    case $PKGHANDLER in
56389      apt-get)
56390        apt_help     $MISSING_DEPENDENCY ;;
56391      yum)
56392        yum_help     $MISSING_DEPENDENCY ;;
56393      port)
56394        port_help    $MISSING_DEPENDENCY ;;
56395      pkgutil)
56396        pkgutil_help $MISSING_DEPENDENCY ;;
56397      pkgadd)
56398        pkgadd_help  $MISSING_DEPENDENCY ;;
56399    esac
56400
56401    if test "x$PKGHANDLER_COMMAND" != x; then
56402      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56403    fi
56404  fi
56405
56406      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
56407    fi
56408
56409    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
56410    # defined in libawt_xawt.
56411    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
56412$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
56413    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56414/* end confdefs.h.  */
56415#include <X11/extensions/Xrender.h>
56416int
56417main ()
56418{
56419XLinearGradient x;
56420  ;
56421  return 0;
56422}
56423_ACEOF
56424if ac_fn_c_try_compile "$LINENO"; then :
56425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56426$as_echo "yes" >&6; }
56427else
56428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56429$as_echo "no" >&6; }
56430         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
56431fi
56432rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
56433
56434    CFLAGS="$OLD_CFLAGS"
56435    ac_ext=cpp
56436ac_cpp='$CXXCPP $CPPFLAGS'
56437ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56438ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56439ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
56440
56441  fi # NEEDS_LIB_X11
56442
56443
56444
56445
56446
56447
56448# Check whether --with-cups was given.
56449if test "${with_cups+set}" = set; then :
56450  withval=$with_cups;
56451fi
56452
56453
56454# Check whether --with-cups-include was given.
56455if test "${with_cups_include+set}" = set; then :
56456  withval=$with_cups_include;
56457fi
56458
56459
56460  if test "x$NEEDS_LIB_CUPS" = xfalse; then
56461    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
56462        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
56463      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
56464$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
56465    fi
56466    CUPS_CFLAGS=
56467  else
56468    CUPS_FOUND=no
56469
56470    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
56471      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
56472    fi
56473
56474    if test "x${with_cups}" != x; then
56475      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56476$as_echo_n "checking for cups headers... " >&6; }
56477      if test -s "${with_cups}/include/cups/cups.h"; then
56478        CUPS_CFLAGS="-I${with_cups}/include"
56479        CUPS_FOUND=yes
56480        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56481$as_echo "$CUPS_FOUND" >&6; }
56482      else
56483        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
56484      fi
56485    fi
56486    if test "x${with_cups_include}" != x; then
56487      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56488$as_echo_n "checking for cups headers... " >&6; }
56489      if test -s "${with_cups_include}/cups/cups.h"; then
56490        CUPS_CFLAGS="-I${with_cups_include}"
56491        CUPS_FOUND=yes
56492        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56493$as_echo "$CUPS_FOUND" >&6; }
56494      else
56495        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
56496      fi
56497    fi
56498    if test "x$CUPS_FOUND" = xno; then
56499      # Are the cups headers installed in the default /usr/include location?
56500      for ac_header in cups/cups.h cups/ppd.h
56501do :
56502  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56503ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
56504if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56505  cat >>confdefs.h <<_ACEOF
56506#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56507_ACEOF
56508
56509          CUPS_FOUND=yes
56510          CUPS_CFLAGS=
56511          DEFAULT_CUPS=yes
56512
56513fi
56514
56515done
56516
56517    fi
56518    if test "x$CUPS_FOUND" = xno; then
56519      # Getting nervous now? Lets poke around for standard Solaris third-party
56520      # package installation locations.
56521      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56522$as_echo_n "checking for cups headers... " >&6; }
56523      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
56524        # An SFW package seems to be installed!
56525        CUPS_FOUND=yes
56526        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
56527      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
56528        # A CSW package seems to be installed!
56529        CUPS_FOUND=yes
56530        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
56531      fi
56532      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56533$as_echo "$CUPS_FOUND" >&6; }
56534    fi
56535    if test "x$CUPS_FOUND" = xno; then
56536
56537  # Print a helpful message on how to acquire the necessary build dependency.
56538  # cups is the help tag: freetype, cups, alsa etc
56539  MISSING_DEPENDENCY=cups
56540
56541  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56542    cygwin_help $MISSING_DEPENDENCY
56543  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56544    msys_help $MISSING_DEPENDENCY
56545  else
56546    PKGHANDLER_COMMAND=
56547
56548    case $PKGHANDLER in
56549      apt-get)
56550        apt_help     $MISSING_DEPENDENCY ;;
56551      yum)
56552        yum_help     $MISSING_DEPENDENCY ;;
56553      port)
56554        port_help    $MISSING_DEPENDENCY ;;
56555      pkgutil)
56556        pkgutil_help $MISSING_DEPENDENCY ;;
56557      pkgadd)
56558        pkgadd_help  $MISSING_DEPENDENCY ;;
56559    esac
56560
56561    if test "x$PKGHANDLER_COMMAND" != x; then
56562      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56563    fi
56564  fi
56565
56566      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
56567    fi
56568  fi
56569
56570
56571
56572
56573
56574# Check whether --with-freetype was given.
56575if test "${with_freetype+set}" = set; then :
56576  withval=$with_freetype;
56577fi
56578
56579
56580# Check whether --with-freetype-include was given.
56581if test "${with_freetype_include+set}" = set; then :
56582  withval=$with_freetype_include;
56583fi
56584
56585
56586# Check whether --with-freetype-lib was given.
56587if test "${with_freetype_lib+set}" = set; then :
56588  withval=$with_freetype_lib;
56589fi
56590
56591
56592# Check whether --with-freetype-src was given.
56593if test "${with_freetype_src+set}" = set; then :
56594  withval=$with_freetype_src;
56595fi
56596
56597  # Check whether --enable-freetype-bundling was given.
56598if test "${enable_freetype_bundling+set}" = set; then :
56599  enableval=$enable_freetype_bundling;
56600fi
56601
56602
56603  # Need to specify explicitly since it needs to be overridden on some versions of macosx
56604  FREETYPE_BASE_NAME=freetype
56605  FREETYPE_CFLAGS=
56606  FREETYPE_LIBS=
56607  FREETYPE_BUNDLE_LIB_PATH=
56608
56609  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
56610    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
56611        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
56612        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
56613        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
56614      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
56615$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
56616    fi
56617    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
56618      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
56619$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
56620    fi
56621  else
56622    # freetype is needed to build; go get it!
56623
56624    BUNDLE_FREETYPE="$enable_freetype_bundling"
56625
56626    if  test "x$with_freetype_src" != x; then
56627      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56628        # Try to build freetype if --with-freetype-src was given on Windows
56629
56630  FREETYPE_SRC_PATH="$with_freetype_src"
56631  BUILD_FREETYPE=yes
56632
56633  # Check if the freetype sources are acessible..
56634  if ! test -d $FREETYPE_SRC_PATH; then
56635    { $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
56636$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
56637    BUILD_FREETYPE=no
56638  fi
56639  # ..and contain a vc2010 project file
56640  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
56641  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
56642    { $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
56643$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
56644    BUILD_FREETYPE=no
56645  fi
56646  # Now check if configure found a version of 'msbuild.exe'
56647  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
56648    { $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
56649$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;}
56650    BUILD_FREETYPE=no
56651  fi
56652
56653  # Ready to go..
56654  if test "x$BUILD_FREETYPE" = xyes; then
56655    # msbuild requires trailing slashes for output directories
56656    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
56657    freetype_lib_path_unix="$freetype_lib_path"
56658    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
56659
56660  unix_path="$vcxproj_path"
56661  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56662    windows_path=`$CYGPATH -m "$unix_path"`
56663    vcxproj_path="$windows_path"
56664  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56665    windows_path=`cmd //c echo $unix_path`
56666    vcxproj_path="$windows_path"
56667  fi
56668
56669
56670  unix_path="$freetype_lib_path"
56671  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56672    windows_path=`$CYGPATH -m "$unix_path"`
56673    freetype_lib_path="$windows_path"
56674  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56675    windows_path=`cmd //c echo $unix_path`
56676    freetype_lib_path="$windows_path"
56677  fi
56678
56679
56680  unix_path="$freetype_obj_path"
56681  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56682    windows_path=`$CYGPATH -m "$unix_path"`
56683    freetype_obj_path="$windows_path"
56684  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56685    windows_path=`cmd //c echo $unix_path`
56686    freetype_obj_path="$windows_path"
56687  fi
56688
56689    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56690      freetype_platform=x64
56691    else
56692      freetype_platform=win32
56693    fi
56694
56695    # The original freetype project file is for VS 2010 (i.e. 'v100'),
56696    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
56697    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
56698    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
56699    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
56700$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
56701
56702    # First we try to build the freetype.dll
56703    $ECHO -e "@echo off\n"\
56704        "$MSBUILD $vcxproj_path "\
56705        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
56706        "/p:Configuration=\"Release Multithreaded\" "\
56707        "/p:Platform=$freetype_platform "\
56708        "/p:ConfigurationType=DynamicLibrary "\
56709        "/p:TargetName=freetype "\
56710        "/p:OutDir=\"$freetype_lib_path\" "\
56711        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
56712    cmd /c freetype.bat
56713
56714    if test -s "$freetype_lib_path_unix/freetype.dll"; then
56715      # If that succeeds we also build freetype.lib
56716      $ECHO -e "@echo off\n"\
56717          "$MSBUILD $vcxproj_path "\
56718          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
56719          "/p:Configuration=\"Release Multithreaded\" "\
56720          "/p:Platform=$freetype_platform "\
56721          "/p:ConfigurationType=StaticLibrary "\
56722          "/p:TargetName=freetype "\
56723          "/p:OutDir=\"$freetype_lib_path\" "\
56724          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
56725      cmd /c freetype.bat
56726
56727      if test -s "$freetype_lib_path_unix/freetype.lib"; then
56728        # Once we build both, lib and dll, set freetype lib and include path appropriately
56729        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
56730        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
56731        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
56732$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
56733      else
56734        BUILD_FREETYPE=no
56735      fi
56736    else
56737      BUILD_FREETYPE=no
56738    fi
56739  fi
56740
56741        if test "x$BUILD_FREETYPE" = xyes; then
56742          # Okay, we built it. Check that it works.
56743
56744  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56745  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
56746  METHOD="--with-freetype-src"
56747
56748  # Let's start with an optimistic view of the world :-)
56749  FOUND_FREETYPE=yes
56750
56751  # First look for the canonical freetype main include file ft2build.h.
56752  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56753    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
56754    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
56755    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56756      # Fail.
56757      FOUND_FREETYPE=no
56758    fi
56759  fi
56760
56761  if test "x$FOUND_FREETYPE" = xyes; then
56762    # Include file found, let's continue the sanity check.
56763    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
56764$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
56765
56766    # Reset to default value
56767    FREETYPE_BASE_NAME=freetype
56768    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56769    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
56770      if test "x$OPENJDK_TARGET_OS" = xmacosx \
56771          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
56772        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
56773        # for the .6 version explicitly.
56774        FREETYPE_BASE_NAME=freetype.6
56775        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56776        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
56777$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
56778      else
56779        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
56780$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
56781        FOUND_FREETYPE=no
56782      fi
56783    else
56784      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56785        # On Windows, we will need both .lib and .dll file.
56786        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
56787          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
56788$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
56789          FOUND_FREETYPE=no
56790        fi
56791      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
56792          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
56793        # Found lib in isa dir, use that instead.
56794        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
56795        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
56796$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
56797      fi
56798    fi
56799  fi
56800
56801  if test "x$FOUND_FREETYPE" = xyes; then
56802
56803  # Only process if variable expands to non-empty
56804
56805  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
56806    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56807
56808  # Input might be given as Windows format, start by converting to
56809  # unix format.
56810  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56811  new_path=`$CYGPATH -u "$path"`
56812
56813  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56814  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56815  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56816  # "foo.exe" is OK but "foo" is an error.
56817  #
56818  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56819  # It is also a way to make sure we got the proper file name for the real test later on.
56820  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56821  if test "x$test_shortpath" = x; then
56822    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56823$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56824    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
56825  fi
56826
56827  # Call helper function which possibly converts this using DOS-style short mode.
56828  # If so, the updated path is stored in $new_path.
56829
56830  input_path="$new_path"
56831  # Check if we need to convert this using DOS-style short mode. If the path
56832  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56833  # take no chances and rewrite it.
56834  # Note: m4 eats our [], so we need to use [ and ] instead.
56835  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56836  if test "x$has_forbidden_chars" != x; then
56837    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56838    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56839    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56840    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56841      # Going to short mode and back again did indeed matter. Since short mode is
56842      # case insensitive, let's make it lowercase to improve readability.
56843      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56844      # Now convert it back to Unix-style (cygpath)
56845      input_path=`$CYGPATH -u "$shortmode_path"`
56846      new_path="$input_path"
56847    fi
56848  fi
56849
56850  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56851  if test "x$test_cygdrive_prefix" = x; then
56852    # As a simple fix, exclude /usr/bin since it's not a real path.
56853    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56854      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56855      # a path prefixed by /cygdrive for fixpath to work.
56856      new_path="$CYGWIN_ROOT_PATH$input_path"
56857    fi
56858  fi
56859
56860
56861  if test "x$path" != "x$new_path"; then
56862    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56863    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56864$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56865  fi
56866
56867    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56868
56869  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56870  has_colon=`$ECHO $path | $GREP ^.:`
56871  new_path="$path"
56872  if test "x$has_colon" = x; then
56873    # Not in mixed or Windows style, start by that.
56874    new_path=`cmd //c echo $path`
56875  fi
56876
56877
56878  input_path="$new_path"
56879  # Check if we need to convert this using DOS-style short mode. If the path
56880  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56881  # take no chances and rewrite it.
56882  # Note: m4 eats our [], so we need to use [ and ] instead.
56883  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56884  if test "x$has_forbidden_chars" != x; then
56885    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56886    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56887  fi
56888
56889
56890  windows_path="$new_path"
56891  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56892    unix_path=`$CYGPATH -u "$windows_path"`
56893    new_path="$unix_path"
56894  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56895    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56896    new_path="$unix_path"
56897  fi
56898
56899  if test "x$path" != "x$new_path"; then
56900    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56901    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56902$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56903  fi
56904
56905  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56906  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56907
56908    else
56909      # We're on a unix platform. Hooray! :)
56910      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56911      has_space=`$ECHO "$path" | $GREP " "`
56912      if test "x$has_space" != x; then
56913        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56914$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56915        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56916      fi
56917
56918      # Use eval to expand a potential ~
56919      eval path="$path"
56920      if test ! -f "$path" && test ! -d "$path"; then
56921        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56922      fi
56923
56924      if test -d "$path"; then
56925        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
56926      else
56927        dir="`$DIRNAME "$path"`"
56928        base="`$BASENAME "$path"`"
56929        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56930      fi
56931    fi
56932  fi
56933
56934
56935  # Only process if variable expands to non-empty
56936
56937  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
56938    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56939
56940  # Input might be given as Windows format, start by converting to
56941  # unix format.
56942  path="$POTENTIAL_FREETYPE_LIB_PATH"
56943  new_path=`$CYGPATH -u "$path"`
56944
56945  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56946  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56947  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56948  # "foo.exe" is OK but "foo" is an error.
56949  #
56950  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56951  # It is also a way to make sure we got the proper file name for the real test later on.
56952  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56953  if test "x$test_shortpath" = x; then
56954    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56955$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56956    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
56957  fi
56958
56959  # Call helper function which possibly converts this using DOS-style short mode.
56960  # If so, the updated path is stored in $new_path.
56961
56962  input_path="$new_path"
56963  # Check if we need to convert this using DOS-style short mode. If the path
56964  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56965  # take no chances and rewrite it.
56966  # Note: m4 eats our [], so we need to use [ and ] instead.
56967  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56968  if test "x$has_forbidden_chars" != x; then
56969    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56970    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56971    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56972    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56973      # Going to short mode and back again did indeed matter. Since short mode is
56974      # case insensitive, let's make it lowercase to improve readability.
56975      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56976      # Now convert it back to Unix-style (cygpath)
56977      input_path=`$CYGPATH -u "$shortmode_path"`
56978      new_path="$input_path"
56979    fi
56980  fi
56981
56982  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56983  if test "x$test_cygdrive_prefix" = x; then
56984    # As a simple fix, exclude /usr/bin since it's not a real path.
56985    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56986      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56987      # a path prefixed by /cygdrive for fixpath to work.
56988      new_path="$CYGWIN_ROOT_PATH$input_path"
56989    fi
56990  fi
56991
56992
56993  if test "x$path" != "x$new_path"; then
56994    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
56995    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
56996$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
56997  fi
56998
56999    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57000
57001  path="$POTENTIAL_FREETYPE_LIB_PATH"
57002  has_colon=`$ECHO $path | $GREP ^.:`
57003  new_path="$path"
57004  if test "x$has_colon" = x; then
57005    # Not in mixed or Windows style, start by that.
57006    new_path=`cmd //c echo $path`
57007  fi
57008
57009
57010  input_path="$new_path"
57011  # Check if we need to convert this using DOS-style short mode. If the path
57012  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57013  # take no chances and rewrite it.
57014  # Note: m4 eats our [], so we need to use [ and ] instead.
57015  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57016  if test "x$has_forbidden_chars" != x; then
57017    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57018    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57019  fi
57020
57021
57022  windows_path="$new_path"
57023  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57024    unix_path=`$CYGPATH -u "$windows_path"`
57025    new_path="$unix_path"
57026  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57027    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57028    new_path="$unix_path"
57029  fi
57030
57031  if test "x$path" != "x$new_path"; then
57032    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57033    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57034$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57035  fi
57036
57037  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57038  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57039
57040    else
57041      # We're on a unix platform. Hooray! :)
57042      path="$POTENTIAL_FREETYPE_LIB_PATH"
57043      has_space=`$ECHO "$path" | $GREP " "`
57044      if test "x$has_space" != x; then
57045        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57046$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57047        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57048      fi
57049
57050      # Use eval to expand a potential ~
57051      eval path="$path"
57052      if test ! -f "$path" && test ! -d "$path"; then
57053        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57054      fi
57055
57056      if test -d "$path"; then
57057        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57058      else
57059        dir="`$DIRNAME "$path"`"
57060        base="`$BASENAME "$path"`"
57061        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57062      fi
57063    fi
57064  fi
57065
57066
57067    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57068    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57069$as_echo_n "checking for freetype includes... " >&6; }
57070    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57071$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57072    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57073    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57074$as_echo_n "checking for freetype libraries... " >&6; }
57075    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57076$as_echo "$FREETYPE_LIB_PATH" >&6; }
57077  fi
57078
57079          if test "x$FOUND_FREETYPE" != xyes; then
57080            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
57081          fi
57082        else
57083          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
57084$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
57085          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
57086        fi
57087      else
57088        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
57089$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
57090      fi
57091    fi
57092
57093    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
57094      # User has specified settings
57095
57096      if test "x$BUNDLE_FREETYPE" = x; then
57097        # If not specified, default is to bundle freetype
57098        BUNDLE_FREETYPE=yes
57099      fi
57100
57101      if test "x$with_freetype" != x; then
57102        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
57103        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
57104      fi
57105
57106      # Allow --with-freetype-lib and --with-freetype-include to override
57107      if test "x$with_freetype_include" != x; then
57108        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
57109      fi
57110      if test "x$with_freetype_lib" != x; then
57111        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
57112      fi
57113
57114      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57115        # Okay, we got it. Check that it works.
57116
57117  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57118  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57119  METHOD="--with-freetype"
57120
57121  # Let's start with an optimistic view of the world :-)
57122  FOUND_FREETYPE=yes
57123
57124  # First look for the canonical freetype main include file ft2build.h.
57125  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57126    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57127    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57128    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57129      # Fail.
57130      FOUND_FREETYPE=no
57131    fi
57132  fi
57133
57134  if test "x$FOUND_FREETYPE" = xyes; then
57135    # Include file found, let's continue the sanity check.
57136    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57137$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57138
57139    # Reset to default value
57140    FREETYPE_BASE_NAME=freetype
57141    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57142    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57143      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57144          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57145        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57146        # for the .6 version explicitly.
57147        FREETYPE_BASE_NAME=freetype.6
57148        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57149        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57150$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57151      else
57152        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57153$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57154        FOUND_FREETYPE=no
57155      fi
57156    else
57157      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57158        # On Windows, we will need both .lib and .dll file.
57159        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57160          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57161$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57162          FOUND_FREETYPE=no
57163        fi
57164      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57165          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57166        # Found lib in isa dir, use that instead.
57167        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57168        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57169$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57170      fi
57171    fi
57172  fi
57173
57174  if test "x$FOUND_FREETYPE" = xyes; then
57175
57176  # Only process if variable expands to non-empty
57177
57178  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57179    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57180
57181  # Input might be given as Windows format, start by converting to
57182  # unix format.
57183  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57184  new_path=`$CYGPATH -u "$path"`
57185
57186  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57187  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57188  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57189  # "foo.exe" is OK but "foo" is an error.
57190  #
57191  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57192  # It is also a way to make sure we got the proper file name for the real test later on.
57193  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57194  if test "x$test_shortpath" = x; then
57195    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57196$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57197    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57198  fi
57199
57200  # Call helper function which possibly converts this using DOS-style short mode.
57201  # If so, the updated path is stored in $new_path.
57202
57203  input_path="$new_path"
57204  # Check if we need to convert this using DOS-style short mode. If the path
57205  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57206  # take no chances and rewrite it.
57207  # Note: m4 eats our [], so we need to use [ and ] instead.
57208  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57209  if test "x$has_forbidden_chars" != x; then
57210    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57211    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57212    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57213    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57214      # Going to short mode and back again did indeed matter. Since short mode is
57215      # case insensitive, let's make it lowercase to improve readability.
57216      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57217      # Now convert it back to Unix-style (cygpath)
57218      input_path=`$CYGPATH -u "$shortmode_path"`
57219      new_path="$input_path"
57220    fi
57221  fi
57222
57223  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57224  if test "x$test_cygdrive_prefix" = x; then
57225    # As a simple fix, exclude /usr/bin since it's not a real path.
57226    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57227      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57228      # a path prefixed by /cygdrive for fixpath to work.
57229      new_path="$CYGWIN_ROOT_PATH$input_path"
57230    fi
57231  fi
57232
57233
57234  if test "x$path" != "x$new_path"; then
57235    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57236    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57237$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57238  fi
57239
57240    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57241
57242  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57243  has_colon=`$ECHO $path | $GREP ^.:`
57244  new_path="$path"
57245  if test "x$has_colon" = x; then
57246    # Not in mixed or Windows style, start by that.
57247    new_path=`cmd //c echo $path`
57248  fi
57249
57250
57251  input_path="$new_path"
57252  # Check if we need to convert this using DOS-style short mode. If the path
57253  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57254  # take no chances and rewrite it.
57255  # Note: m4 eats our [], so we need to use [ and ] instead.
57256  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57257  if test "x$has_forbidden_chars" != x; then
57258    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57259    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57260  fi
57261
57262
57263  windows_path="$new_path"
57264  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57265    unix_path=`$CYGPATH -u "$windows_path"`
57266    new_path="$unix_path"
57267  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57268    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57269    new_path="$unix_path"
57270  fi
57271
57272  if test "x$path" != "x$new_path"; then
57273    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57274    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57275$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57276  fi
57277
57278  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57279  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57280
57281    else
57282      # We're on a unix platform. Hooray! :)
57283      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57284      has_space=`$ECHO "$path" | $GREP " "`
57285      if test "x$has_space" != x; then
57286        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57287$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57288        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57289      fi
57290
57291      # Use eval to expand a potential ~
57292      eval path="$path"
57293      if test ! -f "$path" && test ! -d "$path"; then
57294        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57295      fi
57296
57297      if test -d "$path"; then
57298        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57299      else
57300        dir="`$DIRNAME "$path"`"
57301        base="`$BASENAME "$path"`"
57302        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57303      fi
57304    fi
57305  fi
57306
57307
57308  # Only process if variable expands to non-empty
57309
57310  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57311    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57312
57313  # Input might be given as Windows format, start by converting to
57314  # unix format.
57315  path="$POTENTIAL_FREETYPE_LIB_PATH"
57316  new_path=`$CYGPATH -u "$path"`
57317
57318  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57319  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57320  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57321  # "foo.exe" is OK but "foo" is an error.
57322  #
57323  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57324  # It is also a way to make sure we got the proper file name for the real test later on.
57325  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57326  if test "x$test_shortpath" = x; then
57327    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57328$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57329    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57330  fi
57331
57332  # Call helper function which possibly converts this using DOS-style short mode.
57333  # If so, the updated path is stored in $new_path.
57334
57335  input_path="$new_path"
57336  # Check if we need to convert this using DOS-style short mode. If the path
57337  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57338  # take no chances and rewrite it.
57339  # Note: m4 eats our [], so we need to use [ and ] instead.
57340  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57341  if test "x$has_forbidden_chars" != x; then
57342    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57343    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57344    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57345    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57346      # Going to short mode and back again did indeed matter. Since short mode is
57347      # case insensitive, let's make it lowercase to improve readability.
57348      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57349      # Now convert it back to Unix-style (cygpath)
57350      input_path=`$CYGPATH -u "$shortmode_path"`
57351      new_path="$input_path"
57352    fi
57353  fi
57354
57355  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57356  if test "x$test_cygdrive_prefix" = x; then
57357    # As a simple fix, exclude /usr/bin since it's not a real path.
57358    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57359      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57360      # a path prefixed by /cygdrive for fixpath to work.
57361      new_path="$CYGWIN_ROOT_PATH$input_path"
57362    fi
57363  fi
57364
57365
57366  if test "x$path" != "x$new_path"; then
57367    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57368    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57369$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57370  fi
57371
57372    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57373
57374  path="$POTENTIAL_FREETYPE_LIB_PATH"
57375  has_colon=`$ECHO $path | $GREP ^.:`
57376  new_path="$path"
57377  if test "x$has_colon" = x; then
57378    # Not in mixed or Windows style, start by that.
57379    new_path=`cmd //c echo $path`
57380  fi
57381
57382
57383  input_path="$new_path"
57384  # Check if we need to convert this using DOS-style short mode. If the path
57385  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57386  # take no chances and rewrite it.
57387  # Note: m4 eats our [], so we need to use [ and ] instead.
57388  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57389  if test "x$has_forbidden_chars" != x; then
57390    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57391    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57392  fi
57393
57394
57395  windows_path="$new_path"
57396  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57397    unix_path=`$CYGPATH -u "$windows_path"`
57398    new_path="$unix_path"
57399  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57400    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57401    new_path="$unix_path"
57402  fi
57403
57404  if test "x$path" != "x$new_path"; then
57405    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57406    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57407$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57408  fi
57409
57410  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57411  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57412
57413    else
57414      # We're on a unix platform. Hooray! :)
57415      path="$POTENTIAL_FREETYPE_LIB_PATH"
57416      has_space=`$ECHO "$path" | $GREP " "`
57417      if test "x$has_space" != x; then
57418        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57419$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57420        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57421      fi
57422
57423      # Use eval to expand a potential ~
57424      eval path="$path"
57425      if test ! -f "$path" && test ! -d "$path"; then
57426        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57427      fi
57428
57429      if test -d "$path"; then
57430        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57431      else
57432        dir="`$DIRNAME "$path"`"
57433        base="`$BASENAME "$path"`"
57434        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57435      fi
57436    fi
57437  fi
57438
57439
57440    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57441    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57442$as_echo_n "checking for freetype includes... " >&6; }
57443    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57444$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57445    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57446    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57447$as_echo_n "checking for freetype libraries... " >&6; }
57448    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57449$as_echo "$FREETYPE_LIB_PATH" >&6; }
57450  fi
57451
57452        if test "x$FOUND_FREETYPE" != xyes; then
57453          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
57454        fi
57455      else
57456        # User specified only one of lib or include. This is an error.
57457        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
57458          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
57459$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
57460          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57461        else
57462          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
57463$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
57464          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57465        fi
57466      fi
57467    else
57468      # User did not specify settings, but we need freetype. Try to locate it.
57469
57470      if test "x$BUNDLE_FREETYPE" = x; then
57471        # If not specified, default is to bundle freetype only on windows
57472        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57473          BUNDLE_FREETYPE=yes
57474        else
57475          BUNDLE_FREETYPE=no
57476        fi
57477      fi
57478
57479      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
57480      if test "x$SYSROOT" = x; then
57481        if test "x$FOUND_FREETYPE" != xyes; then
57482          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
57483          if test "x$PKG_CONFIG" != x; then
57484
57485pkg_failed=no
57486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
57487$as_echo_n "checking for FREETYPE... " >&6; }
57488
57489if test -n "$FREETYPE_CFLAGS"; then
57490    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
57491 elif test -n "$PKG_CONFIG"; then
57492    if test -n "$PKG_CONFIG" && \
57493    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57494  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57495  ac_status=$?
57496  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57497  test $ac_status = 0; }; then
57498  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
57499else
57500  pkg_failed=yes
57501fi
57502 else
57503    pkg_failed=untried
57504fi
57505if test -n "$FREETYPE_LIBS"; then
57506    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
57507 elif test -n "$PKG_CONFIG"; then
57508    if test -n "$PKG_CONFIG" && \
57509    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57510  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57511  ac_status=$?
57512  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57513  test $ac_status = 0; }; then
57514  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
57515else
57516  pkg_failed=yes
57517fi
57518 else
57519    pkg_failed=untried
57520fi
57521
57522
57523
57524if test $pkg_failed = yes; then
57525
57526if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
57527        _pkg_short_errors_supported=yes
57528else
57529        _pkg_short_errors_supported=no
57530fi
57531        if test $_pkg_short_errors_supported = yes; then
57532	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
57533        else
57534	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
57535        fi
57536	# Put the nasty error message in config.log where it belongs
57537	echo "$FREETYPE_PKG_ERRORS" >&5
57538
57539	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57540$as_echo "no" >&6; }
57541                FOUND_FREETYPE=no
57542elif test $pkg_failed = untried; then
57543	FOUND_FREETYPE=no
57544else
57545	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
57546	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
57547        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57548$as_echo "yes" >&6; }
57549	FOUND_FREETYPE=yes
57550fi
57551            if test "x$FOUND_FREETYPE" = xyes; then
57552              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
57553              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
57554              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
57555              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
57556                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
57557              fi
57558              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
57559              if test "x$BUNDLE_FREETYPE" = xyes; then
57560                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
57561$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
57562                FOUND_FREETYPE=no
57563              else
57564                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
57565$as_echo_n "checking for freetype... " >&6; }
57566                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
57567$as_echo "yes (using pkg-config)" >&6; }
57568              fi
57569            fi
57570          fi
57571        fi
57572      fi
57573
57574      if test "x$FOUND_FREETYPE" != xyes; then
57575        # Check in well-known locations
57576        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57577          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
57578
57579  windows_path="$FREETYPE_BASE_DIR"
57580  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57581    unix_path=`$CYGPATH -u "$windows_path"`
57582    FREETYPE_BASE_DIR="$unix_path"
57583  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57584    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57585    FREETYPE_BASE_DIR="$unix_path"
57586  fi
57587
57588
57589  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
57590  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
57591  METHOD="well-known location"
57592
57593  # Let's start with an optimistic view of the world :-)
57594  FOUND_FREETYPE=yes
57595
57596  # First look for the canonical freetype main include file ft2build.h.
57597  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57598    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57599    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57600    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57601      # Fail.
57602      FOUND_FREETYPE=no
57603    fi
57604  fi
57605
57606  if test "x$FOUND_FREETYPE" = xyes; then
57607    # Include file found, let's continue the sanity check.
57608    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57609$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57610
57611    # Reset to default value
57612    FREETYPE_BASE_NAME=freetype
57613    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57614    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57615      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57616          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57617        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57618        # for the .6 version explicitly.
57619        FREETYPE_BASE_NAME=freetype.6
57620        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57621        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57622$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57623      else
57624        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57625$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57626        FOUND_FREETYPE=no
57627      fi
57628    else
57629      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57630        # On Windows, we will need both .lib and .dll file.
57631        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57632          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57633$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57634          FOUND_FREETYPE=no
57635        fi
57636      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57637          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57638        # Found lib in isa dir, use that instead.
57639        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57640        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57641$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57642      fi
57643    fi
57644  fi
57645
57646  if test "x$FOUND_FREETYPE" = xyes; then
57647
57648  # Only process if variable expands to non-empty
57649
57650  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57651    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57652
57653  # Input might be given as Windows format, start by converting to
57654  # unix format.
57655  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57656  new_path=`$CYGPATH -u "$path"`
57657
57658  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57659  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57660  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57661  # "foo.exe" is OK but "foo" is an error.
57662  #
57663  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57664  # It is also a way to make sure we got the proper file name for the real test later on.
57665  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57666  if test "x$test_shortpath" = x; then
57667    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57668$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57669    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57670  fi
57671
57672  # Call helper function which possibly converts this using DOS-style short mode.
57673  # If so, the updated path is stored in $new_path.
57674
57675  input_path="$new_path"
57676  # Check if we need to convert this using DOS-style short mode. If the path
57677  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57678  # take no chances and rewrite it.
57679  # Note: m4 eats our [], so we need to use [ and ] instead.
57680  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57681  if test "x$has_forbidden_chars" != x; then
57682    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57683    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57684    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57685    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57686      # Going to short mode and back again did indeed matter. Since short mode is
57687      # case insensitive, let's make it lowercase to improve readability.
57688      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57689      # Now convert it back to Unix-style (cygpath)
57690      input_path=`$CYGPATH -u "$shortmode_path"`
57691      new_path="$input_path"
57692    fi
57693  fi
57694
57695  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57696  if test "x$test_cygdrive_prefix" = x; then
57697    # As a simple fix, exclude /usr/bin since it's not a real path.
57698    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57699      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57700      # a path prefixed by /cygdrive for fixpath to work.
57701      new_path="$CYGWIN_ROOT_PATH$input_path"
57702    fi
57703  fi
57704
57705
57706  if test "x$path" != "x$new_path"; then
57707    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57708    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57709$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57710  fi
57711
57712    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57713
57714  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57715  has_colon=`$ECHO $path | $GREP ^.:`
57716  new_path="$path"
57717  if test "x$has_colon" = x; then
57718    # Not in mixed or Windows style, start by that.
57719    new_path=`cmd //c echo $path`
57720  fi
57721
57722
57723  input_path="$new_path"
57724  # Check if we need to convert this using DOS-style short mode. If the path
57725  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57726  # take no chances and rewrite it.
57727  # Note: m4 eats our [], so we need to use [ and ] instead.
57728  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57729  if test "x$has_forbidden_chars" != x; then
57730    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57731    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57732  fi
57733
57734
57735  windows_path="$new_path"
57736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57737    unix_path=`$CYGPATH -u "$windows_path"`
57738    new_path="$unix_path"
57739  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57740    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57741    new_path="$unix_path"
57742  fi
57743
57744  if test "x$path" != "x$new_path"; then
57745    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57746    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57747$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57748  fi
57749
57750  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57751  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57752
57753    else
57754      # We're on a unix platform. Hooray! :)
57755      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57756      has_space=`$ECHO "$path" | $GREP " "`
57757      if test "x$has_space" != x; then
57758        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57759$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57760        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57761      fi
57762
57763      # Use eval to expand a potential ~
57764      eval path="$path"
57765      if test ! -f "$path" && test ! -d "$path"; then
57766        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57767      fi
57768
57769      if test -d "$path"; then
57770        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57771      else
57772        dir="`$DIRNAME "$path"`"
57773        base="`$BASENAME "$path"`"
57774        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57775      fi
57776    fi
57777  fi
57778
57779
57780  # Only process if variable expands to non-empty
57781
57782  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57783    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57784
57785  # Input might be given as Windows format, start by converting to
57786  # unix format.
57787  path="$POTENTIAL_FREETYPE_LIB_PATH"
57788  new_path=`$CYGPATH -u "$path"`
57789
57790  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57791  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57792  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57793  # "foo.exe" is OK but "foo" is an error.
57794  #
57795  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57796  # It is also a way to make sure we got the proper file name for the real test later on.
57797  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57798  if test "x$test_shortpath" = x; then
57799    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57800$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57801    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57802  fi
57803
57804  # Call helper function which possibly converts this using DOS-style short mode.
57805  # If so, the updated path is stored in $new_path.
57806
57807  input_path="$new_path"
57808  # Check if we need to convert this using DOS-style short mode. If the path
57809  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57810  # take no chances and rewrite it.
57811  # Note: m4 eats our [], so we need to use [ and ] instead.
57812  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57813  if test "x$has_forbidden_chars" != x; then
57814    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57815    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57816    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57817    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57818      # Going to short mode and back again did indeed matter. Since short mode is
57819      # case insensitive, let's make it lowercase to improve readability.
57820      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57821      # Now convert it back to Unix-style (cygpath)
57822      input_path=`$CYGPATH -u "$shortmode_path"`
57823      new_path="$input_path"
57824    fi
57825  fi
57826
57827  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57828  if test "x$test_cygdrive_prefix" = x; then
57829    # As a simple fix, exclude /usr/bin since it's not a real path.
57830    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57831      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57832      # a path prefixed by /cygdrive for fixpath to work.
57833      new_path="$CYGWIN_ROOT_PATH$input_path"
57834    fi
57835  fi
57836
57837
57838  if test "x$path" != "x$new_path"; then
57839    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57840    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57841$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57842  fi
57843
57844    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57845
57846  path="$POTENTIAL_FREETYPE_LIB_PATH"
57847  has_colon=`$ECHO $path | $GREP ^.:`
57848  new_path="$path"
57849  if test "x$has_colon" = x; then
57850    # Not in mixed or Windows style, start by that.
57851    new_path=`cmd //c echo $path`
57852  fi
57853
57854
57855  input_path="$new_path"
57856  # Check if we need to convert this using DOS-style short mode. If the path
57857  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57858  # take no chances and rewrite it.
57859  # Note: m4 eats our [], so we need to use [ and ] instead.
57860  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57861  if test "x$has_forbidden_chars" != x; then
57862    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57863    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57864  fi
57865
57866
57867  windows_path="$new_path"
57868  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57869    unix_path=`$CYGPATH -u "$windows_path"`
57870    new_path="$unix_path"
57871  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57872    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57873    new_path="$unix_path"
57874  fi
57875
57876  if test "x$path" != "x$new_path"; then
57877    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57878    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57879$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57880  fi
57881
57882  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57883  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57884
57885    else
57886      # We're on a unix platform. Hooray! :)
57887      path="$POTENTIAL_FREETYPE_LIB_PATH"
57888      has_space=`$ECHO "$path" | $GREP " "`
57889      if test "x$has_space" != x; then
57890        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57891$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57892        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57893      fi
57894
57895      # Use eval to expand a potential ~
57896      eval path="$path"
57897      if test ! -f "$path" && test ! -d "$path"; then
57898        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57899      fi
57900
57901      if test -d "$path"; then
57902        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57903      else
57904        dir="`$DIRNAME "$path"`"
57905        base="`$BASENAME "$path"`"
57906        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57907      fi
57908    fi
57909  fi
57910
57911
57912    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57913    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57914$as_echo_n "checking for freetype includes... " >&6; }
57915    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57916$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57917    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57918    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57919$as_echo_n "checking for freetype libraries... " >&6; }
57920    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57921$as_echo "$FREETYPE_LIB_PATH" >&6; }
57922  fi
57923
57924          if test "x$FOUND_FREETYPE" != xyes; then
57925            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
57926
57927  windows_path="$FREETYPE_BASE_DIR"
57928  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57929    unix_path=`$CYGPATH -u "$windows_path"`
57930    FREETYPE_BASE_DIR="$unix_path"
57931  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57932    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57933    FREETYPE_BASE_DIR="$unix_path"
57934  fi
57935
57936
57937  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
57938  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
57939  METHOD="well-known location"
57940
57941  # Let's start with an optimistic view of the world :-)
57942  FOUND_FREETYPE=yes
57943
57944  # First look for the canonical freetype main include file ft2build.h.
57945  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57946    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57947    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57948    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57949      # Fail.
57950      FOUND_FREETYPE=no
57951    fi
57952  fi
57953
57954  if test "x$FOUND_FREETYPE" = xyes; then
57955    # Include file found, let's continue the sanity check.
57956    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57957$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57958
57959    # Reset to default value
57960    FREETYPE_BASE_NAME=freetype
57961    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57962    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57963      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57964          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57965        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57966        # for the .6 version explicitly.
57967        FREETYPE_BASE_NAME=freetype.6
57968        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57969        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57970$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57971      else
57972        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57973$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57974        FOUND_FREETYPE=no
57975      fi
57976    else
57977      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57978        # On Windows, we will need both .lib and .dll file.
57979        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57980          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57981$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57982          FOUND_FREETYPE=no
57983        fi
57984      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57985          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57986        # Found lib in isa dir, use that instead.
57987        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57988        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57989$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57990      fi
57991    fi
57992  fi
57993
57994  if test "x$FOUND_FREETYPE" = xyes; then
57995
57996  # Only process if variable expands to non-empty
57997
57998  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57999    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58000
58001  # Input might be given as Windows format, start by converting to
58002  # unix format.
58003  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58004  new_path=`$CYGPATH -u "$path"`
58005
58006  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58007  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58008  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58009  # "foo.exe" is OK but "foo" is an error.
58010  #
58011  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58012  # It is also a way to make sure we got the proper file name for the real test later on.
58013  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58014  if test "x$test_shortpath" = x; then
58015    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58016$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58017    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58018  fi
58019
58020  # Call helper function which possibly converts this using DOS-style short mode.
58021  # If so, the updated path is stored in $new_path.
58022
58023  input_path="$new_path"
58024  # Check if we need to convert this using DOS-style short mode. If the path
58025  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58026  # take no chances and rewrite it.
58027  # Note: m4 eats our [], so we need to use [ and ] instead.
58028  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58029  if test "x$has_forbidden_chars" != x; then
58030    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58031    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58032    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58033    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58034      # Going to short mode and back again did indeed matter. Since short mode is
58035      # case insensitive, let's make it lowercase to improve readability.
58036      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58037      # Now convert it back to Unix-style (cygpath)
58038      input_path=`$CYGPATH -u "$shortmode_path"`
58039      new_path="$input_path"
58040    fi
58041  fi
58042
58043  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58044  if test "x$test_cygdrive_prefix" = x; then
58045    # As a simple fix, exclude /usr/bin since it's not a real path.
58046    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58047      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58048      # a path prefixed by /cygdrive for fixpath to work.
58049      new_path="$CYGWIN_ROOT_PATH$input_path"
58050    fi
58051  fi
58052
58053
58054  if test "x$path" != "x$new_path"; then
58055    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58056    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58057$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58058  fi
58059
58060    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58061
58062  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58063  has_colon=`$ECHO $path | $GREP ^.:`
58064  new_path="$path"
58065  if test "x$has_colon" = x; then
58066    # Not in mixed or Windows style, start by that.
58067    new_path=`cmd //c echo $path`
58068  fi
58069
58070
58071  input_path="$new_path"
58072  # Check if we need to convert this using DOS-style short mode. If the path
58073  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58074  # take no chances and rewrite it.
58075  # Note: m4 eats our [], so we need to use [ and ] instead.
58076  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58077  if test "x$has_forbidden_chars" != x; then
58078    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58079    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58080  fi
58081
58082
58083  windows_path="$new_path"
58084  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58085    unix_path=`$CYGPATH -u "$windows_path"`
58086    new_path="$unix_path"
58087  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58088    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58089    new_path="$unix_path"
58090  fi
58091
58092  if test "x$path" != "x$new_path"; then
58093    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58094    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58095$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58096  fi
58097
58098  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58099  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58100
58101    else
58102      # We're on a unix platform. Hooray! :)
58103      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58104      has_space=`$ECHO "$path" | $GREP " "`
58105      if test "x$has_space" != x; then
58106        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58107$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58108        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58109      fi
58110
58111      # Use eval to expand a potential ~
58112      eval path="$path"
58113      if test ! -f "$path" && test ! -d "$path"; then
58114        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58115      fi
58116
58117      if test -d "$path"; then
58118        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58119      else
58120        dir="`$DIRNAME "$path"`"
58121        base="`$BASENAME "$path"`"
58122        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58123      fi
58124    fi
58125  fi
58126
58127
58128  # Only process if variable expands to non-empty
58129
58130  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58131    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58132
58133  # Input might be given as Windows format, start by converting to
58134  # unix format.
58135  path="$POTENTIAL_FREETYPE_LIB_PATH"
58136  new_path=`$CYGPATH -u "$path"`
58137
58138  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58139  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58140  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58141  # "foo.exe" is OK but "foo" is an error.
58142  #
58143  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58144  # It is also a way to make sure we got the proper file name for the real test later on.
58145  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58146  if test "x$test_shortpath" = x; then
58147    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58148$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58149    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58150  fi
58151
58152  # Call helper function which possibly converts this using DOS-style short mode.
58153  # If so, the updated path is stored in $new_path.
58154
58155  input_path="$new_path"
58156  # Check if we need to convert this using DOS-style short mode. If the path
58157  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58158  # take no chances and rewrite it.
58159  # Note: m4 eats our [], so we need to use [ and ] instead.
58160  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58161  if test "x$has_forbidden_chars" != x; then
58162    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58163    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58164    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58165    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58166      # Going to short mode and back again did indeed matter. Since short mode is
58167      # case insensitive, let's make it lowercase to improve readability.
58168      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58169      # Now convert it back to Unix-style (cygpath)
58170      input_path=`$CYGPATH -u "$shortmode_path"`
58171      new_path="$input_path"
58172    fi
58173  fi
58174
58175  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58176  if test "x$test_cygdrive_prefix" = x; then
58177    # As a simple fix, exclude /usr/bin since it's not a real path.
58178    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58179      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58180      # a path prefixed by /cygdrive for fixpath to work.
58181      new_path="$CYGWIN_ROOT_PATH$input_path"
58182    fi
58183  fi
58184
58185
58186  if test "x$path" != "x$new_path"; then
58187    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58188    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58189$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58190  fi
58191
58192    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58193
58194  path="$POTENTIAL_FREETYPE_LIB_PATH"
58195  has_colon=`$ECHO $path | $GREP ^.:`
58196  new_path="$path"
58197  if test "x$has_colon" = x; then
58198    # Not in mixed or Windows style, start by that.
58199    new_path=`cmd //c echo $path`
58200  fi
58201
58202
58203  input_path="$new_path"
58204  # Check if we need to convert this using DOS-style short mode. If the path
58205  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58206  # take no chances and rewrite it.
58207  # Note: m4 eats our [], so we need to use [ and ] instead.
58208  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58209  if test "x$has_forbidden_chars" != x; then
58210    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58211    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58212  fi
58213
58214
58215  windows_path="$new_path"
58216  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58217    unix_path=`$CYGPATH -u "$windows_path"`
58218    new_path="$unix_path"
58219  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58220    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58221    new_path="$unix_path"
58222  fi
58223
58224  if test "x$path" != "x$new_path"; then
58225    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58226    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58227$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58228  fi
58229
58230  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58231  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58232
58233    else
58234      # We're on a unix platform. Hooray! :)
58235      path="$POTENTIAL_FREETYPE_LIB_PATH"
58236      has_space=`$ECHO "$path" | $GREP " "`
58237      if test "x$has_space" != x; then
58238        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58239$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58240        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58241      fi
58242
58243      # Use eval to expand a potential ~
58244      eval path="$path"
58245      if test ! -f "$path" && test ! -d "$path"; then
58246        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58247      fi
58248
58249      if test -d "$path"; then
58250        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58251      else
58252        dir="`$DIRNAME "$path"`"
58253        base="`$BASENAME "$path"`"
58254        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58255      fi
58256    fi
58257  fi
58258
58259
58260    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58261    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58262$as_echo_n "checking for freetype includes... " >&6; }
58263    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58264$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58265    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58266    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58267$as_echo_n "checking for freetype libraries... " >&6; }
58268    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58269$as_echo "$FREETYPE_LIB_PATH" >&6; }
58270  fi
58271
58272          fi
58273          if test "x$FOUND_FREETYPE" != xyes; then
58274            FREETYPE_BASE_DIR="$HOME/freetype"
58275
58276  windows_path="$FREETYPE_BASE_DIR"
58277  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58278    unix_path=`$CYGPATH -u "$windows_path"`
58279    FREETYPE_BASE_DIR="$unix_path"
58280  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58281    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58282    FREETYPE_BASE_DIR="$unix_path"
58283  fi
58284
58285            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
58286
58287  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58288  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
58289  METHOD="well-known location"
58290
58291  # Let's start with an optimistic view of the world :-)
58292  FOUND_FREETYPE=yes
58293
58294  # First look for the canonical freetype main include file ft2build.h.
58295  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58296    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58297    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58298    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58299      # Fail.
58300      FOUND_FREETYPE=no
58301    fi
58302  fi
58303
58304  if test "x$FOUND_FREETYPE" = xyes; then
58305    # Include file found, let's continue the sanity check.
58306    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58307$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58308
58309    # Reset to default value
58310    FREETYPE_BASE_NAME=freetype
58311    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58312    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58313      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58314          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58315        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58316        # for the .6 version explicitly.
58317        FREETYPE_BASE_NAME=freetype.6
58318        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58319        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58320$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58321      else
58322        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58323$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58324        FOUND_FREETYPE=no
58325      fi
58326    else
58327      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58328        # On Windows, we will need both .lib and .dll file.
58329        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58330          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58331$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58332          FOUND_FREETYPE=no
58333        fi
58334      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58335          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58336        # Found lib in isa dir, use that instead.
58337        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58338        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58339$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58340      fi
58341    fi
58342  fi
58343
58344  if test "x$FOUND_FREETYPE" = xyes; then
58345
58346  # Only process if variable expands to non-empty
58347
58348  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58349    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58350
58351  # Input might be given as Windows format, start by converting to
58352  # unix format.
58353  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58354  new_path=`$CYGPATH -u "$path"`
58355
58356  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58357  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58358  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58359  # "foo.exe" is OK but "foo" is an error.
58360  #
58361  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58362  # It is also a way to make sure we got the proper file name for the real test later on.
58363  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58364  if test "x$test_shortpath" = x; then
58365    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58366$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58367    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58368  fi
58369
58370  # Call helper function which possibly converts this using DOS-style short mode.
58371  # If so, the updated path is stored in $new_path.
58372
58373  input_path="$new_path"
58374  # Check if we need to convert this using DOS-style short mode. If the path
58375  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58376  # take no chances and rewrite it.
58377  # Note: m4 eats our [], so we need to use [ and ] instead.
58378  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58379  if test "x$has_forbidden_chars" != x; then
58380    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58381    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58382    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58383    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58384      # Going to short mode and back again did indeed matter. Since short mode is
58385      # case insensitive, let's make it lowercase to improve readability.
58386      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58387      # Now convert it back to Unix-style (cygpath)
58388      input_path=`$CYGPATH -u "$shortmode_path"`
58389      new_path="$input_path"
58390    fi
58391  fi
58392
58393  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58394  if test "x$test_cygdrive_prefix" = x; then
58395    # As a simple fix, exclude /usr/bin since it's not a real path.
58396    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58397      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58398      # a path prefixed by /cygdrive for fixpath to work.
58399      new_path="$CYGWIN_ROOT_PATH$input_path"
58400    fi
58401  fi
58402
58403
58404  if test "x$path" != "x$new_path"; then
58405    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58406    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58407$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58408  fi
58409
58410    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58411
58412  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58413  has_colon=`$ECHO $path | $GREP ^.:`
58414  new_path="$path"
58415  if test "x$has_colon" = x; then
58416    # Not in mixed or Windows style, start by that.
58417    new_path=`cmd //c echo $path`
58418  fi
58419
58420
58421  input_path="$new_path"
58422  # Check if we need to convert this using DOS-style short mode. If the path
58423  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58424  # take no chances and rewrite it.
58425  # Note: m4 eats our [], so we need to use [ and ] instead.
58426  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58427  if test "x$has_forbidden_chars" != x; then
58428    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58429    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58430  fi
58431
58432
58433  windows_path="$new_path"
58434  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58435    unix_path=`$CYGPATH -u "$windows_path"`
58436    new_path="$unix_path"
58437  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58438    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58439    new_path="$unix_path"
58440  fi
58441
58442  if test "x$path" != "x$new_path"; then
58443    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58444    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58445$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58446  fi
58447
58448  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58449  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58450
58451    else
58452      # We're on a unix platform. Hooray! :)
58453      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58454      has_space=`$ECHO "$path" | $GREP " "`
58455      if test "x$has_space" != x; then
58456        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58457$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58458        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58459      fi
58460
58461      # Use eval to expand a potential ~
58462      eval path="$path"
58463      if test ! -f "$path" && test ! -d "$path"; then
58464        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58465      fi
58466
58467      if test -d "$path"; then
58468        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58469      else
58470        dir="`$DIRNAME "$path"`"
58471        base="`$BASENAME "$path"`"
58472        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58473      fi
58474    fi
58475  fi
58476
58477
58478  # Only process if variable expands to non-empty
58479
58480  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58481    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58482
58483  # Input might be given as Windows format, start by converting to
58484  # unix format.
58485  path="$POTENTIAL_FREETYPE_LIB_PATH"
58486  new_path=`$CYGPATH -u "$path"`
58487
58488  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58489  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58490  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58491  # "foo.exe" is OK but "foo" is an error.
58492  #
58493  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58494  # It is also a way to make sure we got the proper file name for the real test later on.
58495  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58496  if test "x$test_shortpath" = x; then
58497    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58498$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58499    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58500  fi
58501
58502  # Call helper function which possibly converts this using DOS-style short mode.
58503  # If so, the updated path is stored in $new_path.
58504
58505  input_path="$new_path"
58506  # Check if we need to convert this using DOS-style short mode. If the path
58507  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58508  # take no chances and rewrite it.
58509  # Note: m4 eats our [], so we need to use [ and ] instead.
58510  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58511  if test "x$has_forbidden_chars" != x; then
58512    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58513    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58514    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58515    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58516      # Going to short mode and back again did indeed matter. Since short mode is
58517      # case insensitive, let's make it lowercase to improve readability.
58518      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58519      # Now convert it back to Unix-style (cygpath)
58520      input_path=`$CYGPATH -u "$shortmode_path"`
58521      new_path="$input_path"
58522    fi
58523  fi
58524
58525  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58526  if test "x$test_cygdrive_prefix" = x; then
58527    # As a simple fix, exclude /usr/bin since it's not a real path.
58528    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58529      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58530      # a path prefixed by /cygdrive for fixpath to work.
58531      new_path="$CYGWIN_ROOT_PATH$input_path"
58532    fi
58533  fi
58534
58535
58536  if test "x$path" != "x$new_path"; then
58537    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58538    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58539$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58540  fi
58541
58542    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58543
58544  path="$POTENTIAL_FREETYPE_LIB_PATH"
58545  has_colon=`$ECHO $path | $GREP ^.:`
58546  new_path="$path"
58547  if test "x$has_colon" = x; then
58548    # Not in mixed or Windows style, start by that.
58549    new_path=`cmd //c echo $path`
58550  fi
58551
58552
58553  input_path="$new_path"
58554  # Check if we need to convert this using DOS-style short mode. If the path
58555  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58556  # take no chances and rewrite it.
58557  # Note: m4 eats our [], so we need to use [ and ] instead.
58558  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58559  if test "x$has_forbidden_chars" != x; then
58560    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58561    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58562  fi
58563
58564
58565  windows_path="$new_path"
58566  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58567    unix_path=`$CYGPATH -u "$windows_path"`
58568    new_path="$unix_path"
58569  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58570    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58571    new_path="$unix_path"
58572  fi
58573
58574  if test "x$path" != "x$new_path"; then
58575    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58576    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58577$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58578  fi
58579
58580  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58581  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58582
58583    else
58584      # We're on a unix platform. Hooray! :)
58585      path="$POTENTIAL_FREETYPE_LIB_PATH"
58586      has_space=`$ECHO "$path" | $GREP " "`
58587      if test "x$has_space" != x; then
58588        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58589$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58590        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58591      fi
58592
58593      # Use eval to expand a potential ~
58594      eval path="$path"
58595      if test ! -f "$path" && test ! -d "$path"; then
58596        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58597      fi
58598
58599      if test -d "$path"; then
58600        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58601      else
58602        dir="`$DIRNAME "$path"`"
58603        base="`$BASENAME "$path"`"
58604        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58605      fi
58606    fi
58607  fi
58608
58609
58610    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58611    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58612$as_echo_n "checking for freetype includes... " >&6; }
58613    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58614$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58615    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58616    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58617$as_echo_n "checking for freetype libraries... " >&6; }
58618    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58619$as_echo "$FREETYPE_LIB_PATH" >&6; }
58620  fi
58621
58622            else
58623
58624  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58625  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
58626  METHOD="well-known location"
58627
58628  # Let's start with an optimistic view of the world :-)
58629  FOUND_FREETYPE=yes
58630
58631  # First look for the canonical freetype main include file ft2build.h.
58632  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58633    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58634    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58635    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58636      # Fail.
58637      FOUND_FREETYPE=no
58638    fi
58639  fi
58640
58641  if test "x$FOUND_FREETYPE" = xyes; then
58642    # Include file found, let's continue the sanity check.
58643    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58644$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58645
58646    # Reset to default value
58647    FREETYPE_BASE_NAME=freetype
58648    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58649    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58650      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58651          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58652        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58653        # for the .6 version explicitly.
58654        FREETYPE_BASE_NAME=freetype.6
58655        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58656        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58657$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58658      else
58659        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58660$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58661        FOUND_FREETYPE=no
58662      fi
58663    else
58664      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58665        # On Windows, we will need both .lib and .dll file.
58666        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58667          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58668$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58669          FOUND_FREETYPE=no
58670        fi
58671      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58672          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58673        # Found lib in isa dir, use that instead.
58674        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58675        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58676$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58677      fi
58678    fi
58679  fi
58680
58681  if test "x$FOUND_FREETYPE" = xyes; then
58682
58683  # Only process if variable expands to non-empty
58684
58685  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58686    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58687
58688  # Input might be given as Windows format, start by converting to
58689  # unix format.
58690  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58691  new_path=`$CYGPATH -u "$path"`
58692
58693  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58694  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58695  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58696  # "foo.exe" is OK but "foo" is an error.
58697  #
58698  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58699  # It is also a way to make sure we got the proper file name for the real test later on.
58700  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58701  if test "x$test_shortpath" = x; then
58702    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58703$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58704    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58705  fi
58706
58707  # Call helper function which possibly converts this using DOS-style short mode.
58708  # If so, the updated path is stored in $new_path.
58709
58710  input_path="$new_path"
58711  # Check if we need to convert this using DOS-style short mode. If the path
58712  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58713  # take no chances and rewrite it.
58714  # Note: m4 eats our [], so we need to use [ and ] instead.
58715  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58716  if test "x$has_forbidden_chars" != x; then
58717    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58718    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58719    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58720    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58721      # Going to short mode and back again did indeed matter. Since short mode is
58722      # case insensitive, let's make it lowercase to improve readability.
58723      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58724      # Now convert it back to Unix-style (cygpath)
58725      input_path=`$CYGPATH -u "$shortmode_path"`
58726      new_path="$input_path"
58727    fi
58728  fi
58729
58730  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58731  if test "x$test_cygdrive_prefix" = x; then
58732    # As a simple fix, exclude /usr/bin since it's not a real path.
58733    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58734      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58735      # a path prefixed by /cygdrive for fixpath to work.
58736      new_path="$CYGWIN_ROOT_PATH$input_path"
58737    fi
58738  fi
58739
58740
58741  if test "x$path" != "x$new_path"; then
58742    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58743    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58744$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58745  fi
58746
58747    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58748
58749  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58750  has_colon=`$ECHO $path | $GREP ^.:`
58751  new_path="$path"
58752  if test "x$has_colon" = x; then
58753    # Not in mixed or Windows style, start by that.
58754    new_path=`cmd //c echo $path`
58755  fi
58756
58757
58758  input_path="$new_path"
58759  # Check if we need to convert this using DOS-style short mode. If the path
58760  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58761  # take no chances and rewrite it.
58762  # Note: m4 eats our [], so we need to use [ and ] instead.
58763  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58764  if test "x$has_forbidden_chars" != x; then
58765    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58766    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58767  fi
58768
58769
58770  windows_path="$new_path"
58771  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58772    unix_path=`$CYGPATH -u "$windows_path"`
58773    new_path="$unix_path"
58774  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58775    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58776    new_path="$unix_path"
58777  fi
58778
58779  if test "x$path" != "x$new_path"; then
58780    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58781    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58782$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58783  fi
58784
58785  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58786  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58787
58788    else
58789      # We're on a unix platform. Hooray! :)
58790      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58791      has_space=`$ECHO "$path" | $GREP " "`
58792      if test "x$has_space" != x; then
58793        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58794$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58795        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58796      fi
58797
58798      # Use eval to expand a potential ~
58799      eval path="$path"
58800      if test ! -f "$path" && test ! -d "$path"; then
58801        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58802      fi
58803
58804      if test -d "$path"; then
58805        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58806      else
58807        dir="`$DIRNAME "$path"`"
58808        base="`$BASENAME "$path"`"
58809        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58810      fi
58811    fi
58812  fi
58813
58814
58815  # Only process if variable expands to non-empty
58816
58817  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58818    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58819
58820  # Input might be given as Windows format, start by converting to
58821  # unix format.
58822  path="$POTENTIAL_FREETYPE_LIB_PATH"
58823  new_path=`$CYGPATH -u "$path"`
58824
58825  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58826  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58827  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58828  # "foo.exe" is OK but "foo" is an error.
58829  #
58830  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58831  # It is also a way to make sure we got the proper file name for the real test later on.
58832  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58833  if test "x$test_shortpath" = x; then
58834    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58835$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58836    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58837  fi
58838
58839  # Call helper function which possibly converts this using DOS-style short mode.
58840  # If so, the updated path is stored in $new_path.
58841
58842  input_path="$new_path"
58843  # Check if we need to convert this using DOS-style short mode. If the path
58844  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58845  # take no chances and rewrite it.
58846  # Note: m4 eats our [], so we need to use [ and ] instead.
58847  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58848  if test "x$has_forbidden_chars" != x; then
58849    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58850    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58851    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58852    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58853      # Going to short mode and back again did indeed matter. Since short mode is
58854      # case insensitive, let's make it lowercase to improve readability.
58855      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58856      # Now convert it back to Unix-style (cygpath)
58857      input_path=`$CYGPATH -u "$shortmode_path"`
58858      new_path="$input_path"
58859    fi
58860  fi
58861
58862  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58863  if test "x$test_cygdrive_prefix" = x; then
58864    # As a simple fix, exclude /usr/bin since it's not a real path.
58865    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58866      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58867      # a path prefixed by /cygdrive for fixpath to work.
58868      new_path="$CYGWIN_ROOT_PATH$input_path"
58869    fi
58870  fi
58871
58872
58873  if test "x$path" != "x$new_path"; then
58874    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58875    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58876$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58877  fi
58878
58879    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58880
58881  path="$POTENTIAL_FREETYPE_LIB_PATH"
58882  has_colon=`$ECHO $path | $GREP ^.:`
58883  new_path="$path"
58884  if test "x$has_colon" = x; then
58885    # Not in mixed or Windows style, start by that.
58886    new_path=`cmd //c echo $path`
58887  fi
58888
58889
58890  input_path="$new_path"
58891  # Check if we need to convert this using DOS-style short mode. If the path
58892  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58893  # take no chances and rewrite it.
58894  # Note: m4 eats our [], so we need to use [ and ] instead.
58895  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58896  if test "x$has_forbidden_chars" != x; then
58897    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58898    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58899  fi
58900
58901
58902  windows_path="$new_path"
58903  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58904    unix_path=`$CYGPATH -u "$windows_path"`
58905    new_path="$unix_path"
58906  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58907    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58908    new_path="$unix_path"
58909  fi
58910
58911  if test "x$path" != "x$new_path"; then
58912    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58913    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58914$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58915  fi
58916
58917  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58918  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58919
58920    else
58921      # We're on a unix platform. Hooray! :)
58922      path="$POTENTIAL_FREETYPE_LIB_PATH"
58923      has_space=`$ECHO "$path" | $GREP " "`
58924      if test "x$has_space" != x; then
58925        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58926$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58927        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58928      fi
58929
58930      # Use eval to expand a potential ~
58931      eval path="$path"
58932      if test ! -f "$path" && test ! -d "$path"; then
58933        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58934      fi
58935
58936      if test -d "$path"; then
58937        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58938      else
58939        dir="`$DIRNAME "$path"`"
58940        base="`$BASENAME "$path"`"
58941        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58942      fi
58943    fi
58944  fi
58945
58946
58947    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58948    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58949$as_echo_n "checking for freetype includes... " >&6; }
58950    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58951$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58952    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58953    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58954$as_echo_n "checking for freetype libraries... " >&6; }
58955    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58956$as_echo "$FREETYPE_LIB_PATH" >&6; }
58957  fi
58958
58959            fi
58960            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
58961                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
58962              # Source is available, as a last resort try to build freetype in default location
58963
58964  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
58965  BUILD_FREETYPE=yes
58966
58967  # Check if the freetype sources are acessible..
58968  if ! test -d $FREETYPE_SRC_PATH; then
58969    { $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
58970$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
58971    BUILD_FREETYPE=no
58972  fi
58973  # ..and contain a vc2010 project file
58974  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
58975  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
58976    { $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
58977$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
58978    BUILD_FREETYPE=no
58979  fi
58980  # Now check if configure found a version of 'msbuild.exe'
58981  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
58982    { $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
58983$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;}
58984    BUILD_FREETYPE=no
58985  fi
58986
58987  # Ready to go..
58988  if test "x$BUILD_FREETYPE" = xyes; then
58989    # msbuild requires trailing slashes for output directories
58990    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
58991    freetype_lib_path_unix="$freetype_lib_path"
58992    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
58993
58994  unix_path="$vcxproj_path"
58995  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58996    windows_path=`$CYGPATH -m "$unix_path"`
58997    vcxproj_path="$windows_path"
58998  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58999    windows_path=`cmd //c echo $unix_path`
59000    vcxproj_path="$windows_path"
59001  fi
59002
59003
59004  unix_path="$freetype_lib_path"
59005  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59006    windows_path=`$CYGPATH -m "$unix_path"`
59007    freetype_lib_path="$windows_path"
59008  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59009    windows_path=`cmd //c echo $unix_path`
59010    freetype_lib_path="$windows_path"
59011  fi
59012
59013
59014  unix_path="$freetype_obj_path"
59015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59016    windows_path=`$CYGPATH -m "$unix_path"`
59017    freetype_obj_path="$windows_path"
59018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59019    windows_path=`cmd //c echo $unix_path`
59020    freetype_obj_path="$windows_path"
59021  fi
59022
59023    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59024      freetype_platform=x64
59025    else
59026      freetype_platform=win32
59027    fi
59028
59029    # The original freetype project file is for VS 2010 (i.e. 'v100'),
59030    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
59031    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
59032    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
59033    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
59034$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
59035
59036    # First we try to build the freetype.dll
59037    $ECHO -e "@echo off\n"\
59038        "$MSBUILD $vcxproj_path "\
59039        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59040        "/p:Configuration=\"Release Multithreaded\" "\
59041        "/p:Platform=$freetype_platform "\
59042        "/p:ConfigurationType=DynamicLibrary "\
59043        "/p:TargetName=freetype "\
59044        "/p:OutDir=\"$freetype_lib_path\" "\
59045        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
59046    cmd /c freetype.bat
59047
59048    if test -s "$freetype_lib_path_unix/freetype.dll"; then
59049      # If that succeeds we also build freetype.lib
59050      $ECHO -e "@echo off\n"\
59051          "$MSBUILD $vcxproj_path "\
59052          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59053          "/p:Configuration=\"Release Multithreaded\" "\
59054          "/p:Platform=$freetype_platform "\
59055          "/p:ConfigurationType=StaticLibrary "\
59056          "/p:TargetName=freetype "\
59057          "/p:OutDir=\"$freetype_lib_path\" "\
59058          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
59059      cmd /c freetype.bat
59060
59061      if test -s "$freetype_lib_path_unix/freetype.lib"; then
59062        # Once we build both, lib and dll, set freetype lib and include path appropriately
59063        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
59064        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
59065        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
59066$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
59067      else
59068        BUILD_FREETYPE=no
59069      fi
59070    else
59071      BUILD_FREETYPE=no
59072    fi
59073  fi
59074
59075              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59076
59077  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59078  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59079  METHOD="well-known location"
59080
59081  # Let's start with an optimistic view of the world :-)
59082  FOUND_FREETYPE=yes
59083
59084  # First look for the canonical freetype main include file ft2build.h.
59085  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59086    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59087    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59088    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59089      # Fail.
59090      FOUND_FREETYPE=no
59091    fi
59092  fi
59093
59094  if test "x$FOUND_FREETYPE" = xyes; then
59095    # Include file found, let's continue the sanity check.
59096    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59097$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59098
59099    # Reset to default value
59100    FREETYPE_BASE_NAME=freetype
59101    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59102    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59103      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59104          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59105        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59106        # for the .6 version explicitly.
59107        FREETYPE_BASE_NAME=freetype.6
59108        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59109        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59110$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59111      else
59112        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59113$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59114        FOUND_FREETYPE=no
59115      fi
59116    else
59117      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59118        # On Windows, we will need both .lib and .dll file.
59119        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59120          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59121$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59122          FOUND_FREETYPE=no
59123        fi
59124      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59125          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59126        # Found lib in isa dir, use that instead.
59127        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59128        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59129$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59130      fi
59131    fi
59132  fi
59133
59134  if test "x$FOUND_FREETYPE" = xyes; then
59135
59136  # Only process if variable expands to non-empty
59137
59138  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59139    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59140
59141  # Input might be given as Windows format, start by converting to
59142  # unix format.
59143  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59144  new_path=`$CYGPATH -u "$path"`
59145
59146  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59147  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59148  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59149  # "foo.exe" is OK but "foo" is an error.
59150  #
59151  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59152  # It is also a way to make sure we got the proper file name for the real test later on.
59153  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59154  if test "x$test_shortpath" = x; then
59155    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59156$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59157    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59158  fi
59159
59160  # Call helper function which possibly converts this using DOS-style short mode.
59161  # If so, the updated path is stored in $new_path.
59162
59163  input_path="$new_path"
59164  # Check if we need to convert this using DOS-style short mode. If the path
59165  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59166  # take no chances and rewrite it.
59167  # Note: m4 eats our [], so we need to use [ and ] instead.
59168  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59169  if test "x$has_forbidden_chars" != x; then
59170    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59171    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59172    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59173    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59174      # Going to short mode and back again did indeed matter. Since short mode is
59175      # case insensitive, let's make it lowercase to improve readability.
59176      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59177      # Now convert it back to Unix-style (cygpath)
59178      input_path=`$CYGPATH -u "$shortmode_path"`
59179      new_path="$input_path"
59180    fi
59181  fi
59182
59183  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59184  if test "x$test_cygdrive_prefix" = x; then
59185    # As a simple fix, exclude /usr/bin since it's not a real path.
59186    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59187      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59188      # a path prefixed by /cygdrive for fixpath to work.
59189      new_path="$CYGWIN_ROOT_PATH$input_path"
59190    fi
59191  fi
59192
59193
59194  if test "x$path" != "x$new_path"; then
59195    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59196    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59197$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59198  fi
59199
59200    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59201
59202  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59203  has_colon=`$ECHO $path | $GREP ^.:`
59204  new_path="$path"
59205  if test "x$has_colon" = x; then
59206    # Not in mixed or Windows style, start by that.
59207    new_path=`cmd //c echo $path`
59208  fi
59209
59210
59211  input_path="$new_path"
59212  # Check if we need to convert this using DOS-style short mode. If the path
59213  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59214  # take no chances and rewrite it.
59215  # Note: m4 eats our [], so we need to use [ and ] instead.
59216  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59217  if test "x$has_forbidden_chars" != x; then
59218    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59219    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59220  fi
59221
59222
59223  windows_path="$new_path"
59224  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59225    unix_path=`$CYGPATH -u "$windows_path"`
59226    new_path="$unix_path"
59227  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59228    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59229    new_path="$unix_path"
59230  fi
59231
59232  if test "x$path" != "x$new_path"; then
59233    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59234    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59235$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59236  fi
59237
59238  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59239  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59240
59241    else
59242      # We're on a unix platform. Hooray! :)
59243      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59244      has_space=`$ECHO "$path" | $GREP " "`
59245      if test "x$has_space" != x; then
59246        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59247$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59248        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59249      fi
59250
59251      # Use eval to expand a potential ~
59252      eval path="$path"
59253      if test ! -f "$path" && test ! -d "$path"; then
59254        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59255      fi
59256
59257      if test -d "$path"; then
59258        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59259      else
59260        dir="`$DIRNAME "$path"`"
59261        base="`$BASENAME "$path"`"
59262        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59263      fi
59264    fi
59265  fi
59266
59267
59268  # Only process if variable expands to non-empty
59269
59270  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59271    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59272
59273  # Input might be given as Windows format, start by converting to
59274  # unix format.
59275  path="$POTENTIAL_FREETYPE_LIB_PATH"
59276  new_path=`$CYGPATH -u "$path"`
59277
59278  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59279  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59280  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59281  # "foo.exe" is OK but "foo" is an error.
59282  #
59283  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59284  # It is also a way to make sure we got the proper file name for the real test later on.
59285  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59286  if test "x$test_shortpath" = x; then
59287    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59288$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59289    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59290  fi
59291
59292  # Call helper function which possibly converts this using DOS-style short mode.
59293  # If so, the updated path is stored in $new_path.
59294
59295  input_path="$new_path"
59296  # Check if we need to convert this using DOS-style short mode. If the path
59297  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59298  # take no chances and rewrite it.
59299  # Note: m4 eats our [], so we need to use [ and ] instead.
59300  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59301  if test "x$has_forbidden_chars" != x; then
59302    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59303    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59304    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59305    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59306      # Going to short mode and back again did indeed matter. Since short mode is
59307      # case insensitive, let's make it lowercase to improve readability.
59308      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59309      # Now convert it back to Unix-style (cygpath)
59310      input_path=`$CYGPATH -u "$shortmode_path"`
59311      new_path="$input_path"
59312    fi
59313  fi
59314
59315  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59316  if test "x$test_cygdrive_prefix" = x; then
59317    # As a simple fix, exclude /usr/bin since it's not a real path.
59318    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59319      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59320      # a path prefixed by /cygdrive for fixpath to work.
59321      new_path="$CYGWIN_ROOT_PATH$input_path"
59322    fi
59323  fi
59324
59325
59326  if test "x$path" != "x$new_path"; then
59327    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59328    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59329$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59330  fi
59331
59332    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59333
59334  path="$POTENTIAL_FREETYPE_LIB_PATH"
59335  has_colon=`$ECHO $path | $GREP ^.:`
59336  new_path="$path"
59337  if test "x$has_colon" = x; then
59338    # Not in mixed or Windows style, start by that.
59339    new_path=`cmd //c echo $path`
59340  fi
59341
59342
59343  input_path="$new_path"
59344  # Check if we need to convert this using DOS-style short mode. If the path
59345  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59346  # take no chances and rewrite it.
59347  # Note: m4 eats our [], so we need to use [ and ] instead.
59348  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59349  if test "x$has_forbidden_chars" != x; then
59350    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59351    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59352  fi
59353
59354
59355  windows_path="$new_path"
59356  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59357    unix_path=`$CYGPATH -u "$windows_path"`
59358    new_path="$unix_path"
59359  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59360    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59361    new_path="$unix_path"
59362  fi
59363
59364  if test "x$path" != "x$new_path"; then
59365    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59366    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59367$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59368  fi
59369
59370  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59371  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59372
59373    else
59374      # We're on a unix platform. Hooray! :)
59375      path="$POTENTIAL_FREETYPE_LIB_PATH"
59376      has_space=`$ECHO "$path" | $GREP " "`
59377      if test "x$has_space" != x; then
59378        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59379$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59380        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59381      fi
59382
59383      # Use eval to expand a potential ~
59384      eval path="$path"
59385      if test ! -f "$path" && test ! -d "$path"; then
59386        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59387      fi
59388
59389      if test -d "$path"; then
59390        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59391      else
59392        dir="`$DIRNAME "$path"`"
59393        base="`$BASENAME "$path"`"
59394        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59395      fi
59396    fi
59397  fi
59398
59399
59400    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59401    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59402$as_echo_n "checking for freetype includes... " >&6; }
59403    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59404$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59405    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59406    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59407$as_echo_n "checking for freetype libraries... " >&6; }
59408    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59409$as_echo "$FREETYPE_LIB_PATH" >&6; }
59410  fi
59411
59412              else
59413
59414  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59415  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59416  METHOD="well-known location"
59417
59418  # Let's start with an optimistic view of the world :-)
59419  FOUND_FREETYPE=yes
59420
59421  # First look for the canonical freetype main include file ft2build.h.
59422  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59423    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59424    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59425    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59426      # Fail.
59427      FOUND_FREETYPE=no
59428    fi
59429  fi
59430
59431  if test "x$FOUND_FREETYPE" = xyes; then
59432    # Include file found, let's continue the sanity check.
59433    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59434$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59435
59436    # Reset to default value
59437    FREETYPE_BASE_NAME=freetype
59438    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59439    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59440      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59441          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59442        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59443        # for the .6 version explicitly.
59444        FREETYPE_BASE_NAME=freetype.6
59445        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59446        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59447$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59448      else
59449        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59450$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59451        FOUND_FREETYPE=no
59452      fi
59453    else
59454      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59455        # On Windows, we will need both .lib and .dll file.
59456        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59457          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59458$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59459          FOUND_FREETYPE=no
59460        fi
59461      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59462          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59463        # Found lib in isa dir, use that instead.
59464        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59465        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59466$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59467      fi
59468    fi
59469  fi
59470
59471  if test "x$FOUND_FREETYPE" = xyes; then
59472
59473  # Only process if variable expands to non-empty
59474
59475  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59476    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59477
59478  # Input might be given as Windows format, start by converting to
59479  # unix format.
59480  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59481  new_path=`$CYGPATH -u "$path"`
59482
59483  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59484  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59485  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59486  # "foo.exe" is OK but "foo" is an error.
59487  #
59488  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59489  # It is also a way to make sure we got the proper file name for the real test later on.
59490  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59491  if test "x$test_shortpath" = x; then
59492    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59493$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59494    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59495  fi
59496
59497  # Call helper function which possibly converts this using DOS-style short mode.
59498  # If so, the updated path is stored in $new_path.
59499
59500  input_path="$new_path"
59501  # Check if we need to convert this using DOS-style short mode. If the path
59502  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59503  # take no chances and rewrite it.
59504  # Note: m4 eats our [], so we need to use [ and ] instead.
59505  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59506  if test "x$has_forbidden_chars" != x; then
59507    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59508    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59509    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59510    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59511      # Going to short mode and back again did indeed matter. Since short mode is
59512      # case insensitive, let's make it lowercase to improve readability.
59513      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59514      # Now convert it back to Unix-style (cygpath)
59515      input_path=`$CYGPATH -u "$shortmode_path"`
59516      new_path="$input_path"
59517    fi
59518  fi
59519
59520  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59521  if test "x$test_cygdrive_prefix" = x; then
59522    # As a simple fix, exclude /usr/bin since it's not a real path.
59523    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59524      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59525      # a path prefixed by /cygdrive for fixpath to work.
59526      new_path="$CYGWIN_ROOT_PATH$input_path"
59527    fi
59528  fi
59529
59530
59531  if test "x$path" != "x$new_path"; then
59532    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59533    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59534$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59535  fi
59536
59537    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59538
59539  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59540  has_colon=`$ECHO $path | $GREP ^.:`
59541  new_path="$path"
59542  if test "x$has_colon" = x; then
59543    # Not in mixed or Windows style, start by that.
59544    new_path=`cmd //c echo $path`
59545  fi
59546
59547
59548  input_path="$new_path"
59549  # Check if we need to convert this using DOS-style short mode. If the path
59550  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59551  # take no chances and rewrite it.
59552  # Note: m4 eats our [], so we need to use [ and ] instead.
59553  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59554  if test "x$has_forbidden_chars" != x; then
59555    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59556    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59557  fi
59558
59559
59560  windows_path="$new_path"
59561  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59562    unix_path=`$CYGPATH -u "$windows_path"`
59563    new_path="$unix_path"
59564  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59565    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59566    new_path="$unix_path"
59567  fi
59568
59569  if test "x$path" != "x$new_path"; then
59570    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59571    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59572$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59573  fi
59574
59575  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59576  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59577
59578    else
59579      # We're on a unix platform. Hooray! :)
59580      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59581      has_space=`$ECHO "$path" | $GREP " "`
59582      if test "x$has_space" != x; then
59583        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59584$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59585        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59586      fi
59587
59588      # Use eval to expand a potential ~
59589      eval path="$path"
59590      if test ! -f "$path" && test ! -d "$path"; then
59591        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59592      fi
59593
59594      if test -d "$path"; then
59595        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59596      else
59597        dir="`$DIRNAME "$path"`"
59598        base="`$BASENAME "$path"`"
59599        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59600      fi
59601    fi
59602  fi
59603
59604
59605  # Only process if variable expands to non-empty
59606
59607  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59608    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59609
59610  # Input might be given as Windows format, start by converting to
59611  # unix format.
59612  path="$POTENTIAL_FREETYPE_LIB_PATH"
59613  new_path=`$CYGPATH -u "$path"`
59614
59615  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59616  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59617  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59618  # "foo.exe" is OK but "foo" is an error.
59619  #
59620  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59621  # It is also a way to make sure we got the proper file name for the real test later on.
59622  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59623  if test "x$test_shortpath" = x; then
59624    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59625$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59626    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59627  fi
59628
59629  # Call helper function which possibly converts this using DOS-style short mode.
59630  # If so, the updated path is stored in $new_path.
59631
59632  input_path="$new_path"
59633  # Check if we need to convert this using DOS-style short mode. If the path
59634  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59635  # take no chances and rewrite it.
59636  # Note: m4 eats our [], so we need to use [ and ] instead.
59637  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59638  if test "x$has_forbidden_chars" != x; then
59639    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59640    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59641    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59642    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59643      # Going to short mode and back again did indeed matter. Since short mode is
59644      # case insensitive, let's make it lowercase to improve readability.
59645      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59646      # Now convert it back to Unix-style (cygpath)
59647      input_path=`$CYGPATH -u "$shortmode_path"`
59648      new_path="$input_path"
59649    fi
59650  fi
59651
59652  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59653  if test "x$test_cygdrive_prefix" = x; then
59654    # As a simple fix, exclude /usr/bin since it's not a real path.
59655    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59656      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59657      # a path prefixed by /cygdrive for fixpath to work.
59658      new_path="$CYGWIN_ROOT_PATH$input_path"
59659    fi
59660  fi
59661
59662
59663  if test "x$path" != "x$new_path"; then
59664    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59665    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59666$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59667  fi
59668
59669    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59670
59671  path="$POTENTIAL_FREETYPE_LIB_PATH"
59672  has_colon=`$ECHO $path | $GREP ^.:`
59673  new_path="$path"
59674  if test "x$has_colon" = x; then
59675    # Not in mixed or Windows style, start by that.
59676    new_path=`cmd //c echo $path`
59677  fi
59678
59679
59680  input_path="$new_path"
59681  # Check if we need to convert this using DOS-style short mode. If the path
59682  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59683  # take no chances and rewrite it.
59684  # Note: m4 eats our [], so we need to use [ and ] instead.
59685  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59686  if test "x$has_forbidden_chars" != x; then
59687    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59688    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59689  fi
59690
59691
59692  windows_path="$new_path"
59693  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59694    unix_path=`$CYGPATH -u "$windows_path"`
59695    new_path="$unix_path"
59696  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59697    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59698    new_path="$unix_path"
59699  fi
59700
59701  if test "x$path" != "x$new_path"; then
59702    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59703    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59704$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59705  fi
59706
59707  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59708  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59709
59710    else
59711      # We're on a unix platform. Hooray! :)
59712      path="$POTENTIAL_FREETYPE_LIB_PATH"
59713      has_space=`$ECHO "$path" | $GREP " "`
59714      if test "x$has_space" != x; then
59715        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59716$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59717        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59718      fi
59719
59720      # Use eval to expand a potential ~
59721      eval path="$path"
59722      if test ! -f "$path" && test ! -d "$path"; then
59723        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59724      fi
59725
59726      if test -d "$path"; then
59727        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59728      else
59729        dir="`$DIRNAME "$path"`"
59730        base="`$BASENAME "$path"`"
59731        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59732      fi
59733    fi
59734  fi
59735
59736
59737    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59738    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59739$as_echo_n "checking for freetype includes... " >&6; }
59740    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59741$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59742    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59743    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59744$as_echo_n "checking for freetype libraries... " >&6; }
59745    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59746$as_echo "$FREETYPE_LIB_PATH" >&6; }
59747  fi
59748
59749              fi
59750            fi
59751          fi
59752        else
59753          FREETYPE_BASE_DIR="$SYSROOT/usr"
59754
59755  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59756  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
59757  METHOD="well-known location"
59758
59759  # Let's start with an optimistic view of the world :-)
59760  FOUND_FREETYPE=yes
59761
59762  # First look for the canonical freetype main include file ft2build.h.
59763  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59764    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59765    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59766    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59767      # Fail.
59768      FOUND_FREETYPE=no
59769    fi
59770  fi
59771
59772  if test "x$FOUND_FREETYPE" = xyes; then
59773    # Include file found, let's continue the sanity check.
59774    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59775$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59776
59777    # Reset to default value
59778    FREETYPE_BASE_NAME=freetype
59779    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59780    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59781      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59782          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59783        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59784        # for the .6 version explicitly.
59785        FREETYPE_BASE_NAME=freetype.6
59786        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59787        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59788$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59789      else
59790        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59791$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59792        FOUND_FREETYPE=no
59793      fi
59794    else
59795      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59796        # On Windows, we will need both .lib and .dll file.
59797        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59798          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59799$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59800          FOUND_FREETYPE=no
59801        fi
59802      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59803          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59804        # Found lib in isa dir, use that instead.
59805        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59806        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59807$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59808      fi
59809    fi
59810  fi
59811
59812  if test "x$FOUND_FREETYPE" = xyes; then
59813
59814  # Only process if variable expands to non-empty
59815
59816  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59817    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59818
59819  # Input might be given as Windows format, start by converting to
59820  # unix format.
59821  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59822  new_path=`$CYGPATH -u "$path"`
59823
59824  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59825  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59826  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59827  # "foo.exe" is OK but "foo" is an error.
59828  #
59829  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59830  # It is also a way to make sure we got the proper file name for the real test later on.
59831  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59832  if test "x$test_shortpath" = x; then
59833    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59834$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59835    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59836  fi
59837
59838  # Call helper function which possibly converts this using DOS-style short mode.
59839  # If so, the updated path is stored in $new_path.
59840
59841  input_path="$new_path"
59842  # Check if we need to convert this using DOS-style short mode. If the path
59843  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59844  # take no chances and rewrite it.
59845  # Note: m4 eats our [], so we need to use [ and ] instead.
59846  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59847  if test "x$has_forbidden_chars" != x; then
59848    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59849    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59850    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59851    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59852      # Going to short mode and back again did indeed matter. Since short mode is
59853      # case insensitive, let's make it lowercase to improve readability.
59854      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59855      # Now convert it back to Unix-style (cygpath)
59856      input_path=`$CYGPATH -u "$shortmode_path"`
59857      new_path="$input_path"
59858    fi
59859  fi
59860
59861  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59862  if test "x$test_cygdrive_prefix" = x; then
59863    # As a simple fix, exclude /usr/bin since it's not a real path.
59864    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59865      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59866      # a path prefixed by /cygdrive for fixpath to work.
59867      new_path="$CYGWIN_ROOT_PATH$input_path"
59868    fi
59869  fi
59870
59871
59872  if test "x$path" != "x$new_path"; then
59873    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59874    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59875$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59876  fi
59877
59878    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59879
59880  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59881  has_colon=`$ECHO $path | $GREP ^.:`
59882  new_path="$path"
59883  if test "x$has_colon" = x; then
59884    # Not in mixed or Windows style, start by that.
59885    new_path=`cmd //c echo $path`
59886  fi
59887
59888
59889  input_path="$new_path"
59890  # Check if we need to convert this using DOS-style short mode. If the path
59891  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59892  # take no chances and rewrite it.
59893  # Note: m4 eats our [], so we need to use [ and ] instead.
59894  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59895  if test "x$has_forbidden_chars" != x; then
59896    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59897    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59898  fi
59899
59900
59901  windows_path="$new_path"
59902  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59903    unix_path=`$CYGPATH -u "$windows_path"`
59904    new_path="$unix_path"
59905  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59906    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59907    new_path="$unix_path"
59908  fi
59909
59910  if test "x$path" != "x$new_path"; then
59911    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59912    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59913$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59914  fi
59915
59916  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59917  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59918
59919    else
59920      # We're on a unix platform. Hooray! :)
59921      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59922      has_space=`$ECHO "$path" | $GREP " "`
59923      if test "x$has_space" != x; then
59924        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59925$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59926        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59927      fi
59928
59929      # Use eval to expand a potential ~
59930      eval path="$path"
59931      if test ! -f "$path" && test ! -d "$path"; then
59932        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59933      fi
59934
59935      if test -d "$path"; then
59936        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59937      else
59938        dir="`$DIRNAME "$path"`"
59939        base="`$BASENAME "$path"`"
59940        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59941      fi
59942    fi
59943  fi
59944
59945
59946  # Only process if variable expands to non-empty
59947
59948  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59949    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59950
59951  # Input might be given as Windows format, start by converting to
59952  # unix format.
59953  path="$POTENTIAL_FREETYPE_LIB_PATH"
59954  new_path=`$CYGPATH -u "$path"`
59955
59956  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59957  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59958  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59959  # "foo.exe" is OK but "foo" is an error.
59960  #
59961  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59962  # It is also a way to make sure we got the proper file name for the real test later on.
59963  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59964  if test "x$test_shortpath" = x; then
59965    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59966$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59967    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59968  fi
59969
59970  # Call helper function which possibly converts this using DOS-style short mode.
59971  # If so, the updated path is stored in $new_path.
59972
59973  input_path="$new_path"
59974  # Check if we need to convert this using DOS-style short mode. If the path
59975  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59976  # take no chances and rewrite it.
59977  # Note: m4 eats our [], so we need to use [ and ] instead.
59978  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59979  if test "x$has_forbidden_chars" != x; then
59980    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59981    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59982    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59983    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59984      # Going to short mode and back again did indeed matter. Since short mode is
59985      # case insensitive, let's make it lowercase to improve readability.
59986      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59987      # Now convert it back to Unix-style (cygpath)
59988      input_path=`$CYGPATH -u "$shortmode_path"`
59989      new_path="$input_path"
59990    fi
59991  fi
59992
59993  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59994  if test "x$test_cygdrive_prefix" = x; then
59995    # As a simple fix, exclude /usr/bin since it's not a real path.
59996    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59997      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59998      # a path prefixed by /cygdrive for fixpath to work.
59999      new_path="$CYGWIN_ROOT_PATH$input_path"
60000    fi
60001  fi
60002
60003
60004  if test "x$path" != "x$new_path"; then
60005    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60006    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60007$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60008  fi
60009
60010    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60011
60012  path="$POTENTIAL_FREETYPE_LIB_PATH"
60013  has_colon=`$ECHO $path | $GREP ^.:`
60014  new_path="$path"
60015  if test "x$has_colon" = x; then
60016    # Not in mixed or Windows style, start by that.
60017    new_path=`cmd //c echo $path`
60018  fi
60019
60020
60021  input_path="$new_path"
60022  # Check if we need to convert this using DOS-style short mode. If the path
60023  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60024  # take no chances and rewrite it.
60025  # Note: m4 eats our [], so we need to use [ and ] instead.
60026  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60027  if test "x$has_forbidden_chars" != x; then
60028    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60029    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60030  fi
60031
60032
60033  windows_path="$new_path"
60034  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60035    unix_path=`$CYGPATH -u "$windows_path"`
60036    new_path="$unix_path"
60037  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60038    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60039    new_path="$unix_path"
60040  fi
60041
60042  if test "x$path" != "x$new_path"; then
60043    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60044    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60045$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60046  fi
60047
60048  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60049  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60050
60051    else
60052      # We're on a unix platform. Hooray! :)
60053      path="$POTENTIAL_FREETYPE_LIB_PATH"
60054      has_space=`$ECHO "$path" | $GREP " "`
60055      if test "x$has_space" != x; then
60056        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60057$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60058        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60059      fi
60060
60061      # Use eval to expand a potential ~
60062      eval path="$path"
60063      if test ! -f "$path" && test ! -d "$path"; then
60064        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60065      fi
60066
60067      if test -d "$path"; then
60068        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60069      else
60070        dir="`$DIRNAME "$path"`"
60071        base="`$BASENAME "$path"`"
60072        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60073      fi
60074    fi
60075  fi
60076
60077
60078    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60079    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60080$as_echo_n "checking for freetype includes... " >&6; }
60081    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60082$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60083    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60084    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60085$as_echo_n "checking for freetype libraries... " >&6; }
60086    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60087$as_echo "$FREETYPE_LIB_PATH" >&6; }
60088  fi
60089
60090
60091          if test "x$FOUND_FREETYPE" != xyes; then
60092            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
60093
60094  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60095  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60096  METHOD="well-known location"
60097
60098  # Let's start with an optimistic view of the world :-)
60099  FOUND_FREETYPE=yes
60100
60101  # First look for the canonical freetype main include file ft2build.h.
60102  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60103    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60104    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60105    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60106      # Fail.
60107      FOUND_FREETYPE=no
60108    fi
60109  fi
60110
60111  if test "x$FOUND_FREETYPE" = xyes; then
60112    # Include file found, let's continue the sanity check.
60113    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60114$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60115
60116    # Reset to default value
60117    FREETYPE_BASE_NAME=freetype
60118    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60119    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60120      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60121          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60122        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60123        # for the .6 version explicitly.
60124        FREETYPE_BASE_NAME=freetype.6
60125        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60126        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60127$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60128      else
60129        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60130$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60131        FOUND_FREETYPE=no
60132      fi
60133    else
60134      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60135        # On Windows, we will need both .lib and .dll file.
60136        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60137          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60138$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60139          FOUND_FREETYPE=no
60140        fi
60141      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60142          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60143        # Found lib in isa dir, use that instead.
60144        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60145        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60146$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60147      fi
60148    fi
60149  fi
60150
60151  if test "x$FOUND_FREETYPE" = xyes; then
60152
60153  # Only process if variable expands to non-empty
60154
60155  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60156    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60157
60158  # Input might be given as Windows format, start by converting to
60159  # unix format.
60160  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60161  new_path=`$CYGPATH -u "$path"`
60162
60163  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60164  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60165  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60166  # "foo.exe" is OK but "foo" is an error.
60167  #
60168  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60169  # It is also a way to make sure we got the proper file name for the real test later on.
60170  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60171  if test "x$test_shortpath" = x; then
60172    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60173$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60174    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60175  fi
60176
60177  # Call helper function which possibly converts this using DOS-style short mode.
60178  # If so, the updated path is stored in $new_path.
60179
60180  input_path="$new_path"
60181  # Check if we need to convert this using DOS-style short mode. If the path
60182  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60183  # take no chances and rewrite it.
60184  # Note: m4 eats our [], so we need to use [ and ] instead.
60185  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60186  if test "x$has_forbidden_chars" != x; then
60187    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60188    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60189    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60190    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60191      # Going to short mode and back again did indeed matter. Since short mode is
60192      # case insensitive, let's make it lowercase to improve readability.
60193      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60194      # Now convert it back to Unix-style (cygpath)
60195      input_path=`$CYGPATH -u "$shortmode_path"`
60196      new_path="$input_path"
60197    fi
60198  fi
60199
60200  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60201  if test "x$test_cygdrive_prefix" = x; then
60202    # As a simple fix, exclude /usr/bin since it's not a real path.
60203    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60204      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60205      # a path prefixed by /cygdrive for fixpath to work.
60206      new_path="$CYGWIN_ROOT_PATH$input_path"
60207    fi
60208  fi
60209
60210
60211  if test "x$path" != "x$new_path"; then
60212    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60213    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60214$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60215  fi
60216
60217    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60218
60219  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60220  has_colon=`$ECHO $path | $GREP ^.:`
60221  new_path="$path"
60222  if test "x$has_colon" = x; then
60223    # Not in mixed or Windows style, start by that.
60224    new_path=`cmd //c echo $path`
60225  fi
60226
60227
60228  input_path="$new_path"
60229  # Check if we need to convert this using DOS-style short mode. If the path
60230  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60231  # take no chances and rewrite it.
60232  # Note: m4 eats our [], so we need to use [ and ] instead.
60233  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60234  if test "x$has_forbidden_chars" != x; then
60235    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60236    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60237  fi
60238
60239
60240  windows_path="$new_path"
60241  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60242    unix_path=`$CYGPATH -u "$windows_path"`
60243    new_path="$unix_path"
60244  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60245    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60246    new_path="$unix_path"
60247  fi
60248
60249  if test "x$path" != "x$new_path"; then
60250    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60251    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60252$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60253  fi
60254
60255  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60256  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60257
60258    else
60259      # We're on a unix platform. Hooray! :)
60260      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60261      has_space=`$ECHO "$path" | $GREP " "`
60262      if test "x$has_space" != x; then
60263        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60264$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60265        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60266      fi
60267
60268      # Use eval to expand a potential ~
60269      eval path="$path"
60270      if test ! -f "$path" && test ! -d "$path"; then
60271        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60272      fi
60273
60274      if test -d "$path"; then
60275        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60276      else
60277        dir="`$DIRNAME "$path"`"
60278        base="`$BASENAME "$path"`"
60279        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60280      fi
60281    fi
60282  fi
60283
60284
60285  # Only process if variable expands to non-empty
60286
60287  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60288    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60289
60290  # Input might be given as Windows format, start by converting to
60291  # unix format.
60292  path="$POTENTIAL_FREETYPE_LIB_PATH"
60293  new_path=`$CYGPATH -u "$path"`
60294
60295  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60296  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60297  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60298  # "foo.exe" is OK but "foo" is an error.
60299  #
60300  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60301  # It is also a way to make sure we got the proper file name for the real test later on.
60302  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60303  if test "x$test_shortpath" = x; then
60304    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60305$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60306    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60307  fi
60308
60309  # Call helper function which possibly converts this using DOS-style short mode.
60310  # If so, the updated path is stored in $new_path.
60311
60312  input_path="$new_path"
60313  # Check if we need to convert this using DOS-style short mode. If the path
60314  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60315  # take no chances and rewrite it.
60316  # Note: m4 eats our [], so we need to use [ and ] instead.
60317  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60318  if test "x$has_forbidden_chars" != x; then
60319    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60320    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60321    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60322    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60323      # Going to short mode and back again did indeed matter. Since short mode is
60324      # case insensitive, let's make it lowercase to improve readability.
60325      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60326      # Now convert it back to Unix-style (cygpath)
60327      input_path=`$CYGPATH -u "$shortmode_path"`
60328      new_path="$input_path"
60329    fi
60330  fi
60331
60332  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60333  if test "x$test_cygdrive_prefix" = x; then
60334    # As a simple fix, exclude /usr/bin since it's not a real path.
60335    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60336      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60337      # a path prefixed by /cygdrive for fixpath to work.
60338      new_path="$CYGWIN_ROOT_PATH$input_path"
60339    fi
60340  fi
60341
60342
60343  if test "x$path" != "x$new_path"; then
60344    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60345    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60346$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60347  fi
60348
60349    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60350
60351  path="$POTENTIAL_FREETYPE_LIB_PATH"
60352  has_colon=`$ECHO $path | $GREP ^.:`
60353  new_path="$path"
60354  if test "x$has_colon" = x; then
60355    # Not in mixed or Windows style, start by that.
60356    new_path=`cmd //c echo $path`
60357  fi
60358
60359
60360  input_path="$new_path"
60361  # Check if we need to convert this using DOS-style short mode. If the path
60362  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60363  # take no chances and rewrite it.
60364  # Note: m4 eats our [], so we need to use [ and ] instead.
60365  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60366  if test "x$has_forbidden_chars" != x; then
60367    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60368    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60369  fi
60370
60371
60372  windows_path="$new_path"
60373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60374    unix_path=`$CYGPATH -u "$windows_path"`
60375    new_path="$unix_path"
60376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60377    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60378    new_path="$unix_path"
60379  fi
60380
60381  if test "x$path" != "x$new_path"; then
60382    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60383    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60384$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60385  fi
60386
60387  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60388  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60389
60390    else
60391      # We're on a unix platform. Hooray! :)
60392      path="$POTENTIAL_FREETYPE_LIB_PATH"
60393      has_space=`$ECHO "$path" | $GREP " "`
60394      if test "x$has_space" != x; then
60395        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60396$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60397        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60398      fi
60399
60400      # Use eval to expand a potential ~
60401      eval path="$path"
60402      if test ! -f "$path" && test ! -d "$path"; then
60403        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60404      fi
60405
60406      if test -d "$path"; then
60407        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60408      else
60409        dir="`$DIRNAME "$path"`"
60410        base="`$BASENAME "$path"`"
60411        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60412      fi
60413    fi
60414  fi
60415
60416
60417    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60418    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60419$as_echo_n "checking for freetype includes... " >&6; }
60420    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60421$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60422    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60423    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60424$as_echo_n "checking for freetype libraries... " >&6; }
60425    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60426$as_echo "$FREETYPE_LIB_PATH" >&6; }
60427  fi
60428
60429          fi
60430
60431          if test "x$OPENJDK_TARGET_OS" = xmacosx; then
60432            if test "x$FOUND_FREETYPE" != xyes; then
60433              # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
60434              FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
60435
60436  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60437  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60438  METHOD="well-known location"
60439
60440  # Let's start with an optimistic view of the world :-)
60441  FOUND_FREETYPE=yes
60442
60443  # First look for the canonical freetype main include file ft2build.h.
60444  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60445    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60446    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60447    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60448      # Fail.
60449      FOUND_FREETYPE=no
60450    fi
60451  fi
60452
60453  if test "x$FOUND_FREETYPE" = xyes; then
60454    # Include file found, let's continue the sanity check.
60455    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60456$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60457
60458    # Reset to default value
60459    FREETYPE_BASE_NAME=freetype
60460    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60461    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60462      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60463          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60464        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60465        # for the .6 version explicitly.
60466        FREETYPE_BASE_NAME=freetype.6
60467        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60468        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60469$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60470      else
60471        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60472$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60473        FOUND_FREETYPE=no
60474      fi
60475    else
60476      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60477        # On Windows, we will need both .lib and .dll file.
60478        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60479          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60480$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60481          FOUND_FREETYPE=no
60482        fi
60483      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60484          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60485        # Found lib in isa dir, use that instead.
60486        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60487        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60488$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60489      fi
60490    fi
60491  fi
60492
60493  if test "x$FOUND_FREETYPE" = xyes; then
60494
60495  # Only process if variable expands to non-empty
60496
60497  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60498    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60499
60500  # Input might be given as Windows format, start by converting to
60501  # unix format.
60502  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60503  new_path=`$CYGPATH -u "$path"`
60504
60505  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60506  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60507  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60508  # "foo.exe" is OK but "foo" is an error.
60509  #
60510  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60511  # It is also a way to make sure we got the proper file name for the real test later on.
60512  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60513  if test "x$test_shortpath" = x; then
60514    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60515$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60516    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60517  fi
60518
60519  # Call helper function which possibly converts this using DOS-style short mode.
60520  # If so, the updated path is stored in $new_path.
60521
60522  input_path="$new_path"
60523  # Check if we need to convert this using DOS-style short mode. If the path
60524  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60525  # take no chances and rewrite it.
60526  # Note: m4 eats our [], so we need to use [ and ] instead.
60527  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60528  if test "x$has_forbidden_chars" != x; then
60529    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60530    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60531    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60532    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60533      # Going to short mode and back again did indeed matter. Since short mode is
60534      # case insensitive, let's make it lowercase to improve readability.
60535      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60536      # Now convert it back to Unix-style (cygpath)
60537      input_path=`$CYGPATH -u "$shortmode_path"`
60538      new_path="$input_path"
60539    fi
60540  fi
60541
60542  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60543  if test "x$test_cygdrive_prefix" = x; then
60544    # As a simple fix, exclude /usr/bin since it's not a real path.
60545    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60546      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60547      # a path prefixed by /cygdrive for fixpath to work.
60548      new_path="$CYGWIN_ROOT_PATH$input_path"
60549    fi
60550  fi
60551
60552
60553  if test "x$path" != "x$new_path"; then
60554    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60555    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60556$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60557  fi
60558
60559    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60560
60561  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60562  has_colon=`$ECHO $path | $GREP ^.:`
60563  new_path="$path"
60564  if test "x$has_colon" = x; then
60565    # Not in mixed or Windows style, start by that.
60566    new_path=`cmd //c echo $path`
60567  fi
60568
60569
60570  input_path="$new_path"
60571  # Check if we need to convert this using DOS-style short mode. If the path
60572  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60573  # take no chances and rewrite it.
60574  # Note: m4 eats our [], so we need to use [ and ] instead.
60575  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60576  if test "x$has_forbidden_chars" != x; then
60577    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60578    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60579  fi
60580
60581
60582  windows_path="$new_path"
60583  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60584    unix_path=`$CYGPATH -u "$windows_path"`
60585    new_path="$unix_path"
60586  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60587    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60588    new_path="$unix_path"
60589  fi
60590
60591  if test "x$path" != "x$new_path"; then
60592    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60593    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60594$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60595  fi
60596
60597  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60598  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60599
60600    else
60601      # We're on a unix platform. Hooray! :)
60602      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60603      has_space=`$ECHO "$path" | $GREP " "`
60604      if test "x$has_space" != x; then
60605        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60606$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60607        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60608      fi
60609
60610      # Use eval to expand a potential ~
60611      eval path="$path"
60612      if test ! -f "$path" && test ! -d "$path"; then
60613        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60614      fi
60615
60616      if test -d "$path"; then
60617        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60618      else
60619        dir="`$DIRNAME "$path"`"
60620        base="`$BASENAME "$path"`"
60621        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60622      fi
60623    fi
60624  fi
60625
60626
60627  # Only process if variable expands to non-empty
60628
60629  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60630    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60631
60632  # Input might be given as Windows format, start by converting to
60633  # unix format.
60634  path="$POTENTIAL_FREETYPE_LIB_PATH"
60635  new_path=`$CYGPATH -u "$path"`
60636
60637  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60638  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60639  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60640  # "foo.exe" is OK but "foo" is an error.
60641  #
60642  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60643  # It is also a way to make sure we got the proper file name for the real test later on.
60644  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60645  if test "x$test_shortpath" = x; then
60646    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60647$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60648    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60649  fi
60650
60651  # Call helper function which possibly converts this using DOS-style short mode.
60652  # If so, the updated path is stored in $new_path.
60653
60654  input_path="$new_path"
60655  # Check if we need to convert this using DOS-style short mode. If the path
60656  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60657  # take no chances and rewrite it.
60658  # Note: m4 eats our [], so we need to use [ and ] instead.
60659  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60660  if test "x$has_forbidden_chars" != x; then
60661    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60662    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60663    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60664    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60665      # Going to short mode and back again did indeed matter. Since short mode is
60666      # case insensitive, let's make it lowercase to improve readability.
60667      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60668      # Now convert it back to Unix-style (cygpath)
60669      input_path=`$CYGPATH -u "$shortmode_path"`
60670      new_path="$input_path"
60671    fi
60672  fi
60673
60674  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60675  if test "x$test_cygdrive_prefix" = x; then
60676    # As a simple fix, exclude /usr/bin since it's not a real path.
60677    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60678      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60679      # a path prefixed by /cygdrive for fixpath to work.
60680      new_path="$CYGWIN_ROOT_PATH$input_path"
60681    fi
60682  fi
60683
60684
60685  if test "x$path" != "x$new_path"; then
60686    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60687    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60688$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60689  fi
60690
60691    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60692
60693  path="$POTENTIAL_FREETYPE_LIB_PATH"
60694  has_colon=`$ECHO $path | $GREP ^.:`
60695  new_path="$path"
60696  if test "x$has_colon" = x; then
60697    # Not in mixed or Windows style, start by that.
60698    new_path=`cmd //c echo $path`
60699  fi
60700
60701
60702  input_path="$new_path"
60703  # Check if we need to convert this using DOS-style short mode. If the path
60704  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60705  # take no chances and rewrite it.
60706  # Note: m4 eats our [], so we need to use [ and ] instead.
60707  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60708  if test "x$has_forbidden_chars" != x; then
60709    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60710    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60711  fi
60712
60713
60714  windows_path="$new_path"
60715  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60716    unix_path=`$CYGPATH -u "$windows_path"`
60717    new_path="$unix_path"
60718  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60719    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60720    new_path="$unix_path"
60721  fi
60722
60723  if test "x$path" != "x$new_path"; then
60724    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60725    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60726$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60727  fi
60728
60729  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60730  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60731
60732    else
60733      # We're on a unix platform. Hooray! :)
60734      path="$POTENTIAL_FREETYPE_LIB_PATH"
60735      has_space=`$ECHO "$path" | $GREP " "`
60736      if test "x$has_space" != x; then
60737        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60738$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60739        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60740      fi
60741
60742      # Use eval to expand a potential ~
60743      eval path="$path"
60744      if test ! -f "$path" && test ! -d "$path"; then
60745        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60746      fi
60747
60748      if test -d "$path"; then
60749        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60750      else
60751        dir="`$DIRNAME "$path"`"
60752        base="`$BASENAME "$path"`"
60753        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60754      fi
60755    fi
60756  fi
60757
60758
60759    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60760    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60761$as_echo_n "checking for freetype includes... " >&6; }
60762    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60763$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60764    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60765    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60766$as_echo_n "checking for freetype libraries... " >&6; }
60767    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60768$as_echo "$FREETYPE_LIB_PATH" >&6; }
60769  fi
60770
60771            fi
60772          fi
60773
60774          if test "x$FOUND_FREETYPE" != xyes; then
60775            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
60776
60777  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60778  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60779  METHOD="well-known location"
60780
60781  # Let's start with an optimistic view of the world :-)
60782  FOUND_FREETYPE=yes
60783
60784  # First look for the canonical freetype main include file ft2build.h.
60785  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60786    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60787    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60788    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60789      # Fail.
60790      FOUND_FREETYPE=no
60791    fi
60792  fi
60793
60794  if test "x$FOUND_FREETYPE" = xyes; then
60795    # Include file found, let's continue the sanity check.
60796    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60797$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60798
60799    # Reset to default value
60800    FREETYPE_BASE_NAME=freetype
60801    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60802    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60803      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60804          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60805        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60806        # for the .6 version explicitly.
60807        FREETYPE_BASE_NAME=freetype.6
60808        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60809        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60810$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60811      else
60812        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60813$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60814        FOUND_FREETYPE=no
60815      fi
60816    else
60817      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60818        # On Windows, we will need both .lib and .dll file.
60819        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60820          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60821$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60822          FOUND_FREETYPE=no
60823        fi
60824      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60825          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60826        # Found lib in isa dir, use that instead.
60827        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60828        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60829$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60830      fi
60831    fi
60832  fi
60833
60834  if test "x$FOUND_FREETYPE" = xyes; then
60835
60836  # Only process if variable expands to non-empty
60837
60838  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60839    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60840
60841  # Input might be given as Windows format, start by converting to
60842  # unix format.
60843  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60844  new_path=`$CYGPATH -u "$path"`
60845
60846  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60847  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60848  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60849  # "foo.exe" is OK but "foo" is an error.
60850  #
60851  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60852  # It is also a way to make sure we got the proper file name for the real test later on.
60853  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60854  if test "x$test_shortpath" = x; then
60855    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60856$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60857    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60858  fi
60859
60860  # Call helper function which possibly converts this using DOS-style short mode.
60861  # If so, the updated path is stored in $new_path.
60862
60863  input_path="$new_path"
60864  # Check if we need to convert this using DOS-style short mode. If the path
60865  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60866  # take no chances and rewrite it.
60867  # Note: m4 eats our [], so we need to use [ and ] instead.
60868  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60869  if test "x$has_forbidden_chars" != x; then
60870    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60871    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60872    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60873    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60874      # Going to short mode and back again did indeed matter. Since short mode is
60875      # case insensitive, let's make it lowercase to improve readability.
60876      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60877      # Now convert it back to Unix-style (cygpath)
60878      input_path=`$CYGPATH -u "$shortmode_path"`
60879      new_path="$input_path"
60880    fi
60881  fi
60882
60883  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60884  if test "x$test_cygdrive_prefix" = x; then
60885    # As a simple fix, exclude /usr/bin since it's not a real path.
60886    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60887      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60888      # a path prefixed by /cygdrive for fixpath to work.
60889      new_path="$CYGWIN_ROOT_PATH$input_path"
60890    fi
60891  fi
60892
60893
60894  if test "x$path" != "x$new_path"; then
60895    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60896    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60897$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60898  fi
60899
60900    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60901
60902  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60903  has_colon=`$ECHO $path | $GREP ^.:`
60904  new_path="$path"
60905  if test "x$has_colon" = x; then
60906    # Not in mixed or Windows style, start by that.
60907    new_path=`cmd //c echo $path`
60908  fi
60909
60910
60911  input_path="$new_path"
60912  # Check if we need to convert this using DOS-style short mode. If the path
60913  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60914  # take no chances and rewrite it.
60915  # Note: m4 eats our [], so we need to use [ and ] instead.
60916  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60917  if test "x$has_forbidden_chars" != x; then
60918    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60919    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60920  fi
60921
60922
60923  windows_path="$new_path"
60924  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60925    unix_path=`$CYGPATH -u "$windows_path"`
60926    new_path="$unix_path"
60927  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60928    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60929    new_path="$unix_path"
60930  fi
60931
60932  if test "x$path" != "x$new_path"; then
60933    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60934    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60935$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60936  fi
60937
60938  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60939  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60940
60941    else
60942      # We're on a unix platform. Hooray! :)
60943      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60944      has_space=`$ECHO "$path" | $GREP " "`
60945      if test "x$has_space" != x; then
60946        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60947$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60948        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60949      fi
60950
60951      # Use eval to expand a potential ~
60952      eval path="$path"
60953      if test ! -f "$path" && test ! -d "$path"; then
60954        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60955      fi
60956
60957      if test -d "$path"; then
60958        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60959      else
60960        dir="`$DIRNAME "$path"`"
60961        base="`$BASENAME "$path"`"
60962        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60963      fi
60964    fi
60965  fi
60966
60967
60968  # Only process if variable expands to non-empty
60969
60970  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60971    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60972
60973  # Input might be given as Windows format, start by converting to
60974  # unix format.
60975  path="$POTENTIAL_FREETYPE_LIB_PATH"
60976  new_path=`$CYGPATH -u "$path"`
60977
60978  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60979  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60980  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60981  # "foo.exe" is OK but "foo" is an error.
60982  #
60983  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60984  # It is also a way to make sure we got the proper file name for the real test later on.
60985  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60986  if test "x$test_shortpath" = x; then
60987    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60988$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60989    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60990  fi
60991
60992  # Call helper function which possibly converts this using DOS-style short mode.
60993  # If so, the updated path is stored in $new_path.
60994
60995  input_path="$new_path"
60996  # Check if we need to convert this using DOS-style short mode. If the path
60997  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60998  # take no chances and rewrite it.
60999  # Note: m4 eats our [], so we need to use [ and ] instead.
61000  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61001  if test "x$has_forbidden_chars" != x; then
61002    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61003    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61004    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61005    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61006      # Going to short mode and back again did indeed matter. Since short mode is
61007      # case insensitive, let's make it lowercase to improve readability.
61008      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61009      # Now convert it back to Unix-style (cygpath)
61010      input_path=`$CYGPATH -u "$shortmode_path"`
61011      new_path="$input_path"
61012    fi
61013  fi
61014
61015  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61016  if test "x$test_cygdrive_prefix" = x; then
61017    # As a simple fix, exclude /usr/bin since it's not a real path.
61018    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61019      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61020      # a path prefixed by /cygdrive for fixpath to work.
61021      new_path="$CYGWIN_ROOT_PATH$input_path"
61022    fi
61023  fi
61024
61025
61026  if test "x$path" != "x$new_path"; then
61027    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61028    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61029$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61030  fi
61031
61032    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61033
61034  path="$POTENTIAL_FREETYPE_LIB_PATH"
61035  has_colon=`$ECHO $path | $GREP ^.:`
61036  new_path="$path"
61037  if test "x$has_colon" = x; then
61038    # Not in mixed or Windows style, start by that.
61039    new_path=`cmd //c echo $path`
61040  fi
61041
61042
61043  input_path="$new_path"
61044  # Check if we need to convert this using DOS-style short mode. If the path
61045  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61046  # take no chances and rewrite it.
61047  # Note: m4 eats our [], so we need to use [ and ] instead.
61048  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61049  if test "x$has_forbidden_chars" != x; then
61050    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61051    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61052  fi
61053
61054
61055  windows_path="$new_path"
61056  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61057    unix_path=`$CYGPATH -u "$windows_path"`
61058    new_path="$unix_path"
61059  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61060    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61061    new_path="$unix_path"
61062  fi
61063
61064  if test "x$path" != "x$new_path"; then
61065    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61066    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61067$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61068  fi
61069
61070  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61071  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61072
61073    else
61074      # We're on a unix platform. Hooray! :)
61075      path="$POTENTIAL_FREETYPE_LIB_PATH"
61076      has_space=`$ECHO "$path" | $GREP " "`
61077      if test "x$has_space" != x; then
61078        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61079$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61080        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61081      fi
61082
61083      # Use eval to expand a potential ~
61084      eval path="$path"
61085      if test ! -f "$path" && test ! -d "$path"; then
61086        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61087      fi
61088
61089      if test -d "$path"; then
61090        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61091      else
61092        dir="`$DIRNAME "$path"`"
61093        base="`$BASENAME "$path"`"
61094        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61095      fi
61096    fi
61097  fi
61098
61099
61100    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61101    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61102$as_echo_n "checking for freetype includes... " >&6; }
61103    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61104$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61105    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61106    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61107$as_echo_n "checking for freetype libraries... " >&6; }
61108    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61109$as_echo "$FREETYPE_LIB_PATH" >&6; }
61110  fi
61111
61112          fi
61113
61114          if test "x$FOUND_FREETYPE" != xyes; then
61115            FREETYPE_BASE_DIR="$SYSROOT/usr"
61116            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
61117
61118  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61119  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
61120  METHOD="well-known location"
61121
61122  # Let's start with an optimistic view of the world :-)
61123  FOUND_FREETYPE=yes
61124
61125  # First look for the canonical freetype main include file ft2build.h.
61126  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61127    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61128    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61129    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61130      # Fail.
61131      FOUND_FREETYPE=no
61132    fi
61133  fi
61134
61135  if test "x$FOUND_FREETYPE" = xyes; then
61136    # Include file found, let's continue the sanity check.
61137    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61138$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61139
61140    # Reset to default value
61141    FREETYPE_BASE_NAME=freetype
61142    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61143    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61144      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61145          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61146        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61147        # for the .6 version explicitly.
61148        FREETYPE_BASE_NAME=freetype.6
61149        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61150        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61151$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61152      else
61153        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61154$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61155        FOUND_FREETYPE=no
61156      fi
61157    else
61158      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61159        # On Windows, we will need both .lib and .dll file.
61160        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61161          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61162$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61163          FOUND_FREETYPE=no
61164        fi
61165      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61166          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61167        # Found lib in isa dir, use that instead.
61168        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61169        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61170$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61171      fi
61172    fi
61173  fi
61174
61175  if test "x$FOUND_FREETYPE" = xyes; then
61176
61177  # Only process if variable expands to non-empty
61178
61179  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61180    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61181
61182  # Input might be given as Windows format, start by converting to
61183  # unix format.
61184  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61185  new_path=`$CYGPATH -u "$path"`
61186
61187  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61188  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61189  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61190  # "foo.exe" is OK but "foo" is an error.
61191  #
61192  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61193  # It is also a way to make sure we got the proper file name for the real test later on.
61194  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61195  if test "x$test_shortpath" = x; then
61196    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61197$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61198    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61199  fi
61200
61201  # Call helper function which possibly converts this using DOS-style short mode.
61202  # If so, the updated path is stored in $new_path.
61203
61204  input_path="$new_path"
61205  # Check if we need to convert this using DOS-style short mode. If the path
61206  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61207  # take no chances and rewrite it.
61208  # Note: m4 eats our [], so we need to use [ and ] instead.
61209  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61210  if test "x$has_forbidden_chars" != x; then
61211    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61212    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61213    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61214    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61215      # Going to short mode and back again did indeed matter. Since short mode is
61216      # case insensitive, let's make it lowercase to improve readability.
61217      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61218      # Now convert it back to Unix-style (cygpath)
61219      input_path=`$CYGPATH -u "$shortmode_path"`
61220      new_path="$input_path"
61221    fi
61222  fi
61223
61224  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61225  if test "x$test_cygdrive_prefix" = x; then
61226    # As a simple fix, exclude /usr/bin since it's not a real path.
61227    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61228      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61229      # a path prefixed by /cygdrive for fixpath to work.
61230      new_path="$CYGWIN_ROOT_PATH$input_path"
61231    fi
61232  fi
61233
61234
61235  if test "x$path" != "x$new_path"; then
61236    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61237    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61238$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61239  fi
61240
61241    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61242
61243  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61244  has_colon=`$ECHO $path | $GREP ^.:`
61245  new_path="$path"
61246  if test "x$has_colon" = x; then
61247    # Not in mixed or Windows style, start by that.
61248    new_path=`cmd //c echo $path`
61249  fi
61250
61251
61252  input_path="$new_path"
61253  # Check if we need to convert this using DOS-style short mode. If the path
61254  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61255  # take no chances and rewrite it.
61256  # Note: m4 eats our [], so we need to use [ and ] instead.
61257  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61258  if test "x$has_forbidden_chars" != x; then
61259    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61260    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61261  fi
61262
61263
61264  windows_path="$new_path"
61265  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61266    unix_path=`$CYGPATH -u "$windows_path"`
61267    new_path="$unix_path"
61268  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61269    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61270    new_path="$unix_path"
61271  fi
61272
61273  if test "x$path" != "x$new_path"; then
61274    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61275    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61276$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61277  fi
61278
61279  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61280  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61281
61282    else
61283      # We're on a unix platform. Hooray! :)
61284      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61285      has_space=`$ECHO "$path" | $GREP " "`
61286      if test "x$has_space" != x; then
61287        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61288$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61289        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61290      fi
61291
61292      # Use eval to expand a potential ~
61293      eval path="$path"
61294      if test ! -f "$path" && test ! -d "$path"; then
61295        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61296      fi
61297
61298      if test -d "$path"; then
61299        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61300      else
61301        dir="`$DIRNAME "$path"`"
61302        base="`$BASENAME "$path"`"
61303        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61304      fi
61305    fi
61306  fi
61307
61308
61309  # Only process if variable expands to non-empty
61310
61311  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61312    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61313
61314  # Input might be given as Windows format, start by converting to
61315  # unix format.
61316  path="$POTENTIAL_FREETYPE_LIB_PATH"
61317  new_path=`$CYGPATH -u "$path"`
61318
61319  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61320  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61321  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61322  # "foo.exe" is OK but "foo" is an error.
61323  #
61324  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61325  # It is also a way to make sure we got the proper file name for the real test later on.
61326  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61327  if test "x$test_shortpath" = x; then
61328    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61329$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61330    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61331  fi
61332
61333  # Call helper function which possibly converts this using DOS-style short mode.
61334  # If so, the updated path is stored in $new_path.
61335
61336  input_path="$new_path"
61337  # Check if we need to convert this using DOS-style short mode. If the path
61338  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61339  # take no chances and rewrite it.
61340  # Note: m4 eats our [], so we need to use [ and ] instead.
61341  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61342  if test "x$has_forbidden_chars" != x; then
61343    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61344    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61345    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61346    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61347      # Going to short mode and back again did indeed matter. Since short mode is
61348      # case insensitive, let's make it lowercase to improve readability.
61349      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61350      # Now convert it back to Unix-style (cygpath)
61351      input_path=`$CYGPATH -u "$shortmode_path"`
61352      new_path="$input_path"
61353    fi
61354  fi
61355
61356  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61357  if test "x$test_cygdrive_prefix" = x; then
61358    # As a simple fix, exclude /usr/bin since it's not a real path.
61359    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61360      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61361      # a path prefixed by /cygdrive for fixpath to work.
61362      new_path="$CYGWIN_ROOT_PATH$input_path"
61363    fi
61364  fi
61365
61366
61367  if test "x$path" != "x$new_path"; then
61368    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61369    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61370$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61371  fi
61372
61373    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61374
61375  path="$POTENTIAL_FREETYPE_LIB_PATH"
61376  has_colon=`$ECHO $path | $GREP ^.:`
61377  new_path="$path"
61378  if test "x$has_colon" = x; then
61379    # Not in mixed or Windows style, start by that.
61380    new_path=`cmd //c echo $path`
61381  fi
61382
61383
61384  input_path="$new_path"
61385  # Check if we need to convert this using DOS-style short mode. If the path
61386  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61387  # take no chances and rewrite it.
61388  # Note: m4 eats our [], so we need to use [ and ] instead.
61389  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61390  if test "x$has_forbidden_chars" != x; then
61391    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61392    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61393  fi
61394
61395
61396  windows_path="$new_path"
61397  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61398    unix_path=`$CYGPATH -u "$windows_path"`
61399    new_path="$unix_path"
61400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61401    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61402    new_path="$unix_path"
61403  fi
61404
61405  if test "x$path" != "x$new_path"; then
61406    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61407    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61408$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61409  fi
61410
61411  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61412  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61413
61414    else
61415      # We're on a unix platform. Hooray! :)
61416      path="$POTENTIAL_FREETYPE_LIB_PATH"
61417      has_space=`$ECHO "$path" | $GREP " "`
61418      if test "x$has_space" != x; then
61419        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61420$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61421        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61422      fi
61423
61424      # Use eval to expand a potential ~
61425      eval path="$path"
61426      if test ! -f "$path" && test ! -d "$path"; then
61427        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61428      fi
61429
61430      if test -d "$path"; then
61431        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61432      else
61433        dir="`$DIRNAME "$path"`"
61434        base="`$BASENAME "$path"`"
61435        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61436      fi
61437    fi
61438  fi
61439
61440
61441    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61442    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61443$as_echo_n "checking for freetype includes... " >&6; }
61444    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61445$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61446    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61447    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61448$as_echo_n "checking for freetype libraries... " >&6; }
61449    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61450$as_echo "$FREETYPE_LIB_PATH" >&6; }
61451  fi
61452
61453            else
61454
61455  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61456  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
61457  METHOD="well-known location"
61458
61459  # Let's start with an optimistic view of the world :-)
61460  FOUND_FREETYPE=yes
61461
61462  # First look for the canonical freetype main include file ft2build.h.
61463  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61464    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61465    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61466    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61467      # Fail.
61468      FOUND_FREETYPE=no
61469    fi
61470  fi
61471
61472  if test "x$FOUND_FREETYPE" = xyes; then
61473    # Include file found, let's continue the sanity check.
61474    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61475$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61476
61477    # Reset to default value
61478    FREETYPE_BASE_NAME=freetype
61479    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61480    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61481      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61482          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61483        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61484        # for the .6 version explicitly.
61485        FREETYPE_BASE_NAME=freetype.6
61486        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61487        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61488$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61489      else
61490        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61491$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61492        FOUND_FREETYPE=no
61493      fi
61494    else
61495      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61496        # On Windows, we will need both .lib and .dll file.
61497        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61498          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61499$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61500          FOUND_FREETYPE=no
61501        fi
61502      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61503          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61504        # Found lib in isa dir, use that instead.
61505        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61506        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61507$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61508      fi
61509    fi
61510  fi
61511
61512  if test "x$FOUND_FREETYPE" = xyes; then
61513
61514  # Only process if variable expands to non-empty
61515
61516  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61517    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61518
61519  # Input might be given as Windows format, start by converting to
61520  # unix format.
61521  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61522  new_path=`$CYGPATH -u "$path"`
61523
61524  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61525  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61526  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61527  # "foo.exe" is OK but "foo" is an error.
61528  #
61529  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61530  # It is also a way to make sure we got the proper file name for the real test later on.
61531  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61532  if test "x$test_shortpath" = x; then
61533    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61534$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61535    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61536  fi
61537
61538  # Call helper function which possibly converts this using DOS-style short mode.
61539  # If so, the updated path is stored in $new_path.
61540
61541  input_path="$new_path"
61542  # Check if we need to convert this using DOS-style short mode. If the path
61543  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61544  # take no chances and rewrite it.
61545  # Note: m4 eats our [], so we need to use [ and ] instead.
61546  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61547  if test "x$has_forbidden_chars" != x; then
61548    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61549    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61550    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61551    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61552      # Going to short mode and back again did indeed matter. Since short mode is
61553      # case insensitive, let's make it lowercase to improve readability.
61554      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61555      # Now convert it back to Unix-style (cygpath)
61556      input_path=`$CYGPATH -u "$shortmode_path"`
61557      new_path="$input_path"
61558    fi
61559  fi
61560
61561  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61562  if test "x$test_cygdrive_prefix" = x; then
61563    # As a simple fix, exclude /usr/bin since it's not a real path.
61564    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61565      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61566      # a path prefixed by /cygdrive for fixpath to work.
61567      new_path="$CYGWIN_ROOT_PATH$input_path"
61568    fi
61569  fi
61570
61571
61572  if test "x$path" != "x$new_path"; then
61573    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61574    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61575$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61576  fi
61577
61578    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61579
61580  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61581  has_colon=`$ECHO $path | $GREP ^.:`
61582  new_path="$path"
61583  if test "x$has_colon" = x; then
61584    # Not in mixed or Windows style, start by that.
61585    new_path=`cmd //c echo $path`
61586  fi
61587
61588
61589  input_path="$new_path"
61590  # Check if we need to convert this using DOS-style short mode. If the path
61591  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61592  # take no chances and rewrite it.
61593  # Note: m4 eats our [], so we need to use [ and ] instead.
61594  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61595  if test "x$has_forbidden_chars" != x; then
61596    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61597    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61598  fi
61599
61600
61601  windows_path="$new_path"
61602  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61603    unix_path=`$CYGPATH -u "$windows_path"`
61604    new_path="$unix_path"
61605  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61606    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61607    new_path="$unix_path"
61608  fi
61609
61610  if test "x$path" != "x$new_path"; then
61611    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61612    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61613$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61614  fi
61615
61616  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61617  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61618
61619    else
61620      # We're on a unix platform. Hooray! :)
61621      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61622      has_space=`$ECHO "$path" | $GREP " "`
61623      if test "x$has_space" != x; then
61624        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61625$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61626        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61627      fi
61628
61629      # Use eval to expand a potential ~
61630      eval path="$path"
61631      if test ! -f "$path" && test ! -d "$path"; then
61632        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61633      fi
61634
61635      if test -d "$path"; then
61636        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61637      else
61638        dir="`$DIRNAME "$path"`"
61639        base="`$BASENAME "$path"`"
61640        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61641      fi
61642    fi
61643  fi
61644
61645
61646  # Only process if variable expands to non-empty
61647
61648  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61649    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61650
61651  # Input might be given as Windows format, start by converting to
61652  # unix format.
61653  path="$POTENTIAL_FREETYPE_LIB_PATH"
61654  new_path=`$CYGPATH -u "$path"`
61655
61656  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61657  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61658  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61659  # "foo.exe" is OK but "foo" is an error.
61660  #
61661  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61662  # It is also a way to make sure we got the proper file name for the real test later on.
61663  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61664  if test "x$test_shortpath" = x; then
61665    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61666$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61667    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61668  fi
61669
61670  # Call helper function which possibly converts this using DOS-style short mode.
61671  # If so, the updated path is stored in $new_path.
61672
61673  input_path="$new_path"
61674  # Check if we need to convert this using DOS-style short mode. If the path
61675  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61676  # take no chances and rewrite it.
61677  # Note: m4 eats our [], so we need to use [ and ] instead.
61678  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61679  if test "x$has_forbidden_chars" != x; then
61680    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61681    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61682    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61683    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61684      # Going to short mode and back again did indeed matter. Since short mode is
61685      # case insensitive, let's make it lowercase to improve readability.
61686      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61687      # Now convert it back to Unix-style (cygpath)
61688      input_path=`$CYGPATH -u "$shortmode_path"`
61689      new_path="$input_path"
61690    fi
61691  fi
61692
61693  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61694  if test "x$test_cygdrive_prefix" = x; then
61695    # As a simple fix, exclude /usr/bin since it's not a real path.
61696    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61697      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61698      # a path prefixed by /cygdrive for fixpath to work.
61699      new_path="$CYGWIN_ROOT_PATH$input_path"
61700    fi
61701  fi
61702
61703
61704  if test "x$path" != "x$new_path"; then
61705    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61706    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61707$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61708  fi
61709
61710    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61711
61712  path="$POTENTIAL_FREETYPE_LIB_PATH"
61713  has_colon=`$ECHO $path | $GREP ^.:`
61714  new_path="$path"
61715  if test "x$has_colon" = x; then
61716    # Not in mixed or Windows style, start by that.
61717    new_path=`cmd //c echo $path`
61718  fi
61719
61720
61721  input_path="$new_path"
61722  # Check if we need to convert this using DOS-style short mode. If the path
61723  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61724  # take no chances and rewrite it.
61725  # Note: m4 eats our [], so we need to use [ and ] instead.
61726  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61727  if test "x$has_forbidden_chars" != x; then
61728    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61729    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61730  fi
61731
61732
61733  windows_path="$new_path"
61734  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61735    unix_path=`$CYGPATH -u "$windows_path"`
61736    new_path="$unix_path"
61737  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61738    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61739    new_path="$unix_path"
61740  fi
61741
61742  if test "x$path" != "x$new_path"; then
61743    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61744    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61745$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61746  fi
61747
61748  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61749  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61750
61751    else
61752      # We're on a unix platform. Hooray! :)
61753      path="$POTENTIAL_FREETYPE_LIB_PATH"
61754      has_space=`$ECHO "$path" | $GREP " "`
61755      if test "x$has_space" != x; then
61756        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61757$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61758        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61759      fi
61760
61761      # Use eval to expand a potential ~
61762      eval path="$path"
61763      if test ! -f "$path" && test ! -d "$path"; then
61764        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61765      fi
61766
61767      if test -d "$path"; then
61768        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61769      else
61770        dir="`$DIRNAME "$path"`"
61771        base="`$BASENAME "$path"`"
61772        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61773      fi
61774    fi
61775  fi
61776
61777
61778    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61779    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61780$as_echo_n "checking for freetype includes... " >&6; }
61781    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61782$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61783    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61784    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61785$as_echo_n "checking for freetype libraries... " >&6; }
61786    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61787$as_echo "$FREETYPE_LIB_PATH" >&6; }
61788  fi
61789
61790              if test "x$FOUND_FREETYPE" != xyes; then
61791
61792  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61793  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
61794  METHOD="well-known location"
61795
61796  # Let's start with an optimistic view of the world :-)
61797  FOUND_FREETYPE=yes
61798
61799  # First look for the canonical freetype main include file ft2build.h.
61800  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61801    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61802    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61803    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61804      # Fail.
61805      FOUND_FREETYPE=no
61806    fi
61807  fi
61808
61809  if test "x$FOUND_FREETYPE" = xyes; then
61810    # Include file found, let's continue the sanity check.
61811    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61812$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61813
61814    # Reset to default value
61815    FREETYPE_BASE_NAME=freetype
61816    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61817    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61818      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61819          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61820        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61821        # for the .6 version explicitly.
61822        FREETYPE_BASE_NAME=freetype.6
61823        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61824        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61825$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61826      else
61827        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61828$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61829        FOUND_FREETYPE=no
61830      fi
61831    else
61832      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61833        # On Windows, we will need both .lib and .dll file.
61834        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61835          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61836$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61837          FOUND_FREETYPE=no
61838        fi
61839      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61840          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61841        # Found lib in isa dir, use that instead.
61842        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61843        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61844$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61845      fi
61846    fi
61847  fi
61848
61849  if test "x$FOUND_FREETYPE" = xyes; then
61850
61851  # Only process if variable expands to non-empty
61852
61853  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61854    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61855
61856  # Input might be given as Windows format, start by converting to
61857  # unix format.
61858  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61859  new_path=`$CYGPATH -u "$path"`
61860
61861  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61862  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61863  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61864  # "foo.exe" is OK but "foo" is an error.
61865  #
61866  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61867  # It is also a way to make sure we got the proper file name for the real test later on.
61868  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61869  if test "x$test_shortpath" = x; then
61870    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61871$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61872    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61873  fi
61874
61875  # Call helper function which possibly converts this using DOS-style short mode.
61876  # If so, the updated path is stored in $new_path.
61877
61878  input_path="$new_path"
61879  # Check if we need to convert this using DOS-style short mode. If the path
61880  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61881  # take no chances and rewrite it.
61882  # Note: m4 eats our [], so we need to use [ and ] instead.
61883  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61884  if test "x$has_forbidden_chars" != x; then
61885    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61886    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61887    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61888    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61889      # Going to short mode and back again did indeed matter. Since short mode is
61890      # case insensitive, let's make it lowercase to improve readability.
61891      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61892      # Now convert it back to Unix-style (cygpath)
61893      input_path=`$CYGPATH -u "$shortmode_path"`
61894      new_path="$input_path"
61895    fi
61896  fi
61897
61898  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61899  if test "x$test_cygdrive_prefix" = x; then
61900    # As a simple fix, exclude /usr/bin since it's not a real path.
61901    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61902      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61903      # a path prefixed by /cygdrive for fixpath to work.
61904      new_path="$CYGWIN_ROOT_PATH$input_path"
61905    fi
61906  fi
61907
61908
61909  if test "x$path" != "x$new_path"; then
61910    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61911    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61912$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61913  fi
61914
61915    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61916
61917  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61918  has_colon=`$ECHO $path | $GREP ^.:`
61919  new_path="$path"
61920  if test "x$has_colon" = x; then
61921    # Not in mixed or Windows style, start by that.
61922    new_path=`cmd //c echo $path`
61923  fi
61924
61925
61926  input_path="$new_path"
61927  # Check if we need to convert this using DOS-style short mode. If the path
61928  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61929  # take no chances and rewrite it.
61930  # Note: m4 eats our [], so we need to use [ and ] instead.
61931  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61932  if test "x$has_forbidden_chars" != x; then
61933    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61934    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61935  fi
61936
61937
61938  windows_path="$new_path"
61939  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61940    unix_path=`$CYGPATH -u "$windows_path"`
61941    new_path="$unix_path"
61942  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61943    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61944    new_path="$unix_path"
61945  fi
61946
61947  if test "x$path" != "x$new_path"; then
61948    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61949    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61950$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61951  fi
61952
61953  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61954  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61955
61956    else
61957      # We're on a unix platform. Hooray! :)
61958      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61959      has_space=`$ECHO "$path" | $GREP " "`
61960      if test "x$has_space" != x; then
61961        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61962$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61963        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61964      fi
61965
61966      # Use eval to expand a potential ~
61967      eval path="$path"
61968      if test ! -f "$path" && test ! -d "$path"; then
61969        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61970      fi
61971
61972      if test -d "$path"; then
61973        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61974      else
61975        dir="`$DIRNAME "$path"`"
61976        base="`$BASENAME "$path"`"
61977        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61978      fi
61979    fi
61980  fi
61981
61982
61983  # Only process if variable expands to non-empty
61984
61985  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61986    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61987
61988  # Input might be given as Windows format, start by converting to
61989  # unix format.
61990  path="$POTENTIAL_FREETYPE_LIB_PATH"
61991  new_path=`$CYGPATH -u "$path"`
61992
61993  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61994  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61995  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61996  # "foo.exe" is OK but "foo" is an error.
61997  #
61998  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61999  # It is also a way to make sure we got the proper file name for the real test later on.
62000  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62001  if test "x$test_shortpath" = x; then
62002    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62003$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62004    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62005  fi
62006
62007  # Call helper function which possibly converts this using DOS-style short mode.
62008  # If so, the updated path is stored in $new_path.
62009
62010  input_path="$new_path"
62011  # Check if we need to convert this using DOS-style short mode. If the path
62012  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62013  # take no chances and rewrite it.
62014  # Note: m4 eats our [], so we need to use [ and ] instead.
62015  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62016  if test "x$has_forbidden_chars" != x; then
62017    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62018    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62019    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62020    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62021      # Going to short mode and back again did indeed matter. Since short mode is
62022      # case insensitive, let's make it lowercase to improve readability.
62023      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62024      # Now convert it back to Unix-style (cygpath)
62025      input_path=`$CYGPATH -u "$shortmode_path"`
62026      new_path="$input_path"
62027    fi
62028  fi
62029
62030  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62031  if test "x$test_cygdrive_prefix" = x; then
62032    # As a simple fix, exclude /usr/bin since it's not a real path.
62033    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62034      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62035      # a path prefixed by /cygdrive for fixpath to work.
62036      new_path="$CYGWIN_ROOT_PATH$input_path"
62037    fi
62038  fi
62039
62040
62041  if test "x$path" != "x$new_path"; then
62042    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62043    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62044$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62045  fi
62046
62047    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62048
62049  path="$POTENTIAL_FREETYPE_LIB_PATH"
62050  has_colon=`$ECHO $path | $GREP ^.:`
62051  new_path="$path"
62052  if test "x$has_colon" = x; then
62053    # Not in mixed or Windows style, start by that.
62054    new_path=`cmd //c echo $path`
62055  fi
62056
62057
62058  input_path="$new_path"
62059  # Check if we need to convert this using DOS-style short mode. If the path
62060  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62061  # take no chances and rewrite it.
62062  # Note: m4 eats our [], so we need to use [ and ] instead.
62063  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62064  if test "x$has_forbidden_chars" != x; then
62065    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62066    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62067  fi
62068
62069
62070  windows_path="$new_path"
62071  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62072    unix_path=`$CYGPATH -u "$windows_path"`
62073    new_path="$unix_path"
62074  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62075    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62076    new_path="$unix_path"
62077  fi
62078
62079  if test "x$path" != "x$new_path"; then
62080    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62081    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62082$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62083  fi
62084
62085  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62086  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62087
62088    else
62089      # We're on a unix platform. Hooray! :)
62090      path="$POTENTIAL_FREETYPE_LIB_PATH"
62091      has_space=`$ECHO "$path" | $GREP " "`
62092      if test "x$has_space" != x; then
62093        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62094$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62095        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62096      fi
62097
62098      # Use eval to expand a potential ~
62099      eval path="$path"
62100      if test ! -f "$path" && test ! -d "$path"; then
62101        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62102      fi
62103
62104      if test -d "$path"; then
62105        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62106      else
62107        dir="`$DIRNAME "$path"`"
62108        base="`$BASENAME "$path"`"
62109        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62110      fi
62111    fi
62112  fi
62113
62114
62115    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62116    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62117$as_echo_n "checking for freetype includes... " >&6; }
62118    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62119$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62120    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62121    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62122$as_echo_n "checking for freetype libraries... " >&6; }
62123    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62124$as_echo "$FREETYPE_LIB_PATH" >&6; }
62125  fi
62126
62127              fi
62128            fi
62129          fi
62130        fi
62131      fi # end check in well-known locations
62132
62133      if test "x$FOUND_FREETYPE" != xyes; then
62134
62135  # Print a helpful message on how to acquire the necessary build dependency.
62136  # freetype is the help tag: freetype, cups, alsa etc
62137  MISSING_DEPENDENCY=freetype
62138
62139  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62140    cygwin_help $MISSING_DEPENDENCY
62141  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62142    msys_help $MISSING_DEPENDENCY
62143  else
62144    PKGHANDLER_COMMAND=
62145
62146    case $PKGHANDLER in
62147      apt-get)
62148        apt_help     $MISSING_DEPENDENCY ;;
62149      yum)
62150        yum_help     $MISSING_DEPENDENCY ;;
62151      port)
62152        port_help    $MISSING_DEPENDENCY ;;
62153      pkgutil)
62154        pkgutil_help $MISSING_DEPENDENCY ;;
62155      pkgadd)
62156        pkgadd_help  $MISSING_DEPENDENCY ;;
62157    esac
62158
62159    if test "x$PKGHANDLER_COMMAND" != x; then
62160      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62161    fi
62162  fi
62163
62164        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
62165      fi
62166    fi # end user specified settings
62167
62168    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
62169    if test "x$FREETYPE_CFLAGS" = x; then
62170
62171  # Only process if variable expands to non-empty
62172
62173  if test "x$FREETYPE_INCLUDE_PATH" != x; then
62174    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62175
62176  # Input might be given as Windows format, start by converting to
62177  # unix format.
62178  path="$FREETYPE_INCLUDE_PATH"
62179  new_path=`$CYGPATH -u "$path"`
62180
62181  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62182  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62183  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62184  # "foo.exe" is OK but "foo" is an error.
62185  #
62186  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62187  # It is also a way to make sure we got the proper file name for the real test later on.
62188  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62189  if test "x$test_shortpath" = x; then
62190    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62191$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62192    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
62193  fi
62194
62195  # Call helper function which possibly converts this using DOS-style short mode.
62196  # If so, the updated path is stored in $new_path.
62197
62198  input_path="$new_path"
62199  # Check if we need to convert this using DOS-style short mode. If the path
62200  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62201  # take no chances and rewrite it.
62202  # Note: m4 eats our [], so we need to use [ and ] instead.
62203  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62204  if test "x$has_forbidden_chars" != x; then
62205    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62206    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62207    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62208    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62209      # Going to short mode and back again did indeed matter. Since short mode is
62210      # case insensitive, let's make it lowercase to improve readability.
62211      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62212      # Now convert it back to Unix-style (cygpath)
62213      input_path=`$CYGPATH -u "$shortmode_path"`
62214      new_path="$input_path"
62215    fi
62216  fi
62217
62218  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62219  if test "x$test_cygdrive_prefix" = x; then
62220    # As a simple fix, exclude /usr/bin since it's not a real path.
62221    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62222      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62223      # a path prefixed by /cygdrive for fixpath to work.
62224      new_path="$CYGWIN_ROOT_PATH$input_path"
62225    fi
62226  fi
62227
62228
62229  if test "x$path" != "x$new_path"; then
62230    FREETYPE_INCLUDE_PATH="$new_path"
62231    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62232$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62233  fi
62234
62235    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62236
62237  path="$FREETYPE_INCLUDE_PATH"
62238  has_colon=`$ECHO $path | $GREP ^.:`
62239  new_path="$path"
62240  if test "x$has_colon" = x; then
62241    # Not in mixed or Windows style, start by that.
62242    new_path=`cmd //c echo $path`
62243  fi
62244
62245
62246  input_path="$new_path"
62247  # Check if we need to convert this using DOS-style short mode. If the path
62248  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62249  # take no chances and rewrite it.
62250  # Note: m4 eats our [], so we need to use [ and ] instead.
62251  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62252  if test "x$has_forbidden_chars" != x; then
62253    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62254    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62255  fi
62256
62257
62258  windows_path="$new_path"
62259  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62260    unix_path=`$CYGPATH -u "$windows_path"`
62261    new_path="$unix_path"
62262  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62263    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62264    new_path="$unix_path"
62265  fi
62266
62267  if test "x$path" != "x$new_path"; then
62268    FREETYPE_INCLUDE_PATH="$new_path"
62269    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62270$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62271  fi
62272
62273  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62274  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62275
62276    else
62277      # We're on a unix platform. Hooray! :)
62278      path="$FREETYPE_INCLUDE_PATH"
62279      has_space=`$ECHO "$path" | $GREP " "`
62280      if test "x$has_space" != x; then
62281        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62282$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62283        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62284      fi
62285
62286      # Use eval to expand a potential ~
62287      eval path="$path"
62288      if test ! -f "$path" && test ! -d "$path"; then
62289        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62290      fi
62291
62292      if test -d "$path"; then
62293        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62294      else
62295        dir="`$DIRNAME "$path"`"
62296        base="`$BASENAME "$path"`"
62297        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62298      fi
62299    fi
62300  fi
62301
62302      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
62303        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
62304      else
62305        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
62306      fi
62307    fi
62308
62309    if test "x$FREETYPE_LIBS" = x; then
62310
62311  # Only process if variable expands to non-empty
62312
62313  if test "x$FREETYPE_LIB_PATH" != x; then
62314    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62315
62316  # Input might be given as Windows format, start by converting to
62317  # unix format.
62318  path="$FREETYPE_LIB_PATH"
62319  new_path=`$CYGPATH -u "$path"`
62320
62321  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62322  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62323  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62324  # "foo.exe" is OK but "foo" is an error.
62325  #
62326  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62327  # It is also a way to make sure we got the proper file name for the real test later on.
62328  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62329  if test "x$test_shortpath" = x; then
62330    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62331$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62332    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
62333  fi
62334
62335  # Call helper function which possibly converts this using DOS-style short mode.
62336  # If so, the updated path is stored in $new_path.
62337
62338  input_path="$new_path"
62339  # Check if we need to convert this using DOS-style short mode. If the path
62340  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62341  # take no chances and rewrite it.
62342  # Note: m4 eats our [], so we need to use [ and ] instead.
62343  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62344  if test "x$has_forbidden_chars" != x; then
62345    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62346    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62347    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62348    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62349      # Going to short mode and back again did indeed matter. Since short mode is
62350      # case insensitive, let's make it lowercase to improve readability.
62351      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62352      # Now convert it back to Unix-style (cygpath)
62353      input_path=`$CYGPATH -u "$shortmode_path"`
62354      new_path="$input_path"
62355    fi
62356  fi
62357
62358  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62359  if test "x$test_cygdrive_prefix" = x; then
62360    # As a simple fix, exclude /usr/bin since it's not a real path.
62361    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62362      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62363      # a path prefixed by /cygdrive for fixpath to work.
62364      new_path="$CYGWIN_ROOT_PATH$input_path"
62365    fi
62366  fi
62367
62368
62369  if test "x$path" != "x$new_path"; then
62370    FREETYPE_LIB_PATH="$new_path"
62371    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62372$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62373  fi
62374
62375    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62376
62377  path="$FREETYPE_LIB_PATH"
62378  has_colon=`$ECHO $path | $GREP ^.:`
62379  new_path="$path"
62380  if test "x$has_colon" = x; then
62381    # Not in mixed or Windows style, start by that.
62382    new_path=`cmd //c echo $path`
62383  fi
62384
62385
62386  input_path="$new_path"
62387  # Check if we need to convert this using DOS-style short mode. If the path
62388  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62389  # take no chances and rewrite it.
62390  # Note: m4 eats our [], so we need to use [ and ] instead.
62391  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62392  if test "x$has_forbidden_chars" != x; then
62393    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62394    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62395  fi
62396
62397
62398  windows_path="$new_path"
62399  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62400    unix_path=`$CYGPATH -u "$windows_path"`
62401    new_path="$unix_path"
62402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62403    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62404    new_path="$unix_path"
62405  fi
62406
62407  if test "x$path" != "x$new_path"; then
62408    FREETYPE_LIB_PATH="$new_path"
62409    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62410$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62411  fi
62412
62413  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62414  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62415
62416    else
62417      # We're on a unix platform. Hooray! :)
62418      path="$FREETYPE_LIB_PATH"
62419      has_space=`$ECHO "$path" | $GREP " "`
62420      if test "x$has_space" != x; then
62421        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62422$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62423        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62424      fi
62425
62426      # Use eval to expand a potential ~
62427      eval path="$path"
62428      if test ! -f "$path" && test ! -d "$path"; then
62429        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62430      fi
62431
62432      if test -d "$path"; then
62433        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62434      else
62435        dir="`$DIRNAME "$path"`"
62436        base="`$BASENAME "$path"`"
62437        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62438      fi
62439    fi
62440  fi
62441
62442      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62443        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
62444      else
62445        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
62446      fi
62447    fi
62448
62449    # Try to compile it
62450    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
62451$as_echo_n "checking if we can compile and link with freetype... " >&6; }
62452    ac_ext=cpp
62453ac_cpp='$CXXCPP $CPPFLAGS'
62454ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62455ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62456ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62457
62458    PREV_CXXCFLAGS="$CXXFLAGS"
62459    PREV_LIBS="$LIBS"
62460    PREV_CXX="$CXX"
62461    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
62462    LIBS="$LIBS $FREETYPE_LIBS"
62463    CXX="$FIXPATH $CXX"
62464    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62465/* end confdefs.h.  */
62466
62467          #include<ft2build.h>
62468          #include FT_FREETYPE_H
62469          int main () {
62470            FT_Init_FreeType(NULL);
62471            return 0;
62472          }
62473
62474_ACEOF
62475if ac_fn_cxx_try_link "$LINENO"; then :
62476
62477          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62478$as_echo "yes" >&6; }
62479
62480else
62481
62482          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62483$as_echo "no" >&6; }
62484          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
62485$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
62486          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
62487$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
62488
62489
62490  # Print a helpful message on how to acquire the necessary build dependency.
62491  # freetype is the help tag: freetype, cups, alsa etc
62492  MISSING_DEPENDENCY=freetype
62493
62494  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62495    cygwin_help $MISSING_DEPENDENCY
62496  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62497    msys_help $MISSING_DEPENDENCY
62498  else
62499    PKGHANDLER_COMMAND=
62500
62501    case $PKGHANDLER in
62502      apt-get)
62503        apt_help     $MISSING_DEPENDENCY ;;
62504      yum)
62505        yum_help     $MISSING_DEPENDENCY ;;
62506      port)
62507        port_help    $MISSING_DEPENDENCY ;;
62508      pkgutil)
62509        pkgutil_help $MISSING_DEPENDENCY ;;
62510      pkgadd)
62511        pkgadd_help  $MISSING_DEPENDENCY ;;
62512    esac
62513
62514    if test "x$PKGHANDLER_COMMAND" != x; then
62515      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62516    fi
62517  fi
62518
62519
62520          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
62521
62522
62523fi
62524rm -f core conftest.err conftest.$ac_objext \
62525    conftest$ac_exeext conftest.$ac_ext
62526    CXXCFLAGS="$PREV_CXXFLAGS"
62527    LIBS="$PREV_LIBS"
62528    CXX="$PREV_CXX"
62529    ac_ext=cpp
62530ac_cpp='$CXXCPP $CPPFLAGS'
62531ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62532ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62533ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62534
62535
62536    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
62537$as_echo_n "checking if we should bundle freetype... " >&6; }
62538    if test "x$BUNDLE_FREETYPE" = xyes; then
62539      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
62540    fi
62541    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
62542$as_echo "$BUNDLE_FREETYPE" >&6; }
62543
62544  fi # end freetype needed
62545
62546
62547
62548
62549
62550
62551
62552# Check whether --with-alsa was given.
62553if test "${with_alsa+set}" = set; then :
62554  withval=$with_alsa;
62555fi
62556
62557
62558# Check whether --with-alsa-include was given.
62559if test "${with_alsa_include+set}" = set; then :
62560  withval=$with_alsa_include;
62561fi
62562
62563
62564# Check whether --with-alsa-lib was given.
62565if test "${with_alsa_lib+set}" = set; then :
62566  withval=$with_alsa_lib;
62567fi
62568
62569
62570  if test "x$NEEDS_LIB_ALSA" = xfalse; then
62571    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
62572        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
62573        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
62574      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
62575$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
62576    fi
62577    ALSA_CFLAGS=
62578    ALSA_LIBS=
62579  else
62580    ALSA_FOUND=no
62581
62582    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
62583      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
62584    fi
62585
62586    if test "x${with_alsa}" != x; then
62587      ALSA_LIBS="-L${with_alsa}/lib -lasound"
62588      ALSA_CFLAGS="-I${with_alsa}/include"
62589      ALSA_FOUND=yes
62590    fi
62591    if test "x${with_alsa_include}" != x; then
62592      ALSA_CFLAGS="-I${with_alsa_include}"
62593      ALSA_FOUND=yes
62594    fi
62595    if test "x${with_alsa_lib}" != x; then
62596      ALSA_LIBS="-L${with_alsa_lib} -lasound"
62597      ALSA_FOUND=yes
62598    fi
62599    # Do not try pkg-config if we have a sysroot set.
62600    if test "x$SYSROOT" = x; then
62601      if test "x$ALSA_FOUND" = xno; then
62602
62603pkg_failed=no
62604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
62605$as_echo_n "checking for ALSA... " >&6; }
62606
62607if test -n "$ALSA_CFLAGS"; then
62608    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
62609 elif test -n "$PKG_CONFIG"; then
62610    if test -n "$PKG_CONFIG" && \
62611    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62612  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62613  ac_status=$?
62614  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62615  test $ac_status = 0; }; then
62616  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
62617else
62618  pkg_failed=yes
62619fi
62620 else
62621    pkg_failed=untried
62622fi
62623if test -n "$ALSA_LIBS"; then
62624    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
62625 elif test -n "$PKG_CONFIG"; then
62626    if test -n "$PKG_CONFIG" && \
62627    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62628  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62629  ac_status=$?
62630  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62631  test $ac_status = 0; }; then
62632  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
62633else
62634  pkg_failed=yes
62635fi
62636 else
62637    pkg_failed=untried
62638fi
62639
62640
62641
62642if test $pkg_failed = yes; then
62643
62644if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62645        _pkg_short_errors_supported=yes
62646else
62647        _pkg_short_errors_supported=no
62648fi
62649        if test $_pkg_short_errors_supported = yes; then
62650	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
62651        else
62652	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
62653        fi
62654	# Put the nasty error message in config.log where it belongs
62655	echo "$ALSA_PKG_ERRORS" >&5
62656
62657	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62658$as_echo "no" >&6; }
62659                ALSA_FOUND=no
62660elif test $pkg_failed = untried; then
62661	ALSA_FOUND=no
62662else
62663	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
62664	ALSA_LIBS=$pkg_cv_ALSA_LIBS
62665        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62666$as_echo "yes" >&6; }
62667	ALSA_FOUND=yes
62668fi
62669      fi
62670    fi
62671    if test "x$ALSA_FOUND" = xno; then
62672      for ac_header in alsa/asoundlib.h
62673do :
62674  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
62675if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
62676  cat >>confdefs.h <<_ACEOF
62677#define HAVE_ALSA_ASOUNDLIB_H 1
62678_ACEOF
62679
62680            ALSA_FOUND=yes
62681            ALSA_CFLAGS=-Iignoreme
62682            ALSA_LIBS=-lasound
62683            DEFAULT_ALSA=yes
62684
62685else
62686  ALSA_FOUND=no
62687
62688fi
62689
62690done
62691
62692    fi
62693    if test "x$ALSA_FOUND" = xno; then
62694
62695  # Print a helpful message on how to acquire the necessary build dependency.
62696  # alsa is the help tag: freetype, cups, alsa etc
62697  MISSING_DEPENDENCY=alsa
62698
62699  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62700    cygwin_help $MISSING_DEPENDENCY
62701  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62702    msys_help $MISSING_DEPENDENCY
62703  else
62704    PKGHANDLER_COMMAND=
62705
62706    case $PKGHANDLER in
62707      apt-get)
62708        apt_help     $MISSING_DEPENDENCY ;;
62709      yum)
62710        yum_help     $MISSING_DEPENDENCY ;;
62711      port)
62712        port_help    $MISSING_DEPENDENCY ;;
62713      pkgutil)
62714        pkgutil_help $MISSING_DEPENDENCY ;;
62715      pkgadd)
62716        pkgadd_help  $MISSING_DEPENDENCY ;;
62717    esac
62718
62719    if test "x$PKGHANDLER_COMMAND" != x; then
62720      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62721    fi
62722  fi
62723
62724      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
62725    fi
62726  fi
62727
62728
62729
62730
62731
62732
62733# Check whether --with-libffi was given.
62734if test "${with_libffi+set}" = set; then :
62735  withval=$with_libffi;
62736fi
62737
62738
62739# Check whether --with-libffi-include was given.
62740if test "${with_libffi_include+set}" = set; then :
62741  withval=$with_libffi_include;
62742fi
62743
62744
62745# Check whether --with-libffi-lib was given.
62746if test "${with_libffi_lib+set}" = set; then :
62747  withval=$with_libffi_lib;
62748fi
62749
62750
62751  if test "x$NEEDS_LIB_FFI" = xfalse; then
62752    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
62753        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
62754        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
62755      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
62756$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
62757    fi
62758    LIBFFI_CFLAGS=
62759    LIBFFI_LIBS=
62760  else
62761    LIBFFI_FOUND=no
62762
62763    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
62764      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
62765    fi
62766
62767    if test "x${with_libffi}" != x; then
62768      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
62769      LIBFFI_CFLAGS="-I${with_libffi}/include"
62770      LIBFFI_FOUND=yes
62771    fi
62772    if test "x${with_libffi_include}" != x; then
62773      LIBFFI_CFLAGS="-I${with_libffi_include}"
62774      LIBFFI_FOUND=yes
62775    fi
62776    if test "x${with_libffi_lib}" != x; then
62777      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
62778      LIBFFI_FOUND=yes
62779    fi
62780    # Do not try pkg-config if we have a sysroot set.
62781    if test "x$SYSROOT" = x; then
62782      if test "x$LIBFFI_FOUND" = xno; then
62783        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
62784
62785pkg_failed=no
62786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
62787$as_echo_n "checking for LIBFFI... " >&6; }
62788
62789if test -n "$LIBFFI_CFLAGS"; then
62790    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
62791 elif test -n "$PKG_CONFIG"; then
62792    if test -n "$PKG_CONFIG" && \
62793    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
62794  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
62795  ac_status=$?
62796  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62797  test $ac_status = 0; }; then
62798  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
62799else
62800  pkg_failed=yes
62801fi
62802 else
62803    pkg_failed=untried
62804fi
62805if test -n "$LIBFFI_LIBS"; then
62806    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
62807 elif test -n "$PKG_CONFIG"; then
62808    if test -n "$PKG_CONFIG" && \
62809    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
62810  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
62811  ac_status=$?
62812  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62813  test $ac_status = 0; }; then
62814  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
62815else
62816  pkg_failed=yes
62817fi
62818 else
62819    pkg_failed=untried
62820fi
62821
62822
62823
62824if test $pkg_failed = yes; then
62825
62826if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62827        _pkg_short_errors_supported=yes
62828else
62829        _pkg_short_errors_supported=no
62830fi
62831        if test $_pkg_short_errors_supported = yes; then
62832	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
62833        else
62834	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
62835        fi
62836	# Put the nasty error message in config.log where it belongs
62837	echo "$LIBFFI_PKG_ERRORS" >&5
62838
62839	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62840$as_echo "no" >&6; }
62841                LIBFFI_FOUND=no
62842elif test $pkg_failed = untried; then
62843	LIBFFI_FOUND=no
62844else
62845	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
62846	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
62847        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62848$as_echo "yes" >&6; }
62849	LIBFFI_FOUND=yes
62850fi
62851      fi
62852    fi
62853    if test "x$LIBFFI_FOUND" = xno; then
62854      for ac_header in ffi.h
62855do :
62856  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
62857if test "x$ac_cv_header_ffi_h" = xyes; then :
62858  cat >>confdefs.h <<_ACEOF
62859#define HAVE_FFI_H 1
62860_ACEOF
62861
62862            LIBFFI_FOUND=yes
62863            LIBFFI_CFLAGS=
62864            LIBFFI_LIBS=-lffi
62865
62866else
62867  LIBFFI_FOUND=no
62868
62869fi
62870
62871done
62872
62873    fi
62874    if test "x$LIBFFI_FOUND" = xno; then
62875
62876  # Print a helpful message on how to acquire the necessary build dependency.
62877  # ffi is the help tag: freetype, cups, alsa etc
62878  MISSING_DEPENDENCY=ffi
62879
62880  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62881    cygwin_help $MISSING_DEPENDENCY
62882  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62883    msys_help $MISSING_DEPENDENCY
62884  else
62885    PKGHANDLER_COMMAND=
62886
62887    case $PKGHANDLER in
62888      apt-get)
62889        apt_help     $MISSING_DEPENDENCY ;;
62890      yum)
62891        yum_help     $MISSING_DEPENDENCY ;;
62892      port)
62893        port_help    $MISSING_DEPENDENCY ;;
62894      pkgutil)
62895        pkgutil_help $MISSING_DEPENDENCY ;;
62896      pkgadd)
62897        pkgadd_help  $MISSING_DEPENDENCY ;;
62898    esac
62899
62900    if test "x$PKGHANDLER_COMMAND" != x; then
62901      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62902    fi
62903  fi
62904
62905      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
62906    fi
62907
62908    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
62909$as_echo_n "checking if libffi works... " >&6; }
62910    ac_ext=c
62911ac_cpp='$CPP $CPPFLAGS'
62912ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62913ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62914ac_compiler_gnu=$ac_cv_c_compiler_gnu
62915
62916    OLD_CFLAGS="$CFLAGS"
62917    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
62918    OLD_LIBS="$LIBS"
62919    LIBS="$LIBS $LIBFFI_LIBS"
62920    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62921/* end confdefs.h.  */
62922#include <ffi.h>
62923int
62924main ()
62925{
62926
62927          ffi_call(NULL, NULL, NULL, NULL);
62928          return 0;
62929
62930  ;
62931  return 0;
62932}
62933_ACEOF
62934if ac_fn_c_try_link "$LINENO"; then :
62935  LIBFFI_WORKS=yes
62936else
62937  LIBFFI_WORKS=no
62938
62939fi
62940rm -f core conftest.err conftest.$ac_objext \
62941    conftest$ac_exeext conftest.$ac_ext
62942    CFLAGS="$OLD_CFLAGS"
62943    LIBS="$OLD_LIBS"
62944    ac_ext=cpp
62945ac_cpp='$CXXCPP $CPPFLAGS'
62946ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62947ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62948ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62949
62950    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
62951$as_echo "$LIBFFI_WORKS" >&6; }
62952
62953    if test "x$LIBFFI_WORKS" = xno; then
62954
62955  # Print a helpful message on how to acquire the necessary build dependency.
62956  # ffi is the help tag: freetype, cups, alsa etc
62957  MISSING_DEPENDENCY=ffi
62958
62959  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62960    cygwin_help $MISSING_DEPENDENCY
62961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62962    msys_help $MISSING_DEPENDENCY
62963  else
62964    PKGHANDLER_COMMAND=
62965
62966    case $PKGHANDLER in
62967      apt-get)
62968        apt_help     $MISSING_DEPENDENCY ;;
62969      yum)
62970        yum_help     $MISSING_DEPENDENCY ;;
62971      port)
62972        port_help    $MISSING_DEPENDENCY ;;
62973      pkgutil)
62974        pkgutil_help $MISSING_DEPENDENCY ;;
62975      pkgadd)
62976        pkgadd_help  $MISSING_DEPENDENCY ;;
62977    esac
62978
62979    if test "x$PKGHANDLER_COMMAND" != x; then
62980      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62981    fi
62982  fi
62983
62984      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
62985    fi
62986  fi
62987
62988
62989
62990
62991
62992  if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
62993    # Extract the first word of "llvm-config", so it can be a program name with args.
62994set dummy llvm-config; ac_word=$2
62995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
62996$as_echo_n "checking for $ac_word... " >&6; }
62997if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
62998  $as_echo_n "(cached) " >&6
62999else
63000  if test -n "$LLVM_CONFIG"; then
63001  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
63002else
63003as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
63004for as_dir in $PATH
63005do
63006  IFS=$as_save_IFS
63007  test -z "$as_dir" && as_dir=.
63008    for ac_exec_ext in '' $ac_executable_extensions; do
63009  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
63010    ac_cv_prog_LLVM_CONFIG="llvm-config"
63011    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
63012    break 2
63013  fi
63014done
63015  done
63016IFS=$as_save_IFS
63017
63018fi
63019fi
63020LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
63021if test -n "$LLVM_CONFIG"; then
63022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
63023$as_echo "$LLVM_CONFIG" >&6; }
63024else
63025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63026$as_echo "no" >&6; }
63027fi
63028
63029
63030
63031    if test "x$LLVM_CONFIG" != xllvm-config; then
63032      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
63033    fi
63034
63035    llvm_components="jit mcjit engine nativecodegen native"
63036    unset LLVM_CFLAGS
63037    for flag in $("$LLVM_CONFIG" --cxxflags); do
63038      if echo "${flag}" | grep -q '^-[ID]'; then
63039        if test "${flag}" != "-D_DEBUG" ; then
63040          if test "${LLVM_CFLAGS}" != "" ; then
63041            LLVM_CFLAGS="${LLVM_CFLAGS} "
63042          fi
63043          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
63044        fi
63045      fi
63046    done
63047    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
63048    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
63049
63050    unset LLVM_LDFLAGS
63051    for flag in $("${LLVM_CONFIG}" --ldflags); do
63052      if echo "${flag}" | grep -q '^-L'; then
63053        if test "${LLVM_LDFLAGS}" != ""; then
63054          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
63055        fi
63056        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
63057      fi
63058    done
63059
63060    unset LLVM_LIBS
63061    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
63062      if echo "${flag}" | grep -q '^-l'; then
63063        if test "${LLVM_LIBS}" != ""; then
63064          LLVM_LIBS="${LLVM_LIBS} "
63065        fi
63066        LLVM_LIBS="${LLVM_LIBS}${flag}"
63067      fi
63068    done
63069
63070    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
63071    # always properly detect -ltinfo
63072    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
63073
63074
63075
63076
63077  fi
63078
63079
63080
63081# Check whether --with-libjpeg was given.
63082if test "${with_libjpeg+set}" = set; then :
63083  withval=$with_libjpeg;
63084fi
63085
63086
63087  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
63088$as_echo_n "checking for which libjpeg to use... " >&6; }
63089  # default is bundled
63090  DEFAULT_LIBJPEG=bundled
63091  # if user didn't specify, use DEFAULT_LIBJPEG
63092  if test "x${with_libjpeg}" = "x"; then
63093    with_libjpeg=${DEFAULT_LIBJPEG}
63094  fi
63095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
63096$as_echo "${with_libjpeg}" >&6; }
63097
63098  if test "x${with_libjpeg}" = "xbundled"; then
63099    USE_EXTERNAL_LIBJPEG=false
63100  elif test "x${with_libjpeg}" = "xsystem"; then
63101    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
63102if test "x$ac_cv_header_jpeglib_h" = xyes; then :
63103
63104else
63105   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
63106fi
63107
63108
63109    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
63110$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
63111if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
63112  $as_echo_n "(cached) " >&6
63113else
63114  ac_check_lib_save_LIBS=$LIBS
63115LIBS="-ljpeg  $LIBS"
63116cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63117/* end confdefs.h.  */
63118
63119/* Override any GCC internal prototype to avoid an error.
63120   Use char because int might match the return type of a GCC
63121   builtin and then its argument prototype would still apply.  */
63122#ifdef __cplusplus
63123extern "C"
63124#endif
63125char jpeg_CreateDecompress ();
63126int
63127main ()
63128{
63129return jpeg_CreateDecompress ();
63130  ;
63131  return 0;
63132}
63133_ACEOF
63134if ac_fn_cxx_try_link "$LINENO"; then :
63135  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
63136else
63137  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
63138fi
63139rm -f core conftest.err conftest.$ac_objext \
63140    conftest$ac_exeext conftest.$ac_ext
63141LIBS=$ac_check_lib_save_LIBS
63142fi
63143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
63144$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
63145if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
63146  cat >>confdefs.h <<_ACEOF
63147#define HAVE_LIBJPEG 1
63148_ACEOF
63149
63150  LIBS="-ljpeg $LIBS"
63151
63152else
63153   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
63154fi
63155
63156
63157    USE_EXTERNAL_LIBJPEG=true
63158  else
63159    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
63160  fi
63161
63162
63163
63164
63165
63166# Check whether --with-giflib was given.
63167if test "${with_giflib+set}" = set; then :
63168  withval=$with_giflib;
63169fi
63170
63171
63172  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
63173$as_echo_n "checking for which giflib to use... " >&6; }
63174  # default is bundled
63175  DEFAULT_GIFLIB=bundled
63176  # if user didn't specify, use DEFAULT_GIFLIB
63177  if test "x${with_giflib}" = "x"; then
63178    with_giflib=${DEFAULT_GIFLIB}
63179  fi
63180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
63181$as_echo "${with_giflib}" >&6; }
63182
63183  if test "x${with_giflib}" = "xbundled"; then
63184    USE_EXTERNAL_LIBGIF=false
63185  elif test "x${with_giflib}" = "xsystem"; then
63186    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
63187if test "x$ac_cv_header_gif_lib_h" = xyes; then :
63188
63189else
63190   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
63191fi
63192
63193
63194    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
63195$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
63196if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
63197  $as_echo_n "(cached) " >&6
63198else
63199  ac_check_lib_save_LIBS=$LIBS
63200LIBS="-lgif  $LIBS"
63201cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63202/* end confdefs.h.  */
63203
63204/* Override any GCC internal prototype to avoid an error.
63205   Use char because int might match the return type of a GCC
63206   builtin and then its argument prototype would still apply.  */
63207#ifdef __cplusplus
63208extern "C"
63209#endif
63210char DGifGetCode ();
63211int
63212main ()
63213{
63214return DGifGetCode ();
63215  ;
63216  return 0;
63217}
63218_ACEOF
63219if ac_fn_cxx_try_link "$LINENO"; then :
63220  ac_cv_lib_gif_DGifGetCode=yes
63221else
63222  ac_cv_lib_gif_DGifGetCode=no
63223fi
63224rm -f core conftest.err conftest.$ac_objext \
63225    conftest$ac_exeext conftest.$ac_ext
63226LIBS=$ac_check_lib_save_LIBS
63227fi
63228{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
63229$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
63230if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
63231  cat >>confdefs.h <<_ACEOF
63232#define HAVE_LIBGIF 1
63233_ACEOF
63234
63235  LIBS="-lgif $LIBS"
63236
63237else
63238   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
63239fi
63240
63241
63242    USE_EXTERNAL_LIBGIF=true
63243  else
63244    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
63245  fi
63246
63247
63248
63249
63250
63251# Check whether --with-libpng was given.
63252if test "${with_libpng+set}" = set; then :
63253  withval=$with_libpng;
63254fi
63255
63256
63257  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
63258$as_echo_n "checking for which libpng to use... " >&6; }
63259
63260  # default is bundled
63261  DEFAULT_LIBPNG=bundled
63262  # if user didn't specify, use DEFAULT_LIBPNG
63263  if test "x${with_libpng}" = "x"; then
63264      with_libpng=${DEFAULT_LIBPNG}
63265  fi
63266
63267  if test "x${with_libpng}" = "xbundled"; then
63268      USE_EXTERNAL_LIBPNG=false
63269      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63270$as_echo "bundled" >&6; }
63271  elif test "x${with_libpng}" = "xsystem"; then
63272
63273pkg_failed=no
63274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
63275$as_echo_n "checking for PNG... " >&6; }
63276
63277if test -n "$PNG_CFLAGS"; then
63278    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
63279 elif test -n "$PKG_CONFIG"; then
63280    if test -n "$PKG_CONFIG" && \
63281    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63282  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63283  ac_status=$?
63284  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63285  test $ac_status = 0; }; then
63286  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
63287else
63288  pkg_failed=yes
63289fi
63290 else
63291    pkg_failed=untried
63292fi
63293if test -n "$PNG_LIBS"; then
63294    pkg_cv_PNG_LIBS="$PNG_LIBS"
63295 elif test -n "$PKG_CONFIG"; then
63296    if test -n "$PKG_CONFIG" && \
63297    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63298  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63299  ac_status=$?
63300  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63301  test $ac_status = 0; }; then
63302  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
63303else
63304  pkg_failed=yes
63305fi
63306 else
63307    pkg_failed=untried
63308fi
63309
63310
63311
63312if test $pkg_failed = yes; then
63313
63314if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63315        _pkg_short_errors_supported=yes
63316else
63317        _pkg_short_errors_supported=no
63318fi
63319        if test $_pkg_short_errors_supported = yes; then
63320	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
63321        else
63322	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
63323        fi
63324	# Put the nasty error message in config.log where it belongs
63325	echo "$PNG_PKG_ERRORS" >&5
63326
63327	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63328$as_echo "no" >&6; }
63329                 LIBPNG_FOUND=no
63330elif test $pkg_failed = untried; then
63331	 LIBPNG_FOUND=no
63332else
63333	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
63334	PNG_LIBS=$pkg_cv_PNG_LIBS
63335        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63336$as_echo "yes" >&6; }
63337	 LIBPNG_FOUND=yes
63338fi
63339      if test "x${LIBPNG_FOUND}" = "xyes"; then
63340          USE_EXTERNAL_LIBPNG=true
63341          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63342$as_echo "system" >&6; }
63343      else
63344          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63345$as_echo "system not found" >&6; }
63346          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
63347      fi
63348  else
63349      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
63350  fi
63351
63352
63353
63354
63355
63356# Check whether --with-zlib was given.
63357if test "${with_zlib+set}" = set; then :
63358  withval=$with_zlib;
63359fi
63360
63361
63362  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
63363$as_echo_n "checking for compress in -lz... " >&6; }
63364if ${ac_cv_lib_z_compress+:} false; then :
63365  $as_echo_n "(cached) " >&6
63366else
63367  ac_check_lib_save_LIBS=$LIBS
63368LIBS="-lz  $LIBS"
63369cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63370/* end confdefs.h.  */
63371
63372/* Override any GCC internal prototype to avoid an error.
63373   Use char because int might match the return type of a GCC
63374   builtin and then its argument prototype would still apply.  */
63375#ifdef __cplusplus
63376extern "C"
63377#endif
63378char compress ();
63379int
63380main ()
63381{
63382return compress ();
63383  ;
63384  return 0;
63385}
63386_ACEOF
63387if ac_fn_cxx_try_link "$LINENO"; then :
63388  ac_cv_lib_z_compress=yes
63389else
63390  ac_cv_lib_z_compress=no
63391fi
63392rm -f core conftest.err conftest.$ac_objext \
63393    conftest$ac_exeext conftest.$ac_ext
63394LIBS=$ac_check_lib_save_LIBS
63395fi
63396{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
63397$as_echo "$ac_cv_lib_z_compress" >&6; }
63398if test "x$ac_cv_lib_z_compress" = xyes; then :
63399   ZLIB_FOUND=yes
63400else
63401   ZLIB_FOUND=no
63402fi
63403
63404
63405  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
63406$as_echo_n "checking for which zlib to use... " >&6; }
63407
63408  DEFAULT_ZLIB=system
63409  if test "x$OPENJDK_TARGET_OS" = xwindows; then
63410    # On windows default is bundled...on others default is system
63411    DEFAULT_ZLIB=bundled
63412  fi
63413
63414  if test "x${ZLIB_FOUND}" != "xyes"; then
63415    # If we don't find any system...set default to bundled
63416    DEFAULT_ZLIB=bundled
63417  fi
63418
63419  # If user didn't specify, use DEFAULT_ZLIB
63420  if test "x${with_zlib}" = "x"; then
63421    with_zlib=${DEFAULT_ZLIB}
63422  fi
63423
63424  if test "x${with_zlib}" = "xbundled"; then
63425    USE_EXTERNAL_LIBZ=false
63426    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63427$as_echo "bundled" >&6; }
63428  elif test "x${with_zlib}" = "xsystem"; then
63429    if test "x${ZLIB_FOUND}" = "xyes"; then
63430      USE_EXTERNAL_LIBZ=true
63431      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63432$as_echo "system" >&6; }
63433    else
63434      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63435$as_echo "system not found" >&6; }
63436      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
63437    fi
63438  else
63439    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
63440  fi
63441
63442
63443
63444
63445
63446# Check whether --with-lcms was given.
63447if test "${with_lcms+set}" = set; then :
63448  withval=$with_lcms;
63449fi
63450
63451
63452  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
63453$as_echo_n "checking for which lcms to use... " >&6; }
63454
63455  DEFAULT_LCMS=bundled
63456  # If user didn't specify, use DEFAULT_LCMS
63457  if test "x${with_lcms}" = "x"; then
63458      with_lcms=${DEFAULT_LCMS}
63459  fi
63460
63461  if test "x${with_lcms}" = "xbundled"; then
63462    USE_EXTERNAL_LCMS=false
63463    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63464$as_echo "bundled" >&6; }
63465  elif test "x${with_lcms}" = "xsystem"; then
63466    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63467$as_echo "system" >&6; }
63468
63469pkg_failed=no
63470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
63471$as_echo_n "checking for LCMS... " >&6; }
63472
63473if test -n "$LCMS_CFLAGS"; then
63474    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
63475 elif test -n "$PKG_CONFIG"; then
63476    if test -n "$PKG_CONFIG" && \
63477    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63478  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63479  ac_status=$?
63480  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63481  test $ac_status = 0; }; then
63482  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
63483else
63484  pkg_failed=yes
63485fi
63486 else
63487    pkg_failed=untried
63488fi
63489if test -n "$LCMS_LIBS"; then
63490    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
63491 elif test -n "$PKG_CONFIG"; then
63492    if test -n "$PKG_CONFIG" && \
63493    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63494  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63495  ac_status=$?
63496  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63497  test $ac_status = 0; }; then
63498  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
63499else
63500  pkg_failed=yes
63501fi
63502 else
63503    pkg_failed=untried
63504fi
63505
63506
63507
63508if test $pkg_failed = yes; then
63509
63510if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63511        _pkg_short_errors_supported=yes
63512else
63513        _pkg_short_errors_supported=no
63514fi
63515        if test $_pkg_short_errors_supported = yes; then
63516	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
63517        else
63518	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
63519        fi
63520	# Put the nasty error message in config.log where it belongs
63521	echo "$LCMS_PKG_ERRORS" >&5
63522
63523	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63524$as_echo "no" >&6; }
63525                LCMS_FOUND=no
63526elif test $pkg_failed = untried; then
63527	LCMS_FOUND=no
63528else
63529	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
63530	LCMS_LIBS=$pkg_cv_LCMS_LIBS
63531        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63532$as_echo "yes" >&6; }
63533	LCMS_FOUND=yes
63534fi
63535    if test "x${LCMS_FOUND}" = "xyes"; then
63536      USE_EXTERNAL_LCMS=true
63537    else
63538      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
63539    fi
63540  else
63541    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
63542  fi
63543
63544
63545
63546
63547
63548
63549
63550
63551
63552
63553
63554  # Setup libm (the maths library)
63555  if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
63556    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
63557$as_echo_n "checking for cos in -lm... " >&6; }
63558if ${ac_cv_lib_m_cos+:} false; then :
63559  $as_echo_n "(cached) " >&6
63560else
63561  ac_check_lib_save_LIBS=$LIBS
63562LIBS="-lm  $LIBS"
63563cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63564/* end confdefs.h.  */
63565
63566/* Override any GCC internal prototype to avoid an error.
63567   Use char because int might match the return type of a GCC
63568   builtin and then its argument prototype would still apply.  */
63569#ifdef __cplusplus
63570extern "C"
63571#endif
63572char cos ();
63573int
63574main ()
63575{
63576return cos ();
63577  ;
63578  return 0;
63579}
63580_ACEOF
63581if ac_fn_cxx_try_link "$LINENO"; then :
63582  ac_cv_lib_m_cos=yes
63583else
63584  ac_cv_lib_m_cos=no
63585fi
63586rm -f core conftest.err conftest.$ac_objext \
63587    conftest$ac_exeext conftest.$ac_ext
63588LIBS=$ac_check_lib_save_LIBS
63589fi
63590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
63591$as_echo "$ac_cv_lib_m_cos" >&6; }
63592if test "x$ac_cv_lib_m_cos" = xyes; then :
63593  cat >>confdefs.h <<_ACEOF
63594#define HAVE_LIBM 1
63595_ACEOF
63596
63597  LIBS="-lm $LIBS"
63598
63599else
63600
63601        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
63602$as_echo "$as_me: Maths library was not found" >&6;}
63603
63604fi
63605
63606    LIBM="-lm"
63607  else
63608    LIBM=""
63609  fi
63610
63611
63612  # Setup libdl (for dynamic library loading)
63613  save_LIBS="$LIBS"
63614  LIBS=""
63615  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
63616$as_echo_n "checking for dlopen in -ldl... " >&6; }
63617if ${ac_cv_lib_dl_dlopen+:} false; then :
63618  $as_echo_n "(cached) " >&6
63619else
63620  ac_check_lib_save_LIBS=$LIBS
63621LIBS="-ldl  $LIBS"
63622cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63623/* end confdefs.h.  */
63624
63625/* Override any GCC internal prototype to avoid an error.
63626   Use char because int might match the return type of a GCC
63627   builtin and then its argument prototype would still apply.  */
63628#ifdef __cplusplus
63629extern "C"
63630#endif
63631char dlopen ();
63632int
63633main ()
63634{
63635return dlopen ();
63636  ;
63637  return 0;
63638}
63639_ACEOF
63640if ac_fn_cxx_try_link "$LINENO"; then :
63641  ac_cv_lib_dl_dlopen=yes
63642else
63643  ac_cv_lib_dl_dlopen=no
63644fi
63645rm -f core conftest.err conftest.$ac_objext \
63646    conftest$ac_exeext conftest.$ac_ext
63647LIBS=$ac_check_lib_save_LIBS
63648fi
63649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
63650$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
63651if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
63652  cat >>confdefs.h <<_ACEOF
63653#define HAVE_LIBDL 1
63654_ACEOF
63655
63656  LIBS="-ldl $LIBS"
63657
63658fi
63659
63660  LIBDL="$LIBS"
63661
63662  LIBS="$save_LIBS"
63663
63664  # Deprecated libraries, keep the flags for backwards compatibility
63665  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
63666
63667
63668# Check whether --with-dxsdk was given.
63669if test "${with_dxsdk+set}" = set; then :
63670  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
63671$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
63672fi
63673
63674
63675
63676
63677# Check whether --with-dxsdk-lib was given.
63678if test "${with_dxsdk_lib+set}" = set; then :
63679  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
63680$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
63681fi
63682
63683
63684
63685
63686# Check whether --with-dxsdk-include was given.
63687if test "${with_dxsdk_include+set}" = set; then :
63688  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
63689$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
63690fi
63691
63692
63693  fi
63694
63695  # Control if libzip can use mmap. Available for purposes of overriding.
63696  LIBZIP_CAN_USE_MMAP=true
63697
63698
63699
63700
63701
63702
63703
63704
63705
63706
63707
63708
63709
63710
63711###############################################################################
63712#
63713# We need to do some final tweaking, when everything else is done.
63714#
63715###############################################################################
63716
63717
63718  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
63719$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
63720
63721  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
63722    ENABLE_INTREE_EC=yes
63723    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63724$as_echo "yes" >&6; }
63725  else
63726    ENABLE_INTREE_EC=no
63727    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63728$as_echo "no" >&6; }
63729  fi
63730
63731
63732
63733
63734  # Check whether --enable-jtreg-failure-handler was given.
63735if test "${enable_jtreg_failure_handler+set}" = set; then :
63736  enableval=$enable_jtreg_failure_handler;
63737fi
63738
63739
63740  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
63741$as_echo_n "checking if jtreg failure handler should be built... " >&6; }
63742
63743  if test "x$enable_jtreg_failure_handler" = "xyes"; then
63744    if test "x$JT_HOME" = "x"; then
63745      as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
63746    else
63747      BUILD_FAILURE_HANDLER=true
63748      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
63749$as_echo "yes, forced" >&6; }
63750    fi
63751  elif test "x$enable_jtreg_failure_handler" = "xno"; then
63752    BUILD_FAILURE_HANDLER=false
63753    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
63754$as_echo "no, forced" >&6; }
63755  elif test "x$enable_jtreg_failure_handler" = "xauto" \
63756      || test "x$enable_jtreg_failure_handler" = "x"; then
63757    if test "x$JT_HOME" = "x"; then
63758      BUILD_FAILURE_HANDLER=false
63759      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
63760$as_echo "no, missing jtreg" >&6; }
63761    else
63762      BUILD_FAILURE_HANDLER=true
63763      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
63764$as_echo "yes, jtreg present" >&6; }
63765    fi
63766  else
63767    as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
63768  fi
63769
63770
63771
63772
63773###############################################################################
63774#
63775# Configure parts of the build that only affect the build performance,
63776# not the result.
63777#
63778###############################################################################
63779
63780
63781  # How many cores do we have on this build system?
63782
63783# Check whether --with-num-cores was given.
63784if test "${with_num_cores+set}" = set; then :
63785  withval=$with_num_cores;
63786fi
63787
63788  if test "x$with_num_cores" = x; then
63789    # The number of cores were not specified, try to probe them.
63790
63791  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
63792$as_echo_n "checking for number of cores... " >&6; }
63793  NUM_CORES=1
63794  FOUND_CORES=no
63795
63796  if test -f /proc/cpuinfo; then
63797    # Looks like a Linux (or cygwin) system
63798    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
63799    FOUND_CORES=yes
63800  elif test -x /usr/sbin/psrinfo; then
63801    # Looks like a Solaris system
63802    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
63803    FOUND_CORES=yes
63804  elif test -x /usr/sbin/sysctl; then
63805    # Looks like a MacOSX system
63806    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
63807    FOUND_CORES=yes
63808  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
63809    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
63810    FOUND_CORES=yes
63811  elif test -n "$NUMBER_OF_PROCESSORS"; then
63812    # On windows, look in the env
63813    NUM_CORES=$NUMBER_OF_PROCESSORS
63814    FOUND_CORES=yes
63815  fi
63816
63817  if test "x$FOUND_CORES" = xyes; then
63818    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
63819$as_echo "$NUM_CORES" >&6; }
63820  else
63821    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
63822$as_echo "could not detect number of cores, defaulting to 1" >&6; }
63823    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
63824$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
63825  fi
63826
63827  else
63828    NUM_CORES=$with_num_cores
63829  fi
63830
63831
63832
63833  # How much memory do we have on this build system?
63834
63835# Check whether --with-memory-size was given.
63836if test "${with_memory_size+set}" = set; then :
63837  withval=$with_memory_size;
63838fi
63839
63840  if test "x$with_memory_size" = x; then
63841    # The memory size was not specified, try to probe it.
63842
63843  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
63844$as_echo_n "checking for memory size... " >&6; }
63845  # Default to 1024 MB
63846  MEMORY_SIZE=1024
63847  FOUND_MEM=no
63848
63849  if test -f /proc/meminfo; then
63850    # Looks like a Linux (or cygwin) system
63851    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
63852    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
63853    FOUND_MEM=yes
63854  elif test -x /usr/sbin/prtconf; then
63855    # Looks like a Solaris or AIX system
63856    MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
63857    FOUND_MEM=yes
63858  elif test -x /usr/sbin/sysctl; then
63859    # Looks like a MacOSX system
63860    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
63861    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
63862    FOUND_MEM=yes
63863  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
63864    # Windows, but without cygwin
63865    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
63866    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
63867    FOUND_MEM=yes
63868  fi
63869
63870  if test "x$FOUND_MEM" = xyes; then
63871    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
63872$as_echo "$MEMORY_SIZE MB" >&6; }
63873  else
63874    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
63875$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
63876    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
63877$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
63878  fi
63879
63880  else
63881    MEMORY_SIZE=$with_memory_size
63882  fi
63883
63884
63885
63886  # Provide a decent default number of parallel jobs for make depending on
63887  # number of cores, amount of memory and machine architecture.
63888
63889# Check whether --with-jobs was given.
63890if test "${with_jobs+set}" = set; then :
63891  withval=$with_jobs;
63892fi
63893
63894  if test "x$with_jobs" = x; then
63895    # Number of jobs was not specified, calculate.
63896    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
63897$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
63898    # Approximate memory in GB.
63899    memory_gb=`expr $MEMORY_SIZE / 1024`
63900    # Pick the lowest of memory in gb and number of cores.
63901    if test "$memory_gb" -lt "$NUM_CORES"; then
63902      JOBS="$memory_gb"
63903    else
63904      JOBS="$NUM_CORES"
63905    fi
63906    if test "$JOBS" -eq "0"; then
63907      JOBS=1
63908    fi
63909    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
63910$as_echo "$JOBS" >&6; }
63911  else
63912    JOBS=$with_jobs
63913  fi
63914
63915
63916
63917  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
63918
63919# Check whether --with-test-jobs was given.
63920if test "${with_test_jobs+set}" = set; then :
63921  withval=$with_test_jobs;
63922fi
63923
63924  if test "x$with_test_jobs" = x; then
63925      TEST_JOBS=0
63926  else
63927      TEST_JOBS=$with_test_jobs
63928  fi
63929
63930
63931
63932# Setup arguments for the boot jdk (after cores and memory have been setup)
63933
63934  ##############################################################################
63935  #
63936  # Specify jvm options for anything that is run with the Boot JDK.
63937  # Not all JVM:s accept the same arguments on the command line.
63938  #
63939
63940# Check whether --with-boot-jdk-jvmargs was given.
63941if test "${with_boot_jdk_jvmargs+set}" = set; then :
63942  withval=$with_boot_jdk_jvmargs;
63943fi
63944
63945
63946  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
63947$as_echo_n "checking flags for boot jdk java command ... " >&6; }
63948
63949  # Disable special log output when a debug build is used as Boot JDK...
63950
63951  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
63952  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
63953  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
63954  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
63955  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
63956  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
63957    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
63958    JVM_ARG_OK=true
63959  else
63960    $ECHO "Arg failed:" >&5
63961    $ECHO "$OUTPUT" >&5
63962    JVM_ARG_OK=false
63963  fi
63964
63965
63966  # Apply user provided options.
63967
63968  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
63969  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
63970  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
63971  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
63972  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
63973  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
63974    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
63975    JVM_ARG_OK=true
63976  else
63977    $ECHO "Arg failed:" >&5
63978    $ECHO "$OUTPUT" >&5
63979    JVM_ARG_OK=false
63980  fi
63981
63982
63983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
63984$as_echo "$boot_jdk_jvmargs" >&6; }
63985
63986  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
63987  JAVA_FLAGS=$boot_jdk_jvmargs
63988
63989
63990
63991  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
63992$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
63993
63994  # Starting amount of heap memory.
63995
63996  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
63997  $ECHO "Command: $JAVA -Xms64M -version" >&5
63998  OUTPUT=`$JAVA -Xms64M -version 2>&1`
63999  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64000  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64001  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64002    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
64003    JVM_ARG_OK=true
64004  else
64005    $ECHO "Arg failed:" >&5
64006    $ECHO "$OUTPUT" >&5
64007    JVM_ARG_OK=false
64008  fi
64009
64010
64011  # Maximum amount of heap memory.
64012  # Maximum stack size.
64013  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
64014  if test "x$BOOT_JDK_BITS" = "x32"; then
64015    if test "$JVM_MAX_HEAP" -gt "1100"; then
64016      JVM_MAX_HEAP=1100
64017    elif test "$JVM_MAX_HEAP" -lt "512"; then
64018      JVM_MAX_HEAP=512
64019    fi
64020    STACK_SIZE=768
64021  else
64022    # Running a 64 bit JVM allows for and requires a bigger heap
64023    if test "$JVM_MAX_HEAP" -gt "1600"; then
64024      JVM_MAX_HEAP=1600
64025    elif test "$JVM_MAX_HEAP" -lt "512"; then
64026      JVM_MAX_HEAP=512
64027    fi
64028    STACK_SIZE=1536
64029  fi
64030
64031  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
64032  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
64033  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
64034  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64035  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64036  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64037    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
64038    JVM_ARG_OK=true
64039  else
64040    $ECHO "Arg failed:" >&5
64041    $ECHO "$OUTPUT" >&5
64042    JVM_ARG_OK=false
64043  fi
64044
64045
64046  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
64047  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
64048  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
64049  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64050  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64051  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64052    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
64053    JVM_ARG_OK=true
64054  else
64055    $ECHO "Arg failed:" >&5
64056    $ECHO "$OUTPUT" >&5
64057    JVM_ARG_OK=false
64058  fi
64059
64060
64061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
64062$as_echo "$boot_jdk_jvmargs_big" >&6; }
64063
64064  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
64065
64066
64067  # By default, the main javac compilations use big
64068  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
64069
64070
64071  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
64072$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
64073
64074  # Use serial gc for small short lived tools if possible
64075
64076  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
64077  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
64078  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
64079  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64080  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64081  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64082    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
64083    JVM_ARG_OK=true
64084  else
64085    $ECHO "Arg failed:" >&5
64086    $ECHO "$OUTPUT" >&5
64087    JVM_ARG_OK=false
64088  fi
64089
64090
64091  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
64092  $ECHO "Command: $JAVA -Xms32M -version" >&5
64093  OUTPUT=`$JAVA -Xms32M -version 2>&1`
64094  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64095  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64096  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64097    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
64098    JVM_ARG_OK=true
64099  else
64100    $ECHO "Arg failed:" >&5
64101    $ECHO "$OUTPUT" >&5
64102    JVM_ARG_OK=false
64103  fi
64104
64105
64106  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
64107  $ECHO "Command: $JAVA -Xmx512M -version" >&5
64108  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
64109  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64110  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64111  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64112    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
64113    JVM_ARG_OK=true
64114  else
64115    $ECHO "Arg failed:" >&5
64116    $ECHO "$OUTPUT" >&5
64117    JVM_ARG_OK=false
64118  fi
64119
64120
64121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
64122$as_echo "$boot_jdk_jvmargs_small" >&6; }
64123
64124  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
64125
64126
64127  JAVA_TOOL_FLAGS_SMALL=""
64128  for f in $JAVA_FLAGS_SMALL; do
64129    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
64130  done
64131
64132
64133
64134# Setup smart javac (after cores and memory have been setup)
64135
64136
64137# Check whether --with-sjavac-server-java was given.
64138if test "${with_sjavac_server_java+set}" = set; then :
64139  withval=$with_sjavac_server_java;
64140fi
64141
64142
64143  if test "x$with_sjavac_server_java" != x; then
64144    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
64145    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
64146    if test "x$FOUND_VERSION" = x; then
64147      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
64148    fi
64149  else
64150    SJAVAC_SERVER_JAVA="$JAVA"
64151  fi
64152
64153
64154  if test "$MEMORY_SIZE" -gt "3000"; then
64155
64156  $ECHO "Check if jvm arg is ok: -d64" >&5
64157  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
64158  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
64159  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64160  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64161  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64162    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
64163    JVM_ARG_OK=true
64164  else
64165    $ECHO "Arg failed:" >&5
64166    $ECHO "$OUTPUT" >&5
64167    JVM_ARG_OK=false
64168  fi
64169
64170    if test "$JVM_ARG_OK" = true; then
64171      JVM_64BIT=true
64172      JVM_ARG_OK=false
64173    fi
64174  fi
64175
64176  MX_VALUE=`expr $MEMORY_SIZE / 2`
64177  if test "$JVM_64BIT" = true; then
64178    # Set ms lower than mx since more than one instance of the server might
64179    # get launched at the same time before they figure out which instance won.
64180    MS_VALUE=512
64181    if test "$MX_VALUE" -gt "2048"; then
64182      MX_VALUE=2048
64183    fi
64184  else
64185    MS_VALUE=256
64186    if test "$MX_VALUE" -gt "1500"; then
64187      MX_VALUE=1500
64188    fi
64189  fi
64190  if test "$MX_VALUE" -lt "512"; then
64191    MX_VALUE=512
64192  fi
64193
64194  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
64195  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
64196  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
64197  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64198  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64199  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64200    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
64201    JVM_ARG_OK=true
64202  else
64203    $ECHO "Arg failed:" >&5
64204    $ECHO "$OUTPUT" >&5
64205    JVM_ARG_OK=false
64206  fi
64207
64208
64209
64210  # Check whether --enable-sjavac was given.
64211if test "${enable_sjavac+set}" = set; then :
64212  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
64213else
64214  ENABLE_SJAVAC="no"
64215fi
64216
64217  if test "x$JVM_ARG_OK" = "xfalse"; then
64218    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
64219$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
64220    ENABLE_SJAVAC="no"
64221  fi
64222  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
64223$as_echo_n "checking whether to use sjavac... " >&6; }
64224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
64225$as_echo "$ENABLE_SJAVAC" >&6; }
64226
64227
64228  # Check whether --enable-javac-server was given.
64229if test "${enable_javac_server+set}" = set; then :
64230  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
64231else
64232  ENABLE_JAVAC_SERVER="yes"
64233fi
64234
64235  if test "x$JVM_ARG_OK" = "xfalse"; then
64236    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
64237$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
64238    ENABLE_JAVAC_SERVER="no"
64239  fi
64240  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
64241$as_echo_n "checking whether to use javac server... " >&6; }
64242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
64243$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
64244
64245
64246  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
64247    # When using a server javac, the small client instances do not need much
64248    # resources.
64249    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
64250  fi
64251
64252
64253# Setup use of icecc if requested
64254
64255  # Check whether --enable-icecc was given.
64256if test "${enable_icecc+set}" = set; then :
64257  enableval=$enable_icecc;
64258fi
64259
64260
64261  if test "x${enable_icecc}" = "xyes"; then
64262
64263
64264
64265  # Publish this variable in the help.
64266
64267
64268  if [ -z "${ICECC_CMD+x}" ]; then
64269    # The variable is not set by user, try to locate tool using the code snippet
64270    for ac_prog in icecc
64271do
64272  # Extract the first word of "$ac_prog", so it can be a program name with args.
64273set dummy $ac_prog; ac_word=$2
64274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64275$as_echo_n "checking for $ac_word... " >&6; }
64276if ${ac_cv_path_ICECC_CMD+:} false; then :
64277  $as_echo_n "(cached) " >&6
64278else
64279  case $ICECC_CMD in
64280  [\\/]* | ?:[\\/]*)
64281  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64282  ;;
64283  *)
64284  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64285for as_dir in $PATH
64286do
64287  IFS=$as_save_IFS
64288  test -z "$as_dir" && as_dir=.
64289    for ac_exec_ext in '' $ac_executable_extensions; do
64290  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64291    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64292    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64293    break 2
64294  fi
64295done
64296  done
64297IFS=$as_save_IFS
64298
64299  ;;
64300esac
64301fi
64302ICECC_CMD=$ac_cv_path_ICECC_CMD
64303if test -n "$ICECC_CMD"; then
64304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64305$as_echo "$ICECC_CMD" >&6; }
64306else
64307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64308$as_echo "no" >&6; }
64309fi
64310
64311
64312  test -n "$ICECC_CMD" && break
64313done
64314
64315  else
64316    # The variable is set, but is it from the command line or the environment?
64317
64318    # Try to remove the string !ICECC_CMD! from our list.
64319    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
64320    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64321      # If it failed, the variable was not from the command line. Ignore it,
64322      # but warn the user (except for BASH, which is always set by the calling BASH).
64323      if test "xICECC_CMD" != xBASH; then
64324        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
64325$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
64326      fi
64327      # Try to locate tool using the code snippet
64328      for ac_prog in icecc
64329do
64330  # Extract the first word of "$ac_prog", so it can be a program name with args.
64331set dummy $ac_prog; ac_word=$2
64332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64333$as_echo_n "checking for $ac_word... " >&6; }
64334if ${ac_cv_path_ICECC_CMD+:} false; then :
64335  $as_echo_n "(cached) " >&6
64336else
64337  case $ICECC_CMD in
64338  [\\/]* | ?:[\\/]*)
64339  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64340  ;;
64341  *)
64342  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64343for as_dir in $PATH
64344do
64345  IFS=$as_save_IFS
64346  test -z "$as_dir" && as_dir=.
64347    for ac_exec_ext in '' $ac_executable_extensions; do
64348  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64349    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64350    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64351    break 2
64352  fi
64353done
64354  done
64355IFS=$as_save_IFS
64356
64357  ;;
64358esac
64359fi
64360ICECC_CMD=$ac_cv_path_ICECC_CMD
64361if test -n "$ICECC_CMD"; then
64362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64363$as_echo "$ICECC_CMD" >&6; }
64364else
64365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64366$as_echo "no" >&6; }
64367fi
64368
64369
64370  test -n "$ICECC_CMD" && break
64371done
64372
64373    else
64374      # If it succeeded, then it was overridden by the user. We will use it
64375      # for the tool.
64376
64377      # First remove it from the list of overridden variables, so we can test
64378      # for unknown variables in the end.
64379      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64380
64381      # Check if we try to supply an empty value
64382      if test "x$ICECC_CMD" = x; then
64383        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
64384$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
64385        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
64386$as_echo_n "checking for ICECC_CMD... " >&6; }
64387        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64388$as_echo "disabled" >&6; }
64389      else
64390        # Check if the provided tool contains a complete path.
64391        tool_specified="$ICECC_CMD"
64392        tool_basename="${tool_specified##*/}"
64393        if test "x$tool_basename" = "x$tool_specified"; then
64394          # A command without a complete path is provided, search $PATH.
64395          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
64396$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
64397          # Extract the first word of "$tool_basename", so it can be a program name with args.
64398set dummy $tool_basename; ac_word=$2
64399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64400$as_echo_n "checking for $ac_word... " >&6; }
64401if ${ac_cv_path_ICECC_CMD+:} false; then :
64402  $as_echo_n "(cached) " >&6
64403else
64404  case $ICECC_CMD in
64405  [\\/]* | ?:[\\/]*)
64406  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64407  ;;
64408  *)
64409  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64410for as_dir in $PATH
64411do
64412  IFS=$as_save_IFS
64413  test -z "$as_dir" && as_dir=.
64414    for ac_exec_ext in '' $ac_executable_extensions; do
64415  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64416    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64417    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64418    break 2
64419  fi
64420done
64421  done
64422IFS=$as_save_IFS
64423
64424  ;;
64425esac
64426fi
64427ICECC_CMD=$ac_cv_path_ICECC_CMD
64428if test -n "$ICECC_CMD"; then
64429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64430$as_echo "$ICECC_CMD" >&6; }
64431else
64432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64433$as_echo "no" >&6; }
64434fi
64435
64436
64437          if test "x$ICECC_CMD" = x; then
64438            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
64439          fi
64440        else
64441          # Otherwise we believe it is a complete path. Use it as it is.
64442          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
64443$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
64444          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
64445$as_echo_n "checking for ICECC_CMD... " >&6; }
64446          if test ! -x "$tool_specified"; then
64447            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
64448$as_echo "not found" >&6; }
64449            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
64450          fi
64451          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
64452$as_echo "$tool_specified" >&6; }
64453        fi
64454      fi
64455    fi
64456
64457  fi
64458
64459
64460
64461  if test "x$ICECC_CMD" = x; then
64462    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
64463  fi
64464
64465
64466    old_path="$PATH"
64467
64468    # Look for icecc-create-env in some known places
64469    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
64470
64471
64472
64473  # Publish this variable in the help.
64474
64475
64476  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
64477    # The variable is not set by user, try to locate tool using the code snippet
64478    for ac_prog in icecc-create-env
64479do
64480  # Extract the first word of "$ac_prog", so it can be a program name with args.
64481set dummy $ac_prog; ac_word=$2
64482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64483$as_echo_n "checking for $ac_word... " >&6; }
64484if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64485  $as_echo_n "(cached) " >&6
64486else
64487  case $ICECC_CREATE_ENV in
64488  [\\/]* | ?:[\\/]*)
64489  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64490  ;;
64491  *)
64492  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64493for as_dir in $PATH
64494do
64495  IFS=$as_save_IFS
64496  test -z "$as_dir" && as_dir=.
64497    for ac_exec_ext in '' $ac_executable_extensions; do
64498  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64499    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64500    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64501    break 2
64502  fi
64503done
64504  done
64505IFS=$as_save_IFS
64506
64507  ;;
64508esac
64509fi
64510ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64511if test -n "$ICECC_CREATE_ENV"; then
64512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64513$as_echo "$ICECC_CREATE_ENV" >&6; }
64514else
64515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64516$as_echo "no" >&6; }
64517fi
64518
64519
64520  test -n "$ICECC_CREATE_ENV" && break
64521done
64522
64523  else
64524    # The variable is set, but is it from the command line or the environment?
64525
64526    # Try to remove the string !ICECC_CREATE_ENV! from our list.
64527    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
64528    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64529      # If it failed, the variable was not from the command line. Ignore it,
64530      # but warn the user (except for BASH, which is always set by the calling BASH).
64531      if test "xICECC_CREATE_ENV" != xBASH; then
64532        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
64533$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
64534      fi
64535      # Try to locate tool using the code snippet
64536      for ac_prog in icecc-create-env
64537do
64538  # Extract the first word of "$ac_prog", so it can be a program name with args.
64539set dummy $ac_prog; ac_word=$2
64540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64541$as_echo_n "checking for $ac_word... " >&6; }
64542if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64543  $as_echo_n "(cached) " >&6
64544else
64545  case $ICECC_CREATE_ENV in
64546  [\\/]* | ?:[\\/]*)
64547  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64548  ;;
64549  *)
64550  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64551for as_dir in $PATH
64552do
64553  IFS=$as_save_IFS
64554  test -z "$as_dir" && as_dir=.
64555    for ac_exec_ext in '' $ac_executable_extensions; do
64556  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64557    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64558    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64559    break 2
64560  fi
64561done
64562  done
64563IFS=$as_save_IFS
64564
64565  ;;
64566esac
64567fi
64568ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64569if test -n "$ICECC_CREATE_ENV"; then
64570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64571$as_echo "$ICECC_CREATE_ENV" >&6; }
64572else
64573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64574$as_echo "no" >&6; }
64575fi
64576
64577
64578  test -n "$ICECC_CREATE_ENV" && break
64579done
64580
64581    else
64582      # If it succeeded, then it was overridden by the user. We will use it
64583      # for the tool.
64584
64585      # First remove it from the list of overridden variables, so we can test
64586      # for unknown variables in the end.
64587      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64588
64589      # Check if we try to supply an empty value
64590      if test "x$ICECC_CREATE_ENV" = x; then
64591        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
64592$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
64593        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
64594$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
64595        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64596$as_echo "disabled" >&6; }
64597      else
64598        # Check if the provided tool contains a complete path.
64599        tool_specified="$ICECC_CREATE_ENV"
64600        tool_basename="${tool_specified##*/}"
64601        if test "x$tool_basename" = "x$tool_specified"; then
64602          # A command without a complete path is provided, search $PATH.
64603          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
64604$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
64605          # Extract the first word of "$tool_basename", so it can be a program name with args.
64606set dummy $tool_basename; ac_word=$2
64607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64608$as_echo_n "checking for $ac_word... " >&6; }
64609if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64610  $as_echo_n "(cached) " >&6
64611else
64612  case $ICECC_CREATE_ENV in
64613  [\\/]* | ?:[\\/]*)
64614  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64615  ;;
64616  *)
64617  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64618for as_dir in $PATH
64619do
64620  IFS=$as_save_IFS
64621  test -z "$as_dir" && as_dir=.
64622    for ac_exec_ext in '' $ac_executable_extensions; do
64623  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64624    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64625    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64626    break 2
64627  fi
64628done
64629  done
64630IFS=$as_save_IFS
64631
64632  ;;
64633esac
64634fi
64635ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64636if test -n "$ICECC_CREATE_ENV"; then
64637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64638$as_echo "$ICECC_CREATE_ENV" >&6; }
64639else
64640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64641$as_echo "no" >&6; }
64642fi
64643
64644
64645          if test "x$ICECC_CREATE_ENV" = x; then
64646            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
64647          fi
64648        else
64649          # Otherwise we believe it is a complete path. Use it as it is.
64650          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
64651$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
64652          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
64653$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
64654          if test ! -x "$tool_specified"; then
64655            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
64656$as_echo "not found" >&6; }
64657            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
64658          fi
64659          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
64660$as_echo "$tool_specified" >&6; }
64661        fi
64662      fi
64663    fi
64664
64665  fi
64666
64667
64668
64669  if test "x$ICECC_CREATE_ENV" = x; then
64670    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
64671  fi
64672
64673
64674    # Use icecc-create-env to create a minimal compilation environment that can
64675    # be sent to the other hosts in the icecream cluster.
64676    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
64677    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
64678    # Older versions of icecc does not have the --gcc parameter
64679    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
64680      icecc_gcc_arg="--gcc"
64681    fi
64682    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
64683
64684  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
64685      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
64686          ${icecc_create_env_log} 2>&1 )
64687  if test "$?" != "0"; then
64688    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
64689$as_echo "$as_me: icecc-create-env output:" >&6;}
64690    cat \
64691          ${icecc_create_env_log}
64692    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
64693  fi
64694
64695    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
64696      # For clang, the icecc compilerwrapper is needed. It usually resides next
64697      # to icecc-create-env.
64698
64699
64700
64701  # Publish this variable in the help.
64702
64703
64704  if [ -z "${ICECC_WRAPPER+x}" ]; then
64705    # The variable is not set by user, try to locate tool using the code snippet
64706    for ac_prog in compilerwrapper
64707do
64708  # Extract the first word of "$ac_prog", so it can be a program name with args.
64709set dummy $ac_prog; ac_word=$2
64710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64711$as_echo_n "checking for $ac_word... " >&6; }
64712if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
64713  $as_echo_n "(cached) " >&6
64714else
64715  case $ICECC_WRAPPER in
64716  [\\/]* | ?:[\\/]*)
64717  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
64718  ;;
64719  *)
64720  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64721for as_dir in $PATH
64722do
64723  IFS=$as_save_IFS
64724  test -z "$as_dir" && as_dir=.
64725    for ac_exec_ext in '' $ac_executable_extensions; do
64726  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64727    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
64728    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64729    break 2
64730  fi
64731done
64732  done
64733IFS=$as_save_IFS
64734
64735  ;;
64736esac
64737fi
64738ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
64739if test -n "$ICECC_WRAPPER"; then
64740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
64741$as_echo "$ICECC_WRAPPER" >&6; }
64742else
64743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64744$as_echo "no" >&6; }
64745fi
64746
64747
64748  test -n "$ICECC_WRAPPER" && break
64749done
64750
64751  else
64752    # The variable is set, but is it from the command line or the environment?
64753
64754    # Try to remove the string !ICECC_WRAPPER! from our list.
64755    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
64756    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64757      # If it failed, the variable was not from the command line. Ignore it,
64758      # but warn the user (except for BASH, which is always set by the calling BASH).
64759      if test "xICECC_WRAPPER" != xBASH; then
64760        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
64761$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
64762      fi
64763      # Try to locate tool using the code snippet
64764      for ac_prog in compilerwrapper
64765do
64766  # Extract the first word of "$ac_prog", so it can be a program name with args.
64767set dummy $ac_prog; ac_word=$2
64768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64769$as_echo_n "checking for $ac_word... " >&6; }
64770if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
64771  $as_echo_n "(cached) " >&6
64772else
64773  case $ICECC_WRAPPER in
64774  [\\/]* | ?:[\\/]*)
64775  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
64776  ;;
64777  *)
64778  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64779for as_dir in $PATH
64780do
64781  IFS=$as_save_IFS
64782  test -z "$as_dir" && as_dir=.
64783    for ac_exec_ext in '' $ac_executable_extensions; do
64784  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64785    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
64786    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64787    break 2
64788  fi
64789done
64790  done
64791IFS=$as_save_IFS
64792
64793  ;;
64794esac
64795fi
64796ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
64797if test -n "$ICECC_WRAPPER"; then
64798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
64799$as_echo "$ICECC_WRAPPER" >&6; }
64800else
64801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64802$as_echo "no" >&6; }
64803fi
64804
64805
64806  test -n "$ICECC_WRAPPER" && break
64807done
64808
64809    else
64810      # If it succeeded, then it was overridden by the user. We will use it
64811      # for the tool.
64812
64813      # First remove it from the list of overridden variables, so we can test
64814      # for unknown variables in the end.
64815      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64816
64817      # Check if we try to supply an empty value
64818      if test "x$ICECC_WRAPPER" = x; then
64819        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
64820$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
64821        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
64822$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
64823        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64824$as_echo "disabled" >&6; }
64825      else
64826        # Check if the provided tool contains a complete path.
64827        tool_specified="$ICECC_WRAPPER"
64828        tool_basename="${tool_specified##*/}"
64829        if test "x$tool_basename" = "x$tool_specified"; then
64830          # A command without a complete path is provided, search $PATH.
64831          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
64832$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
64833          # Extract the first word of "$tool_basename", so it can be a program name with args.
64834set dummy $tool_basename; ac_word=$2
64835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64836$as_echo_n "checking for $ac_word... " >&6; }
64837if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
64838  $as_echo_n "(cached) " >&6
64839else
64840  case $ICECC_WRAPPER in
64841  [\\/]* | ?:[\\/]*)
64842  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
64843  ;;
64844  *)
64845  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64846for as_dir in $PATH
64847do
64848  IFS=$as_save_IFS
64849  test -z "$as_dir" && as_dir=.
64850    for ac_exec_ext in '' $ac_executable_extensions; do
64851  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64852    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
64853    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64854    break 2
64855  fi
64856done
64857  done
64858IFS=$as_save_IFS
64859
64860  ;;
64861esac
64862fi
64863ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
64864if test -n "$ICECC_WRAPPER"; then
64865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
64866$as_echo "$ICECC_WRAPPER" >&6; }
64867else
64868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64869$as_echo "no" >&6; }
64870fi
64871
64872
64873          if test "x$ICECC_WRAPPER" = x; then
64874            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
64875          fi
64876        else
64877          # Otherwise we believe it is a complete path. Use it as it is.
64878          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
64879$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
64880          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
64881$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
64882          if test ! -x "$tool_specified"; then
64883            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
64884$as_echo "not found" >&6; }
64885            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
64886          fi
64887          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
64888$as_echo "$tool_specified" >&6; }
64889        fi
64890      fi
64891    fi
64892
64893  fi
64894
64895
64896
64897  if test "x$ICECC_WRAPPER" = x; then
64898    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
64899  fi
64900
64901
64902
64903  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
64904      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
64905  if test "$?" != "0"; then
64906    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
64907$as_echo "$as_me: icecc-create-env output:" >&6;}
64908    cat ${icecc_create_env_log}
64909    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
64910  fi
64911
64912    else
64913      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
64914    fi
64915    PATH="$old_path"
64916    # The bundle with the compiler gets a name based on checksums. Parse log file
64917    # to find it.
64918    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
64919    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
64920    if test ! -f ${ICECC_ENV_BUNDLE}; then
64921      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
64922    fi
64923    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
64924$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
64925    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
64926$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
64927    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
64928
64929    if test "x${COMPILE_TYPE}" = "xcross"; then
64930      # If cross compiling, create a separate env package for the build compiler
64931      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
64932      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
64933      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
64934
64935  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
64936      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
64937            ${icecc_create_env_log_build} 2>&1 )
64938  if test "$?" != "0"; then
64939    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
64940$as_echo "$as_me: icecc-create-env output:" >&6;}
64941    cat \
64942            ${icecc_create_env_log_build}
64943    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
64944  fi
64945
64946      elif test "x${BUILD_CC##*/}" = "xclang"; then
64947
64948  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
64949      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
64950  if test "$?" != "0"; then
64951    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
64952$as_echo "$as_me: icecc-create-env output:" >&6;}
64953    cat ${icecc_create_env_log_build}
64954    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
64955  fi
64956
64957      else
64958        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
64959      fi
64960      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
64961      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
64962      if test ! -f ${ICECC_ENV_BUNDLE}; then
64963        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
64964      fi
64965      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
64966$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
64967      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
64968$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
64969      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
64970          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
64971    else
64972      BUILD_ICECC="${ICECC}"
64973    fi
64974
64975
64976  fi
64977
64978
64979# Can the C/C++ compiler use precompiled headers?
64980
64981
64982  ###############################################################################
64983  #
64984  # Can the C/C++ compiler use precompiled headers?
64985  #
64986  # Check whether --enable-precompiled-headers was given.
64987if test "${enable_precompiled_headers+set}" = set; then :
64988  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
64989else
64990  ENABLE_PRECOMPH=yes
64991fi
64992
64993
64994  USE_PRECOMPILED_HEADER=1
64995  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
64996$as_echo_n "checking If precompiled header is enabled... " >&6; }
64997  if test "x$ENABLE_PRECOMPH" = xno; then
64998    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64999$as_echo "no, forced" >&6; }
65000    USE_PRECOMPILED_HEADER=0
65001  elif test "x$ICECC" != "x"; then
65002    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
65003$as_echo "no, does not work effectively with icecc" >&6; }
65004    USE_PRECOMPILED_HEADER=0
65005  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
65006    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
65007$as_echo "no, does not work with Solaris Studio" >&6; }
65008    USE_PRECOMPILED_HEADER=0
65009  else
65010    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65011$as_echo "yes" >&6; }
65012  fi
65013
65014  if test "x$ENABLE_PRECOMPH" = xyes; then
65015    # Check that the compiler actually supports precomp headers.
65016    if test "x$TOOLCHAIN_TYPE" = xgcc; then
65017      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
65018$as_echo_n "checking that precompiled headers work... " >&6; }
65019      echo "int alfa();" > conftest.h
65020      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
65021      if test ! -f conftest.hpp.gch; then
65022        USE_PRECOMPILED_HEADER=0
65023        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65024$as_echo "no" >&6; }
65025      else
65026        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65027$as_echo "yes" >&6; }
65028      fi
65029      rm -f conftest.h conftest.hpp.gch
65030    fi
65031  fi
65032
65033
65034
65035
65036# Setup use of ccache, if available
65037
65038  # Check whether --enable-ccache was given.
65039if test "${enable_ccache+set}" = set; then :
65040  enableval=$enable_ccache;
65041fi
65042
65043
65044  CCACHE=
65045  CCACHE_STATUS=
65046  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
65047$as_echo_n "checking is ccache enabled... " >&6; }
65048  if test "x$enable_ccache" = xyes; then
65049    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
65050      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65051$as_echo "yes" >&6; }
65052      OLD_PATH="$PATH"
65053      if test "x$TOOLCHAIN_PATH" != x; then
65054        PATH=$TOOLCHAIN_PATH:$PATH
65055      fi
65056
65057
65058
65059  # Publish this variable in the help.
65060
65061
65062  if [ -z "${CCACHE+x}" ]; then
65063    # The variable is not set by user, try to locate tool using the code snippet
65064    for ac_prog in ccache
65065do
65066  # Extract the first word of "$ac_prog", so it can be a program name with args.
65067set dummy $ac_prog; ac_word=$2
65068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65069$as_echo_n "checking for $ac_word... " >&6; }
65070if ${ac_cv_path_CCACHE+:} false; then :
65071  $as_echo_n "(cached) " >&6
65072else
65073  case $CCACHE in
65074  [\\/]* | ?:[\\/]*)
65075  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65076  ;;
65077  *)
65078  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65079for as_dir in $PATH
65080do
65081  IFS=$as_save_IFS
65082  test -z "$as_dir" && as_dir=.
65083    for ac_exec_ext in '' $ac_executable_extensions; do
65084  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65085    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65086    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65087    break 2
65088  fi
65089done
65090  done
65091IFS=$as_save_IFS
65092
65093  ;;
65094esac
65095fi
65096CCACHE=$ac_cv_path_CCACHE
65097if test -n "$CCACHE"; then
65098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65099$as_echo "$CCACHE" >&6; }
65100else
65101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65102$as_echo "no" >&6; }
65103fi
65104
65105
65106  test -n "$CCACHE" && break
65107done
65108
65109  else
65110    # The variable is set, but is it from the command line or the environment?
65111
65112    # Try to remove the string !CCACHE! from our list.
65113    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
65114    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65115      # If it failed, the variable was not from the command line. Ignore it,
65116      # but warn the user (except for BASH, which is always set by the calling BASH).
65117      if test "xCCACHE" != xBASH; then
65118        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
65119$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
65120      fi
65121      # Try to locate tool using the code snippet
65122      for ac_prog in ccache
65123do
65124  # Extract the first word of "$ac_prog", so it can be a program name with args.
65125set dummy $ac_prog; ac_word=$2
65126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65127$as_echo_n "checking for $ac_word... " >&6; }
65128if ${ac_cv_path_CCACHE+:} false; then :
65129  $as_echo_n "(cached) " >&6
65130else
65131  case $CCACHE in
65132  [\\/]* | ?:[\\/]*)
65133  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65134  ;;
65135  *)
65136  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65137for as_dir in $PATH
65138do
65139  IFS=$as_save_IFS
65140  test -z "$as_dir" && as_dir=.
65141    for ac_exec_ext in '' $ac_executable_extensions; do
65142  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65143    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65144    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65145    break 2
65146  fi
65147done
65148  done
65149IFS=$as_save_IFS
65150
65151  ;;
65152esac
65153fi
65154CCACHE=$ac_cv_path_CCACHE
65155if test -n "$CCACHE"; then
65156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65157$as_echo "$CCACHE" >&6; }
65158else
65159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65160$as_echo "no" >&6; }
65161fi
65162
65163
65164  test -n "$CCACHE" && break
65165done
65166
65167    else
65168      # If it succeeded, then it was overridden by the user. We will use it
65169      # for the tool.
65170
65171      # First remove it from the list of overridden variables, so we can test
65172      # for unknown variables in the end.
65173      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65174
65175      # Check if we try to supply an empty value
65176      if test "x$CCACHE" = x; then
65177        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
65178$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
65179        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65180$as_echo_n "checking for CCACHE... " >&6; }
65181        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65182$as_echo "disabled" >&6; }
65183      else
65184        # Check if the provided tool contains a complete path.
65185        tool_specified="$CCACHE"
65186        tool_basename="${tool_specified##*/}"
65187        if test "x$tool_basename" = "x$tool_specified"; then
65188          # A command without a complete path is provided, search $PATH.
65189          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
65190$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
65191          # Extract the first word of "$tool_basename", so it can be a program name with args.
65192set dummy $tool_basename; ac_word=$2
65193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65194$as_echo_n "checking for $ac_word... " >&6; }
65195if ${ac_cv_path_CCACHE+:} false; then :
65196  $as_echo_n "(cached) " >&6
65197else
65198  case $CCACHE in
65199  [\\/]* | ?:[\\/]*)
65200  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65201  ;;
65202  *)
65203  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65204for as_dir in $PATH
65205do
65206  IFS=$as_save_IFS
65207  test -z "$as_dir" && as_dir=.
65208    for ac_exec_ext in '' $ac_executable_extensions; do
65209  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65210    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65211    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65212    break 2
65213  fi
65214done
65215  done
65216IFS=$as_save_IFS
65217
65218  ;;
65219esac
65220fi
65221CCACHE=$ac_cv_path_CCACHE
65222if test -n "$CCACHE"; then
65223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65224$as_echo "$CCACHE" >&6; }
65225else
65226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65227$as_echo "no" >&6; }
65228fi
65229
65230
65231          if test "x$CCACHE" = x; then
65232            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65233          fi
65234        else
65235          # Otherwise we believe it is a complete path. Use it as it is.
65236          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
65237$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
65238          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65239$as_echo_n "checking for CCACHE... " >&6; }
65240          if test ! -x "$tool_specified"; then
65241            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65242$as_echo "not found" >&6; }
65243            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
65244          fi
65245          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65246$as_echo "$tool_specified" >&6; }
65247        fi
65248      fi
65249    fi
65250
65251  fi
65252
65253
65254
65255  if test "x$CCACHE" = x; then
65256    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
65257  fi
65258
65259
65260      PATH="$OLD_PATH"
65261      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
65262      CCACHE_STATUS="Active ($CCACHE_VERSION)"
65263    else
65264      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65265$as_echo "no" >&6; }
65266      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
65267$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
65268    fi
65269  elif test "x$enable_ccache" = xno; then
65270    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
65271$as_echo "no, explicitly disabled" >&6; }
65272    CCACHE_STATUS="Disabled"
65273  elif test "x$enable_ccache" = x; then
65274    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65275$as_echo "no" >&6; }
65276  else
65277    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
65278$as_echo "unknown" >&6; }
65279    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
65280  fi
65281
65282
65283
65284# Check whether --with-ccache-dir was given.
65285if test "${with_ccache_dir+set}" = set; then :
65286  withval=$with_ccache_dir;
65287fi
65288
65289
65290  if test "x$with_ccache_dir" != x; then
65291    # When using a non home ccache directory, assume the use is to share ccache files
65292    # with other users. Thus change the umask.
65293    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
65294    if test "x$CCACHE" = x; then
65295      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
65296$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
65297    fi
65298  fi
65299
65300  if test "x$CCACHE" != x; then
65301
65302  if test "x$CCACHE" != x; then
65303    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
65304      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
65305          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
65306      if test "x$HAS_BAD_CCACHE" != "x"; then
65307        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
65308      fi
65309      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
65310$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
65311      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
65312      PUSHED_FLAGS="$CXXFLAGS"
65313      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
65314      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65315/* end confdefs.h.  */
65316
65317int
65318main ()
65319{
65320
65321  ;
65322  return 0;
65323}
65324_ACEOF
65325if ac_fn_cxx_try_compile "$LINENO"; then :
65326  CC_KNOWS_CCACHE_TRICK=yes
65327else
65328  CC_KNOWS_CCACHE_TRICK=no
65329fi
65330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
65331      CXXFLAGS="$PUSHED_FLAGS"
65332      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
65333        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65334$as_echo "yes" >&6; }
65335        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
65336
65337        CCACHE_SLOPPINESS=pch_defines,time_macros
65338      else
65339        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65340$as_echo "no" >&6; }
65341        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
65342      fi
65343    fi
65344
65345    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
65346        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
65347
65348    if test "x$SET_CCACHE_DIR" != x; then
65349      mkdir -p $CCACHE_DIR > /dev/null 2>&1
65350      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
65351    fi
65352  fi
65353
65354  fi
65355
65356
65357###############################################################################
65358#
65359# And now the finish...
65360#
65361###############################################################################
65362
65363# Check for some common pitfalls
65364
65365  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65366    file_to_test="$SRC_ROOT/LICENSE"
65367    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
65368      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
65369    fi
65370  fi
65371
65372
65373  # Did user specify any unknown variables?
65374
65375  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
65376    # Replace the separating ! with spaces before presenting for end user.
65377    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
65378    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
65379$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
65380  fi
65381
65382
65383  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
65384$as_echo_n "checking if build directory is on local disk... " >&6; }
65385
65386  # df -l lists only local disks; if the given directory is not found then
65387  # a non-zero exit code is given
65388  if test "x$DF" = x; then
65389    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65390      # msys does not have df; use Windows "net use" instead.
65391      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
65392      if test "x$IS_NETWORK_DISK" = x; then
65393        OUTPUT_DIR_IS_LOCAL="yes"
65394      else
65395        OUTPUT_DIR_IS_LOCAL="no"
65396      fi
65397    else
65398      # No df here, say it's local
65399      OUTPUT_DIR_IS_LOCAL="yes"
65400    fi
65401  else
65402    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
65403      OUTPUT_DIR_IS_LOCAL="yes"
65404    else
65405      OUTPUT_DIR_IS_LOCAL="no"
65406    fi
65407  fi
65408
65409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
65410$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
65411
65412
65413
65414  # Check if the user has any old-style ALT_ variables set.
65415  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
65416
65417  # Before generating output files, test if they exist. If they do, this is a reconfigure.
65418  # Since we can't properly handle the dependencies for this, warn the user about the situation
65419  if test -e $OUTPUT_ROOT/spec.gmk; then
65420    IS_RECONFIGURE=yes
65421  else
65422    IS_RECONFIGURE=no
65423  fi
65424
65425
65426# At the end, call the custom hook. (Dummy macro if no custom sources available)
65427
65428
65429# This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
65430
65431  # Keep feature lists sorted and free of duplicates
65432  JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
65433  JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
65434  JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
65435  JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
65436  JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
65437  JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
65438  JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
65439
65440  # Validate features
65441  for variant in $JVM_VARIANTS; do
65442    { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
65443$as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
65444    features_var_name=JVM_FEATURES_$variant
65445    JVM_FEATURES_TO_TEST=${!features_var_name}
65446    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
65447$as_echo "$JVM_FEATURES_TO_TEST" >&6; }
65448    NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
65449    STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
65450    INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
65451    if test "x$INVALID_FEATURES" != x; then
65452      as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
65453    fi
65454  done
65455
65456
65457# We're messing a bit with internal autoconf variables to put the config.status
65458# in the output directory instead of the current directory.
65459CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
65460
65461# Create the actual output files. Now the main work of configure is done.
65462cat >confcache <<\_ACEOF
65463# This file is a shell script that caches the results of configure
65464# tests run on this system so they can be shared between configure
65465# scripts and configure runs, see configure's option --config-cache.
65466# It is not useful on other systems.  If it contains results you don't
65467# want to keep, you may remove or edit it.
65468#
65469# config.status only pays attention to the cache file if you give it
65470# the --recheck option to rerun configure.
65471#
65472# `ac_cv_env_foo' variables (set or unset) will be overridden when
65473# loading this file, other *unset* `ac_cv_foo' will be assigned the
65474# following values.
65475
65476_ACEOF
65477
65478# The following way of writing the cache mishandles newlines in values,
65479# but we know of no workaround that is simple, portable, and efficient.
65480# So, we kill variables containing newlines.
65481# Ultrix sh set writes to stderr and can't be redirected directly,
65482# and sets the high bit in the cache file unless we assign to the vars.
65483(
65484  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
65485    eval ac_val=\$$ac_var
65486    case $ac_val in #(
65487    *${as_nl}*)
65488      case $ac_var in #(
65489      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
65490$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
65491      esac
65492      case $ac_var in #(
65493      _ | IFS | as_nl) ;; #(
65494      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
65495      *) { eval $ac_var=; unset $ac_var;} ;;
65496      esac ;;
65497    esac
65498  done
65499
65500  (set) 2>&1 |
65501    case $as_nl`(ac_space=' '; set) 2>&1` in #(
65502    *${as_nl}ac_space=\ *)
65503      # `set' does not quote correctly, so add quotes: double-quote
65504      # substitution turns \\\\ into \\, and sed turns \\ into \.
65505      sed -n \
65506	"s/'/'\\\\''/g;
65507	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
65508      ;; #(
65509    *)
65510      # `set' quotes correctly as required by POSIX, so do not add quotes.
65511      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
65512      ;;
65513    esac |
65514    sort
65515) |
65516  sed '
65517     /^ac_cv_env_/b end
65518     t clear
65519     :clear
65520     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
65521     t end
65522     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
65523     :end' >>confcache
65524if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
65525  if test -w "$cache_file"; then
65526    if test "x$cache_file" != "x/dev/null"; then
65527      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
65528$as_echo "$as_me: updating cache $cache_file" >&6;}
65529      if test ! -f "$cache_file" || test -h "$cache_file"; then
65530	cat confcache >"$cache_file"
65531      else
65532        case $cache_file in #(
65533        */* | ?:*)
65534	  mv -f confcache "$cache_file"$$ &&
65535	  mv -f "$cache_file"$$ "$cache_file" ;; #(
65536        *)
65537	  mv -f confcache "$cache_file" ;;
65538	esac
65539      fi
65540    fi
65541  else
65542    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
65543$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
65544  fi
65545fi
65546rm -f confcache
65547
65548test "x$prefix" = xNONE && prefix=$ac_default_prefix
65549# Let make expand exec_prefix.
65550test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
65551
65552# Transform confdefs.h into DEFS.
65553# Protect against shell expansion while executing Makefile rules.
65554# Protect against Makefile macro expansion.
65555#
65556# If the first sed substitution is executed (which looks for macros that
65557# take arguments), then branch to the quote section.  Otherwise,
65558# look for a macro that doesn't take arguments.
65559ac_script='
65560:mline
65561/\\$/{
65562 N
65563 s,\\\n,,
65564 b mline
65565}
65566t clear
65567:clear
65568s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
65569t quote
65570s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
65571t quote
65572b any
65573:quote
65574s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
65575s/\[/\\&/g
65576s/\]/\\&/g
65577s/\$/$$/g
65578H
65579:any
65580${
65581	g
65582	s/^\n//
65583	s/\n/ /g
65584	p
65585}
65586'
65587DEFS=`sed -n "$ac_script" confdefs.h`
65588
65589
65590ac_libobjs=
65591ac_ltlibobjs=
65592U=
65593for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
65594  # 1. Remove the extension, and $U if already installed.
65595  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
65596  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
65597  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
65598  #    will be set to the directory where LIBOBJS objects are built.
65599  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
65600  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
65601done
65602LIBOBJS=$ac_libobjs
65603
65604LTLIBOBJS=$ac_ltlibobjs
65605
65606
65607
65608: "${CONFIG_STATUS=./config.status}"
65609ac_write_fail=0
65610ac_clean_files_save=$ac_clean_files
65611ac_clean_files="$ac_clean_files $CONFIG_STATUS"
65612{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
65613$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
65614as_write_fail=0
65615cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
65616#! $SHELL
65617# Generated by $as_me.
65618# Run this file to recreate the current configuration.
65619# Compiler output produced by configure, useful for debugging
65620# configure, is in config.log if it exists.
65621
65622debug=false
65623ac_cs_recheck=false
65624ac_cs_silent=false
65625
65626SHELL=\${CONFIG_SHELL-$SHELL}
65627export SHELL
65628_ASEOF
65629cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
65630## -------------------- ##
65631## M4sh Initialization. ##
65632## -------------------- ##
65633
65634# Be more Bourne compatible
65635DUALCASE=1; export DUALCASE # for MKS sh
65636if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
65637  emulate sh
65638  NULLCMD=:
65639  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
65640  # is contrary to our usage.  Disable this feature.
65641  alias -g '${1+"$@"}'='"$@"'
65642  setopt NO_GLOB_SUBST
65643else
65644  case `(set -o) 2>/dev/null` in #(
65645  *posix*) :
65646    set -o posix ;; #(
65647  *) :
65648     ;;
65649esac
65650fi
65651
65652
65653as_nl='
65654'
65655export as_nl
65656# Printing a long string crashes Solaris 7 /usr/bin/printf.
65657as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
65658as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
65659as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
65660# Prefer a ksh shell builtin over an external printf program on Solaris,
65661# but without wasting forks for bash or zsh.
65662if test -z "$BASH_VERSION$ZSH_VERSION" \
65663    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
65664  as_echo='print -r --'
65665  as_echo_n='print -rn --'
65666elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
65667  as_echo='printf %s\n'
65668  as_echo_n='printf %s'
65669else
65670  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
65671    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
65672    as_echo_n='/usr/ucb/echo -n'
65673  else
65674    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
65675    as_echo_n_body='eval
65676      arg=$1;
65677      case $arg in #(
65678      *"$as_nl"*)
65679	expr "X$arg" : "X\\(.*\\)$as_nl";
65680	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
65681      esac;
65682      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
65683    '
65684    export as_echo_n_body
65685    as_echo_n='sh -c $as_echo_n_body as_echo'
65686  fi
65687  export as_echo_body
65688  as_echo='sh -c $as_echo_body as_echo'
65689fi
65690
65691# The user is always right.
65692if test "${PATH_SEPARATOR+set}" != set; then
65693  PATH_SEPARATOR=:
65694  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
65695    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
65696      PATH_SEPARATOR=';'
65697  }
65698fi
65699
65700
65701# IFS
65702# We need space, tab and new line, in precisely that order.  Quoting is
65703# there to prevent editors from complaining about space-tab.
65704# (If _AS_PATH_WALK were called with IFS unset, it would disable word
65705# splitting by setting IFS to empty value.)
65706IFS=" ""	$as_nl"
65707
65708# Find who we are.  Look in the path if we contain no directory separator.
65709as_myself=
65710case $0 in #((
65711  *[\\/]* ) as_myself=$0 ;;
65712  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65713for as_dir in $PATH
65714do
65715  IFS=$as_save_IFS
65716  test -z "$as_dir" && as_dir=.
65717    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
65718  done
65719IFS=$as_save_IFS
65720
65721     ;;
65722esac
65723# We did not find ourselves, most probably we were run as `sh COMMAND'
65724# in which case we are not to be found in the path.
65725if test "x$as_myself" = x; then
65726  as_myself=$0
65727fi
65728if test ! -f "$as_myself"; then
65729  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
65730  exit 1
65731fi
65732
65733# Unset variables that we do not need and which cause bugs (e.g. in
65734# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
65735# suppresses any "Segmentation fault" message there.  '((' could
65736# trigger a bug in pdksh 5.2.14.
65737for as_var in BASH_ENV ENV MAIL MAILPATH
65738do eval test x\${$as_var+set} = xset \
65739  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
65740done
65741PS1='$ '
65742PS2='> '
65743PS4='+ '
65744
65745# NLS nuisances.
65746LC_ALL=C
65747export LC_ALL
65748LANGUAGE=C
65749export LANGUAGE
65750
65751# CDPATH.
65752(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
65753
65754
65755# as_fn_error STATUS ERROR [LINENO LOG_FD]
65756# ----------------------------------------
65757# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
65758# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
65759# script with STATUS, using 1 if that was 0.
65760as_fn_error ()
65761{
65762  as_status=$1; test $as_status -eq 0 && as_status=1
65763  if test "$4"; then
65764    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
65765    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
65766  fi
65767  $as_echo "$as_me: error: $2" >&2
65768  as_fn_exit $as_status
65769} # as_fn_error
65770
65771
65772# as_fn_set_status STATUS
65773# -----------------------
65774# Set $? to STATUS, without forking.
65775as_fn_set_status ()
65776{
65777  return $1
65778} # as_fn_set_status
65779
65780# as_fn_exit STATUS
65781# -----------------
65782# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
65783as_fn_exit ()
65784{
65785  set +e
65786  as_fn_set_status $1
65787  exit $1
65788} # as_fn_exit
65789
65790# as_fn_unset VAR
65791# ---------------
65792# Portably unset VAR.
65793as_fn_unset ()
65794{
65795  { eval $1=; unset $1;}
65796}
65797as_unset=as_fn_unset
65798# as_fn_append VAR VALUE
65799# ----------------------
65800# Append the text in VALUE to the end of the definition contained in VAR. Take
65801# advantage of any shell optimizations that allow amortized linear growth over
65802# repeated appends, instead of the typical quadratic growth present in naive
65803# implementations.
65804if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
65805  eval 'as_fn_append ()
65806  {
65807    eval $1+=\$2
65808  }'
65809else
65810  as_fn_append ()
65811  {
65812    eval $1=\$$1\$2
65813  }
65814fi # as_fn_append
65815
65816# as_fn_arith ARG...
65817# ------------------
65818# Perform arithmetic evaluation on the ARGs, and store the result in the
65819# global $as_val. Take advantage of shells that can avoid forks. The arguments
65820# must be portable across $(()) and expr.
65821if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
65822  eval 'as_fn_arith ()
65823  {
65824    as_val=$(( $* ))
65825  }'
65826else
65827  as_fn_arith ()
65828  {
65829    as_val=`expr "$@" || test $? -eq 1`
65830  }
65831fi # as_fn_arith
65832
65833
65834if expr a : '\(a\)' >/dev/null 2>&1 &&
65835   test "X`expr 00001 : '.*\(...\)'`" = X001; then
65836  as_expr=expr
65837else
65838  as_expr=false
65839fi
65840
65841if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
65842  as_basename=basename
65843else
65844  as_basename=false
65845fi
65846
65847if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
65848  as_dirname=dirname
65849else
65850  as_dirname=false
65851fi
65852
65853as_me=`$as_basename -- "$0" ||
65854$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
65855	 X"$0" : 'X\(//\)$' \| \
65856	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
65857$as_echo X/"$0" |
65858    sed '/^.*\/\([^/][^/]*\)\/*$/{
65859	    s//\1/
65860	    q
65861	  }
65862	  /^X\/\(\/\/\)$/{
65863	    s//\1/
65864	    q
65865	  }
65866	  /^X\/\(\/\).*/{
65867	    s//\1/
65868	    q
65869	  }
65870	  s/.*/./; q'`
65871
65872# Avoid depending upon Character Ranges.
65873as_cr_letters='abcdefghijklmnopqrstuvwxyz'
65874as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
65875as_cr_Letters=$as_cr_letters$as_cr_LETTERS
65876as_cr_digits='0123456789'
65877as_cr_alnum=$as_cr_Letters$as_cr_digits
65878
65879ECHO_C= ECHO_N= ECHO_T=
65880case `echo -n x` in #(((((
65881-n*)
65882  case `echo 'xy\c'` in
65883  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
65884  xy)  ECHO_C='\c';;
65885  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
65886       ECHO_T='	';;
65887  esac;;
65888*)
65889  ECHO_N='-n';;
65890esac
65891
65892rm -f conf$$ conf$$.exe conf$$.file
65893if test -d conf$$.dir; then
65894  rm -f conf$$.dir/conf$$.file
65895else
65896  rm -f conf$$.dir
65897  mkdir conf$$.dir 2>/dev/null
65898fi
65899if (echo >conf$$.file) 2>/dev/null; then
65900  if ln -s conf$$.file conf$$ 2>/dev/null; then
65901    as_ln_s='ln -s'
65902    # ... but there are two gotchas:
65903    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
65904    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
65905    # In both cases, we have to default to `cp -pR'.
65906    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
65907      as_ln_s='cp -pR'
65908  elif ln conf$$.file conf$$ 2>/dev/null; then
65909    as_ln_s=ln
65910  else
65911    as_ln_s='cp -pR'
65912  fi
65913else
65914  as_ln_s='cp -pR'
65915fi
65916rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
65917rmdir conf$$.dir 2>/dev/null
65918
65919
65920# as_fn_mkdir_p
65921# -------------
65922# Create "$as_dir" as a directory, including parents if necessary.
65923as_fn_mkdir_p ()
65924{
65925
65926  case $as_dir in #(
65927  -*) as_dir=./$as_dir;;
65928  esac
65929  test -d "$as_dir" || eval $as_mkdir_p || {
65930    as_dirs=
65931    while :; do
65932      case $as_dir in #(
65933      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
65934      *) as_qdir=$as_dir;;
65935      esac
65936      as_dirs="'$as_qdir' $as_dirs"
65937      as_dir=`$as_dirname -- "$as_dir" ||
65938$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
65939	 X"$as_dir" : 'X\(//\)[^/]' \| \
65940	 X"$as_dir" : 'X\(//\)$' \| \
65941	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
65942$as_echo X"$as_dir" |
65943    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
65944	    s//\1/
65945	    q
65946	  }
65947	  /^X\(\/\/\)[^/].*/{
65948	    s//\1/
65949	    q
65950	  }
65951	  /^X\(\/\/\)$/{
65952	    s//\1/
65953	    q
65954	  }
65955	  /^X\(\/\).*/{
65956	    s//\1/
65957	    q
65958	  }
65959	  s/.*/./; q'`
65960      test -d "$as_dir" && break
65961    done
65962    test -z "$as_dirs" || eval "mkdir $as_dirs"
65963  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
65964
65965
65966} # as_fn_mkdir_p
65967if mkdir -p . 2>/dev/null; then
65968  as_mkdir_p='mkdir -p "$as_dir"'
65969else
65970  test -d ./-p && rmdir ./-p
65971  as_mkdir_p=false
65972fi
65973
65974
65975# as_fn_executable_p FILE
65976# -----------------------
65977# Test if FILE is an executable regular file.
65978as_fn_executable_p ()
65979{
65980  test -f "$1" && test -x "$1"
65981} # as_fn_executable_p
65982as_test_x='test -x'
65983as_executable_p=as_fn_executable_p
65984
65985# Sed expression to map a string onto a valid CPP name.
65986as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
65987
65988# Sed expression to map a string onto a valid variable name.
65989as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
65990
65991
65992exec 6>&1
65993## ----------------------------------- ##
65994## Main body of $CONFIG_STATUS script. ##
65995## ----------------------------------- ##
65996_ASEOF
65997test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
65998
65999cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66000# Save the log message, to keep $0 and so on meaningful, and to
66001# report actual input values of CONFIG_FILES etc. instead of their
66002# values after options handling.
66003ac_log="
66004This file was extended by OpenJDK $as_me jdk9, which was
66005generated by GNU Autoconf 2.69.  Invocation command line was
66006
66007  CONFIG_FILES    = $CONFIG_FILES
66008  CONFIG_HEADERS  = $CONFIG_HEADERS
66009  CONFIG_LINKS    = $CONFIG_LINKS
66010  CONFIG_COMMANDS = $CONFIG_COMMANDS
66011  $ $0 $@
66012
66013on `(hostname || uname -n) 2>/dev/null | sed 1q`
66014"
66015
66016_ACEOF
66017
66018case $ac_config_files in *"
66019"*) set x $ac_config_files; shift; ac_config_files=$*;;
66020esac
66021
66022
66023
66024cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66025# Files that config.status was made for.
66026config_files="$ac_config_files"
66027
66028_ACEOF
66029
66030cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66031ac_cs_usage="\
66032\`$as_me' instantiates files and other configuration actions
66033from templates according to the current configuration.  Unless the files
66034and actions are specified as TAGs, all are instantiated by default.
66035
66036Usage: $0 [OPTION]... [TAG]...
66037
66038  -h, --help       print this help, then exit
66039  -V, --version    print version number and configuration settings, then exit
66040      --config     print configuration, then exit
66041  -q, --quiet, --silent
66042                   do not print progress messages
66043  -d, --debug      don't remove temporary files
66044      --recheck    update $as_me by reconfiguring in the same conditions
66045      --file=FILE[:TEMPLATE]
66046                   instantiate the configuration file FILE
66047
66048Configuration files:
66049$config_files
66050
66051Report bugs to <build-dev@openjdk.java.net>.
66052OpenJDK home page: <http://openjdk.java.net>."
66053
66054_ACEOF
66055cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66056ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
66057ac_cs_version="\\
66058OpenJDK config.status jdk9
66059configured by $0, generated by GNU Autoconf 2.69,
66060  with options \\"\$ac_cs_config\\"
66061
66062Copyright (C) 2012 Free Software Foundation, Inc.
66063This config.status script is free software; the Free Software Foundation
66064gives unlimited permission to copy, distribute and modify it."
66065
66066ac_pwd='$ac_pwd'
66067srcdir='$srcdir'
66068AWK='$AWK'
66069test -n "\$AWK" || AWK=awk
66070_ACEOF
66071
66072cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66073# The default lists apply if the user does not specify any file.
66074ac_need_defaults=:
66075while test $# != 0
66076do
66077  case $1 in
66078  --*=?*)
66079    ac_option=`expr "X$1" : 'X\([^=]*\)='`
66080    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
66081    ac_shift=:
66082    ;;
66083  --*=)
66084    ac_option=`expr "X$1" : 'X\([^=]*\)='`
66085    ac_optarg=
66086    ac_shift=:
66087    ;;
66088  *)
66089    ac_option=$1
66090    ac_optarg=$2
66091    ac_shift=shift
66092    ;;
66093  esac
66094
66095  case $ac_option in
66096  # Handling of the options.
66097  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
66098    ac_cs_recheck=: ;;
66099  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
66100    $as_echo "$ac_cs_version"; exit ;;
66101  --config | --confi | --conf | --con | --co | --c )
66102    $as_echo "$ac_cs_config"; exit ;;
66103  --debug | --debu | --deb | --de | --d | -d )
66104    debug=: ;;
66105  --file | --fil | --fi | --f )
66106    $ac_shift
66107    case $ac_optarg in
66108    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
66109    '') as_fn_error $? "missing file argument" ;;
66110    esac
66111    as_fn_append CONFIG_FILES " '$ac_optarg'"
66112    ac_need_defaults=false;;
66113  --he | --h |  --help | --hel | -h )
66114    $as_echo "$ac_cs_usage"; exit ;;
66115  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
66116  | -silent | --silent | --silen | --sile | --sil | --si | --s)
66117    ac_cs_silent=: ;;
66118
66119  # This is an error.
66120  -*) as_fn_error $? "unrecognized option: \`$1'
66121Try \`$0 --help' for more information." ;;
66122
66123  *) as_fn_append ac_config_targets " $1"
66124     ac_need_defaults=false ;;
66125
66126  esac
66127  shift
66128done
66129
66130ac_configure_extra_args=
66131
66132if $ac_cs_silent; then
66133  exec 6>/dev/null
66134  ac_configure_extra_args="$ac_configure_extra_args --silent"
66135fi
66136
66137_ACEOF
66138cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66139if \$ac_cs_recheck; then
66140  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
66141  shift
66142  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
66143  CONFIG_SHELL='$SHELL'
66144  export CONFIG_SHELL
66145  exec "\$@"
66146fi
66147
66148_ACEOF
66149cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66150exec 5>>config.log
66151{
66152  echo
66153  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
66154## Running $as_me. ##
66155_ASBOX
66156  $as_echo "$ac_log"
66157} >&5
66158
66159_ACEOF
66160cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66161_ACEOF
66162
66163cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66164
66165# Handling of arguments.
66166for ac_config_target in $ac_config_targets
66167do
66168  case $ac_config_target in
66169    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
66170    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
66171    "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
66172    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
66173    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
66174
66175  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
66176  esac
66177done
66178
66179
66180# If the user did not use the arguments to specify the items to instantiate,
66181# then the envvar interface is used.  Set only those that are not.
66182# We use the long form for the default assignment because of an extremely
66183# bizarre bug on SunOS 4.1.3.
66184if $ac_need_defaults; then
66185  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
66186fi
66187
66188# Have a temporary directory for convenience.  Make it in the build tree
66189# simply because there is no reason against having it here, and in addition,
66190# creating and moving files from /tmp can sometimes cause problems.
66191# Hook for its removal unless debugging.
66192# Note that there is a small window in which the directory will not be cleaned:
66193# after its creation but before its name has been assigned to `$tmp'.
66194$debug ||
66195{
66196  tmp= ac_tmp=
66197  trap 'exit_status=$?
66198  : "${ac_tmp:=$tmp}"
66199  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
66200' 0
66201  trap 'as_fn_exit 1' 1 2 13 15
66202}
66203# Create a (secure) tmp directory for tmp files.
66204
66205{
66206  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
66207  test -d "$tmp"
66208}  ||
66209{
66210  tmp=./conf$$-$RANDOM
66211  (umask 077 && mkdir "$tmp")
66212} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
66213ac_tmp=$tmp
66214
66215# Set up the scripts for CONFIG_FILES section.
66216# No need to generate them if there are no CONFIG_FILES.
66217# This happens for instance with `./config.status config.h'.
66218if test -n "$CONFIG_FILES"; then
66219
66220
66221ac_cr=`echo X | tr X '\015'`
66222# On cygwin, bash can eat \r inside `` if the user requested igncr.
66223# But we know of no other shell where ac_cr would be empty at this
66224# point, so we can use a bashism as a fallback.
66225if test "x$ac_cr" = x; then
66226  eval ac_cr=\$\'\\r\'
66227fi
66228ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
66229if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
66230  ac_cs_awk_cr='\\r'
66231else
66232  ac_cs_awk_cr=$ac_cr
66233fi
66234
66235echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
66236_ACEOF
66237
66238
66239{
66240  echo "cat >conf$$subs.awk <<_ACEOF" &&
66241  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
66242  echo "_ACEOF"
66243} >conf$$subs.sh ||
66244  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66245ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
66246ac_delim='%!_!# '
66247for ac_last_try in false false false false false :; do
66248  . ./conf$$subs.sh ||
66249    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66250
66251  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
66252  if test $ac_delim_n = $ac_delim_num; then
66253    break
66254  elif $ac_last_try; then
66255    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66256  else
66257    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
66258  fi
66259done
66260rm -f conf$$subs.sh
66261
66262cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66263cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
66264_ACEOF
66265sed -n '
66266h
66267s/^/S["/; s/!.*/"]=/
66268p
66269g
66270s/^[^!]*!//
66271:repl
66272t repl
66273s/'"$ac_delim"'$//
66274t delim
66275:nl
66276h
66277s/\(.\{148\}\)..*/\1/
66278t more1
66279s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
66280p
66281n
66282b repl
66283:more1
66284s/["\\]/\\&/g; s/^/"/; s/$/"\\/
66285p
66286g
66287s/.\{148\}//
66288t nl
66289:delim
66290h
66291s/\(.\{148\}\)..*/\1/
66292t more2
66293s/["\\]/\\&/g; s/^/"/; s/$/"/
66294p
66295b
66296:more2
66297s/["\\]/\\&/g; s/^/"/; s/$/"\\/
66298p
66299g
66300s/.\{148\}//
66301t delim
66302' <conf$$subs.awk | sed '
66303/^[^""]/{
66304  N
66305  s/\n//
66306}
66307' >>$CONFIG_STATUS || ac_write_fail=1
66308rm -f conf$$subs.awk
66309cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66310_ACAWK
66311cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
66312  for (key in S) S_is_set[key] = 1
66313  FS = ""
66314
66315}
66316{
66317  line = $ 0
66318  nfields = split(line, field, "@")
66319  substed = 0
66320  len = length(field[1])
66321  for (i = 2; i < nfields; i++) {
66322    key = field[i]
66323    keylen = length(key)
66324    if (S_is_set[key]) {
66325      value = S[key]
66326      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
66327      len += length(value) + length(field[++i])
66328      substed = 1
66329    } else
66330      len += 1 + keylen
66331  }
66332
66333  print line
66334}
66335
66336_ACAWK
66337_ACEOF
66338cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66339if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
66340  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
66341else
66342  cat
66343fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
66344  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
66345_ACEOF
66346
66347# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
66348# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
66349# trailing colons and then remove the whole line if VPATH becomes empty
66350# (actually we leave an empty line to preserve line numbers).
66351if test "x$srcdir" = x.; then
66352  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
66353h
66354s///
66355s/^/:/
66356s/[	 ]*$/:/
66357s/:\$(srcdir):/:/g
66358s/:\${srcdir}:/:/g
66359s/:@srcdir@:/:/g
66360s/^:*//
66361s/:*$//
66362x
66363s/\(=[	 ]*\).*/\1/
66364G
66365s/\n//
66366s/^[^=]*=[	 ]*$//
66367}'
66368fi
66369
66370cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66371fi # test -n "$CONFIG_FILES"
66372
66373
66374eval set X "  :F $CONFIG_FILES      "
66375shift
66376for ac_tag
66377do
66378  case $ac_tag in
66379  :[FHLC]) ac_mode=$ac_tag; continue;;
66380  esac
66381  case $ac_mode$ac_tag in
66382  :[FHL]*:*);;
66383  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
66384  :[FH]-) ac_tag=-:-;;
66385  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
66386  esac
66387  ac_save_IFS=$IFS
66388  IFS=:
66389  set x $ac_tag
66390  IFS=$ac_save_IFS
66391  shift
66392  ac_file=$1
66393  shift
66394
66395  case $ac_mode in
66396  :L) ac_source=$1;;
66397  :[FH])
66398    ac_file_inputs=
66399    for ac_f
66400    do
66401      case $ac_f in
66402      -) ac_f="$ac_tmp/stdin";;
66403      *) # Look for the file first in the build tree, then in the source tree
66404	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
66405	 # because $ac_f cannot contain `:'.
66406	 test -f "$ac_f" ||
66407	   case $ac_f in
66408	   [\\/$]*) false;;
66409	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
66410	   esac ||
66411	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
66412      esac
66413      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
66414      as_fn_append ac_file_inputs " '$ac_f'"
66415    done
66416
66417    # Let's still pretend it is `configure' which instantiates (i.e., don't
66418    # use $as_me), people would be surprised to read:
66419    #    /* config.h.  Generated by config.status.  */
66420    configure_input='Generated from '`
66421	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
66422	`' by configure.'
66423    if test x"$ac_file" != x-; then
66424      configure_input="$ac_file.  $configure_input"
66425      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
66426$as_echo "$as_me: creating $ac_file" >&6;}
66427    fi
66428    # Neutralize special characters interpreted by sed in replacement strings.
66429    case $configure_input in #(
66430    *\&* | *\|* | *\\* )
66431       ac_sed_conf_input=`$as_echo "$configure_input" |
66432       sed 's/[\\\\&|]/\\\\&/g'`;; #(
66433    *) ac_sed_conf_input=$configure_input;;
66434    esac
66435
66436    case $ac_tag in
66437    *:-:* | *:-) cat >"$ac_tmp/stdin" \
66438      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
66439    esac
66440    ;;
66441  esac
66442
66443  ac_dir=`$as_dirname -- "$ac_file" ||
66444$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66445	 X"$ac_file" : 'X\(//\)[^/]' \| \
66446	 X"$ac_file" : 'X\(//\)$' \| \
66447	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
66448$as_echo X"$ac_file" |
66449    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66450	    s//\1/
66451	    q
66452	  }
66453	  /^X\(\/\/\)[^/].*/{
66454	    s//\1/
66455	    q
66456	  }
66457	  /^X\(\/\/\)$/{
66458	    s//\1/
66459	    q
66460	  }
66461	  /^X\(\/\).*/{
66462	    s//\1/
66463	    q
66464	  }
66465	  s/.*/./; q'`
66466  as_dir="$ac_dir"; as_fn_mkdir_p
66467  ac_builddir=.
66468
66469case "$ac_dir" in
66470.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
66471*)
66472  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
66473  # A ".." for each directory in $ac_dir_suffix.
66474  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
66475  case $ac_top_builddir_sub in
66476  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
66477  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
66478  esac ;;
66479esac
66480ac_abs_top_builddir=$ac_pwd
66481ac_abs_builddir=$ac_pwd$ac_dir_suffix
66482# for backward compatibility:
66483ac_top_builddir=$ac_top_build_prefix
66484
66485case $srcdir in
66486  .)  # We are building in place.
66487    ac_srcdir=.
66488    ac_top_srcdir=$ac_top_builddir_sub
66489    ac_abs_top_srcdir=$ac_pwd ;;
66490  [\\/]* | ?:[\\/]* )  # Absolute name.
66491    ac_srcdir=$srcdir$ac_dir_suffix;
66492    ac_top_srcdir=$srcdir
66493    ac_abs_top_srcdir=$srcdir ;;
66494  *) # Relative name.
66495    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
66496    ac_top_srcdir=$ac_top_build_prefix$srcdir
66497    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
66498esac
66499ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
66500
66501
66502  case $ac_mode in
66503  :F)
66504  #
66505  # CONFIG_FILE
66506  #
66507
66508_ACEOF
66509
66510cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66511# If the template does not know about datarootdir, expand it.
66512# FIXME: This hack should be removed a few years after 2.60.
66513ac_datarootdir_hack=; ac_datarootdir_seen=
66514ac_sed_dataroot='
66515/datarootdir/ {
66516  p
66517  q
66518}
66519/@datadir@/p
66520/@docdir@/p
66521/@infodir@/p
66522/@localedir@/p
66523/@mandir@/p'
66524case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
66525*datarootdir*) ac_datarootdir_seen=yes;;
66526*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
66527  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
66528$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
66529_ACEOF
66530cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66531  ac_datarootdir_hack='
66532  s&@datadir@&$datadir&g
66533  s&@docdir@&$docdir&g
66534  s&@infodir@&$infodir&g
66535  s&@localedir@&$localedir&g
66536  s&@mandir@&$mandir&g
66537  s&\\\${datarootdir}&$datarootdir&g' ;;
66538esac
66539_ACEOF
66540
66541# Neutralize VPATH when `$srcdir' = `.'.
66542# Shell code in configure.ac might set extrasub.
66543# FIXME: do we really want to maintain this feature?
66544cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66545ac_sed_extra="$ac_vpsub
66546$extrasub
66547_ACEOF
66548cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66549:t
66550/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
66551s|@configure_input@|$ac_sed_conf_input|;t t
66552s&@top_builddir@&$ac_top_builddir_sub&;t t
66553s&@top_build_prefix@&$ac_top_build_prefix&;t t
66554s&@srcdir@&$ac_srcdir&;t t
66555s&@abs_srcdir@&$ac_abs_srcdir&;t t
66556s&@top_srcdir@&$ac_top_srcdir&;t t
66557s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
66558s&@builddir@&$ac_builddir&;t t
66559s&@abs_builddir@&$ac_abs_builddir&;t t
66560s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
66561$ac_datarootdir_hack
66562"
66563eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
66564  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
66565
66566test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
66567  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
66568  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
66569      "$ac_tmp/out"`; test -z "$ac_out"; } &&
66570  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
66571which seems to be undefined.  Please make sure it is defined" >&5
66572$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
66573which seems to be undefined.  Please make sure it is defined" >&2;}
66574
66575  rm -f "$ac_tmp/stdin"
66576  case $ac_file in
66577  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
66578  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
66579  esac \
66580  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
66581 ;;
66582
66583
66584
66585  esac
66586
66587done # for ac_tag
66588
66589
66590as_fn_exit 0
66591_ACEOF
66592ac_clean_files=$ac_clean_files_save
66593
66594test $ac_write_fail = 0 ||
66595  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
66596
66597
66598# configure is writing to config.log, and then calls config.status.
66599# config.status does its own redirection, appending to config.log.
66600# Unfortunately, on DOS this fails, as config.log is still kept open
66601# by configure, so config.status won't be able to write to it; its
66602# output is simply discarded.  So we exec the FD to /dev/null,
66603# effectively closing config.log, so it can be properly (re)opened and
66604# appended to by config.status.  When coming back to configure, we
66605# need to make the FD available again.
66606if test "$no_create" != yes; then
66607  ac_cs_success=:
66608  ac_config_status_args=
66609  test "$silent" = yes &&
66610    ac_config_status_args="$ac_config_status_args --quiet"
66611  exec 5>/dev/null
66612  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
66613  exec 5>>config.log
66614  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
66615  # would make configure fail if this is the last instruction.
66616  $ac_cs_success || as_fn_exit 1
66617fi
66618if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
66619  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
66620$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
66621fi
66622
66623
66624# After AC_OUTPUT, we need to do final work
66625
66626
66627  # Try to move config.log (generated by autoconf) to the configure-support directory.
66628  if test -e ./config.log; then
66629    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
66630  fi
66631
66632  # Rotate our log file (configure.log)
66633  if test -e "$OUTPUT_ROOT/configure.log.old"; then
66634    $RM -f "$OUTPUT_ROOT/configure.log.old"
66635  fi
66636  if test -e "$OUTPUT_ROOT/configure.log"; then
66637    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
66638  fi
66639
66640  # Move configure.log from current directory to the build output root
66641  if test -e ./configure.log; then
66642    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
66643  fi
66644
66645  # Make the compare script executable
66646  $CHMOD +x $OUTPUT_ROOT/compare.sh
66647
66648
66649# Finally output some useful information to the user
66650
66651  # Finally output some useful information to the user
66652
66653  printf "\n"
66654  printf "====================================================\n"
66655  if test "x$no_create" != "xyes"; then
66656    if test "x$IS_RECONFIGURE" != "xyes"; then
66657      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
66658    else
66659      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
66660    fi
66661  else
66662    if test "x$IS_RECONFIGURE" != "xyes"; then
66663      printf "A configuration has been successfully checked but not created\n"
66664    else
66665      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
66666    fi
66667  fi
66668  if test "x$CONFIGURE_COMMAND_LINE" != x; then
66669    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
66670  else
66671    printf "using default settings.\n"
66672  fi
66673
66674  printf "\n"
66675  printf "Configuration summary:\n"
66676  printf "* Debug level:    $DEBUG_LEVEL\n"
66677  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
66678  printf "* JDK variant:    $JDK_VARIANT\n"
66679  printf "* JVM variants:   $JVM_VARIANTS\n"
66680  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
66681  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
66682
66683  printf "\n"
66684  printf "Tools summary:\n"
66685  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
66686    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
66687  fi
66688  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
66689  if test "x$TOOLCHAIN_VERSION" != "x"; then
66690    print_version=" $TOOLCHAIN_VERSION"
66691  fi
66692  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
66693  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
66694  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
66695
66696  printf "\n"
66697  printf "Build performance summary:\n"
66698  printf "* Cores to use:   $JOBS\n"
66699  printf "* Memory limit:   $MEMORY_SIZE MB\n"
66700  if test "x$CCACHE_STATUS" != "x"; then
66701    printf "* ccache status:  $CCACHE_STATUS\n"
66702  fi
66703  printf "\n"
66704
66705  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
66706    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
66707    printf "will result in longer build times.\n"
66708    printf "\n"
66709  fi
66710
66711  if test "x$FOUND_ALT_VARIABLES" != "x"; then
66712    printf "WARNING: You have old-style ALT_ environment variables set.\n"
66713    printf "These are not respected, and will be ignored. It is recommended\n"
66714    printf "that you clean your environment. The following variables are set:\n"
66715    printf "$FOUND_ALT_VARIABLES\n"
66716    printf "\n"
66717  fi
66718
66719  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
66720    printf "WARNING: Your build output directory is not on a local disk.\n"
66721    printf "This will severely degrade build performance!\n"
66722    printf "It is recommended that you create an output directory on a local disk,\n"
66723    printf "and run the configure script again from that directory.\n"
66724    printf "\n"
66725  fi
66726
66727  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
66728    printf "WARNING: The result of this configuration has overridden an older\n"
66729    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
66730    printf "proper build. Failure to do so might result in strange build problems.\n"
66731    printf "\n"
66732  fi
66733
66734  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
66735    printf "WARNING: The result of this configuration was not saved.\n"
66736    printf "You should run without '--no-create | -n' to create the configuration.\n"
66737    printf "\n"
66738  fi
66739
66740
66741
66742  # Locate config.log.
66743  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
66744    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
66745  elif test -e "./config.log"; then
66746    CONFIG_LOG_PATH="."
66747  fi
66748
66749  if test -e "$CONFIG_LOG_PATH/config.log"; then
66750    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
66751    if test $? -eq 0; then
66752      printf "The following warnings were produced. Repeated here for convenience:\n"
66753      # We must quote sed expression (using []) to stop m4 from eating the [].
66754      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
66755      printf "\n"
66756    fi
66757  fi
66758
66759